I’m on a UleFone Armor X7 (cheap waterproof/rugged thing) running Android 10. I’m trying to use Tasker to conserve power for multi-day bike rides with no charging*, and one thin I’d like to do is turn off as much communication as possible for several minutes, then on briefly to pick up messages, then off again in a loop
I know aeroplane mode requires root, and I don’t want to lose Google Pay, but I should be able to toggle mobile data without it according to the following screenshot:
This says either root, or ADB WiFi, or Write Secure Settings should be enough. ADB WiFi isn’t an option, because it needs a PC at every boot, which is incompatible with turning the phone off overnight – to save power. So I’ve installed ADB, granted the permission, and it still doesn’t work. I can test that the permission is set:
adb shell dumpsys package net.dinglisch.android.taskerm |grep SECURE_SETTINGS returns
android.permission.WRITE_SECURE_SETTINGS: granted=true but when I try to test the task I get
Couldn't toggle mobile data on this device
I’m thinking of trying something with AutoInput, but I’m not keen, as it (i) requires the screen to be unlocked, and (ii) can on toggle, not set a state. I also don’t want to pay even a little (on principle) to test something with these issues.
I’ve seen a few similar questions for very old Android versions, but nothing recent.
* I will have an external battery, and a dynamo, but just assume they’re not enough to keep everything charged, especially as I navigate on my phone.