wifi on then airplane mode the wifi on

makemoney80

New member
hello ,
how to make macro :
when wifi on
then
airplane on
then
wifi on
if ended
return to airplane off


thanks

note : non rooted devices , samsung android 14 oneUI 6.1
 
Last edited:

Dimlos

Well-known member
If the standard action does not work, you can use the adb command.

adb shell cmd connectivity airplane-mode enable
adb shell cmd connectivity airplane-mode disable
adb shell svc wifi enable
adb shell svc wifi disable
 

md_sgf

Well-known member
If the standard action does not work, you can use the adb command.

adb shell cmd connectivity airplane-mode enable
adb shell cmd connectivity airplane-mode disable
adb shell svc wifi enable
adb shell svc wifi disable
Do you think this could be a solution for this issue? ---> https://macrodroidforum.com/index.php?threads/programmatically-toggling-wi-fi.9676/

Edit: adb shell svc wifi enable/disable works via usb cable. svc wifi enable/disable doesn't work via Shell Script action (non-rooted + use helper app). What should I try next? Shizuku I suppose?
 
Last edited:

md_sgf

Well-known member
Shizuku is not available for Android 10
What do you mean?. I have installed it, and it works (have ticked "Shizuku" + "Use Helper App" in my Shell Script action, which executes "svc wifi enable"). Although I need to restart shizuku after every restart, via usb + adb.
 

Dimlos

Well-known member
If it's working, it's fine.
My old Android for verification was in bad shape and I couldn't actually test it.
 

makemoney80

New member
if macro change to :

wifi ON
then
airplane ON still wifi ON
if ended
airplane OFF

still difficult ?


I don't want to use Shizuku , wireless debugging and etc , just macro

OR
routine in samsung can hadle this ?

thanks
 

dhj49er

Well-known member
if macro change to :

wifi ON
then
airplane ON still wifi ON
if ended
airplane OFF

still difficult ?


I don't want to use Shizuku , wireless debugging and etc , just macro

OR
routine in samsung can hadle this ?

thanks
It looks like you are planning to use WiFi in airplane mode.

Turning on Airplane mode will turn off WiFi, a restriction built into later versions of Android by Google.

Unfortunately no app is allowed to turn on WiFi in Airplane mode, another Google restriction.

In MacroDroid it means that the WiFi on action will not work. However, there are ways to turn on WiFi in airplane mode.
One way is to use UI interaction actions to click on the status bar icon. This requires the phone screen to be on, which may not suit your use case.
Another way is to use ADB shell commands via for example Shizuku or Termux. These commands can be executed with the phone screen off.
There are numerous threads covering this, should you be interested. I use Shizuku and I find it simple to install, pair and use.
 
Top