3

How do I enable airplane mode automatically at 01:00 AM using Tasker on Android 4.2.2?

The Airplane mode setting inside Tasker under Action -> Net -> Airplane mode cannot be activated:

Airplane mode is not available in Android 4.2+, try the Secure Settings plugin and a rooted device.

My device is rooted. How do I properly use the Secure Settings plugin to enable Airplane mode automatically at the said time?

  • Have you already installed Secure Settings? What have you tried to activate Airplane Mode? According to the graphs in my Tasker Graphs section, you should be able to use it via Plugin­ › Secure Settings, finding it there under Actions › Airplane Mode. – Izzy Jul 13 '15 at 10:36
  • @Izzy Seems that the plugin has shifted the option after the last time you checked its latest version, and the new location is System+ Actions -> Airplane Mode. :) – Firelord Jul 13 '15 at 18:08
  • @Firelord makes sense, given that it now requires root. You know: each new Android version since 2.2 brought a new restriction. This one was AFAIR introduced with 4.2. So it looks like I need to update that graph. As you've just played with SecureSettings: did you spot any other deviation I should consider? E.g. "Airplane Mode Radios", did it move as well? // Ouch, PS: Position of menu items seems to depend on Android version. On my device with 4.1.2, Airplane Mode is still listed in "Actions". – Izzy Jul 13 '15 at 19:41
2

Notes:

  • The answer is tested on a rooted Android 4.2.1 running Tasker v4.6u3m and Secure Settings v1.3.6.

  • Secure Settings may needs to be installed as a System app (it has the provision under SYSTEM+ in its GUI).


Since you're already aware of making profiles, tasks, and actions, I would come to point:

  1. Make a profile having time as the context, and create a new task in it.
  2. Under that Task, the action would be Plugin → Secure Settings → Configuration (pencil icon) → System+ Actions → Airplane Mode → On → Save (floppy icon), and save your action under the task.

Now whenever the time would come Tasker would execute Airplane mode, and everyone would be happy!

You can automatically disable the Airplane Mode as well, by choosing Off or Toggle over On in the aforesaid step.


For Readers: If you don't happen to have Secure Settings or it's not working somehow, then you can use the following action as an alternative. (Credits to Andrew T. and DavisNT for their answer)

Action: Code → Run Shell, and enter these details:

  • Command: settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true
  • Check Use Root

That would execute the Airplane mode based on your profile.

To automatically disable the said mode, create an another action in a different profile and copy the aforesaid action with exception of 0 over 1 and false over true.

You're good to go now!

  • Oh, did I mention that the alternative can actually be used on a non-rooted phone as well (hint: ADB running wirelessly, and use adb connect in loopback), perhaps not on 4.2 but 4.4 and 5.0 can do the job. – Firelord Jul 13 '15 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.