16

I used to use Tasker tasks to turn airplane mode on and off automatically when I needed it. Now, it seems, this requires root. But rooting my phone bans me from using Android Pay or any other SafetyNet-locked app. (The latest updates to SafetyNet even detect the new systemless root, and may even be triggered by an unlocked bootloader even on an unrooted phone.)

Is there any way I can reliably turn airplane mode on and off with Tasker or some other automated tool, without losing access to Android Pay?

5
  • 1
    Have you tried Automate plugin? Some folks have had success with it? I think it can drop-down the notification tray and play pre-recorded gestures.
    – Firelord
    Feb 6, 2017 at 19:00
  • @Firelord AFAIR toggling airplane mode was moved out of user-space with some JellyBean version (4.2 IIRC), so I doubt any automation app can do that without root. But I might be wrong.
    – Izzy
    Feb 6, 2017 at 20:01
  • 1
    @Izzy true, but Automate provides an option to record user's activity and play it as an automation. That is to say, you can record dropping down notification tray, going to quick tiles and toggling Airplane mode tile. That Automate can record and play.
    – Firelord
    Feb 7, 2017 at 10:43
  • 2
    @Firelord I've missed that part, true – it's rather "macro recording and replay", that might indeed work. Which makes that stupid "security protection" look even more stupid (I never understood why that decision wasn't left to the user).
    – Izzy
    Feb 7, 2017 at 11:01
  • This is not programmatic, but I set up a routine in Pie so that when I'm in bed I say "goodnight" and Google Assistant turns on airplane mode for me. The routine command can be any normal English phrase like "turn on airplane mode" or "airplane mode on". You don't need root either.
    – thdoan
    Nov 9, 2019 at 5:54

3 Answers 3

3

Using Tasker and AutoInput plugin, here is the procedure:

  • First, create a profile that suits your needs (i.e. when to trigger airplane mode e.g at a specific time, etc)

Task

  • Create a new task "New Task + "
  • You can name this Task Airplane_mode or anything.
  • Click "+" to add new Action

A1: Settings ➡ Airplane Mode Settings

We need to add a task Wait action for just about 1 or 2 seconds (to allow the screen to load in time).

A2: Task ➡ Wait [Seconds:2]

A3: Plugin ➡ Auto input ➡ Action [ Go to the "Airplane Mode Settings" screen in your Android settings.

  • Swipe down on the notification bar and touch the "Add" button in the AutoInput notification.
  • Touch the "Airplane Mode" setting
  • Touch "Accept" in the notification and go back to Tasker. There select the "Airplane Mode" text and accept (tap on tick) these settings.

A4: (Going back to the original screen) Add an "AutoInput Global Actions" Tasker action. Plugin ➡ AutoInput ➡ Global action [Select the "Back" option]. Accept the setting (tap on the tick)

  • Tap back to exit from this task
  • Save this task and exit

NB: This requires the screen to be unlocked.


Note: AutoInput has a built-in option to unlock the screen if it is disabled in Tasker. Simply add this action to the top of the task:

A1: Plugin ➡ AutoInput ➡ Unlock screen (note: some screen lock options are still not supported e.g fingerprint, but it is worth a try)

Acknowledgments

1
  • I tried basically the same with the Automate app and "Interact" blocks. It was very hard to set up, and in the end did not work for me because I want to switch on airplane mode when the screen is turned off, but then replaying user input fails. Luckily, I found the MacroDroid app, which gives rather simple access and can make use of the "Default assist app" privilege for being allowed to switch airplane mode.
    – dvo
    Oct 7, 2023 at 8:17
1

You can achieve that with Tasker + Auto input combo or another third-party application called Airplane Mode PRO ($1.78). Alternatively, get Schedule Airplane Mode.

Airplane Mode PRO allows you to set up various automatic triggers for Android's Airplane Mode. This app is the only one that also works on Android versions higher than Jellybean 4.2, such as Jellybean 4.3, Lollipop 5.0 and Marshmallow 6.0 and still does NOT require a rooted device.

Features:

  • Support for automation and third-party launchers
  • Separate shortcuts for toggling, enabling and disabling
  • Toggle via a notification
  • Enable airplane mode while a specific app is running
  • Enable / Disable at a specific time
  • Toggle when charger is dis/connected
  • Enable when a certain battery percentage is reached (Any percentage can be set)
  • Enable when a certain battery temperature is reached
  • Toggle via a home screen shortcut (One click only)


Note: The workaround requires the screen to be on

Disclaimer! I am by no means affiliated with that application(s) but came across it, so I thought it was a good workaround to the addressed problem.

0
0

Without root access, one needs the "default assist app" privilege for being allowed to switch the airplane mode. It works for instance with the MacroDroid app - see also https://macrodroidforum.com/wiki/index.php/Action:_Airplane_Mode_On/Off.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .