Page 1 of 1

"Set Airplane Mode On" requires root permission?

Posted: 27 Jan 2014 13:22
by Gorlash
I was previously using Automagic on my ZTE Avid 4G phone; I had a simple flow created:
Trigger: Signal is lost
Condition: Screen is not on
Action: Turn on Airplane mode

This was very handy when I went hiking and always lose signal, since the phone drained battery quickly when searching for lost signal!!

So this past weekend I upgraded to a Galaxy S4, and re-created this flow, which seemed to be fine. However, I went hiking yesterday, and when I checked the phone, I had an error from Automagic, saying it required root permission to set Airplane mode!! This doesn't make sense; my phone is not rooted, so I don't even have root permission, and in any case I don't need special permission to manually select Airplane mode, which I did yesterday once I saw this.

Is there some way I can solve this issue and get my flow working?

Re: "Set Airplane Mode On" requires root permission?

Posted: 27 Jan 2014 14:33
by MURTUMA
From Jelly Bean(or ICS, I don't remember which one) onwards the way Android handles airplane mode was changed. Now it requires root.

Re: "Set Airplane Mode On" requires root permission?

Posted: 27 Jan 2014 14:55
by schuster666
Hi,
Wait for next version or try eap version. There is a new method to disable the radio without root. I own a s4 myself, and it works.

Re: "Set Airplane Mode On" requires root permission?

Posted: 27 Jan 2014 17:33
by Gorlash
schuster666: What is "eap version" ??? I only see one version on the Automagic website...

Re: "Set Airplane Mode On" requires root permission?

Posted: 27 Jan 2014 18:01
by Martin
Hi,

Turning on/off airplane mode requires root starting with Android version 4.2. The settings-app of Android itself has more permissions than a regular third party app like Automagic so Automagic has to resort to some workarounds to toggle airplane mode.

The EAP version is a test version of Automagic available in the EAP-forum: http://automagic4android.com/forum/view ... f=7&t=2625
Please be careful when using the EAP-version, it's mostly untested for now and might still contain serious issues.

The action to turn off the radio is called Set Telephony Radio State. Use Method 2 to toggle the radio without root permission.

Regards,
Martin

Re: "Set Airplane Mode On" requires root permission?

Posted: 27 Jan 2014 18:26
by Gorlash
Thanks, Martin! I've installed that version, and switched my Action to Set Telephony Radio State, Method 2, as you recommended.

I probably won't have a chance to actually test this until next weekend, I'll report my results here...

Re: "Set Airplane Mode On" requires root permission?

Posted: 02 Feb 2014 14:26
by Gorlash
Okay, I tested this on the hill yesterday, and it worked fine!! Thanks!

Re: "Set Airplane Mode On" requires root permission?

Posted: 13 Jun 2014 06:45
by rialeral
edit: Ok, seems I was wrong. The root I'm using doesn't seem to be working with Automagic, though it works with eg Titanium Backup.

Airplane toggle doesn't seem to work anymore. The log says it worked but it doesn't toggle it. This is on Android 4.3 (original Samsung ROM).
Apparently "The Android team decided that it should fail silently".
http://forum.xda-developers.com/showpos ... ostcount=7

Airplane worked when I updated 4.1.2->4.3. But then I did a restore of 4.3 and used a new root. Now airplane toggle doesn't work anymore. Seems it now requires a Xposed mod, which I don't like to use.

Maybe the Automagic action description should be updated.

Re: "Set Airplane Mode On" requires root permission?

Posted: 13 Jun 2014 08:08
by Martin
Hi,

Toggling Airplane mode using root should work on most devices on Android 4.3+.
Sometimes root apps do not grant permission properly to Automagic. In this case it often helps to remove Automagic from the list of apps in the root app so that the root app has to grant permission again to Automagic the next time an action requiring root is executed in Automagic. You can also try to disable/reenable root access in the preferences of Automagic.
If it still does not work, you could enable Debug Log in the preferences of Automagic, turn on airplane mode using Automagic and send the log to me (on the flow list: Menu->Manage->Log, Menu->Send Log: send to info@automagic4android.com).

Regards,
Martin