Page 1 of 1
Mobile network state toggle- ADB hack
Posted: 28 Jul 2020 05:08
by icefox56
Can I toggle the "Mobile network state" in version 1.37 without root?
I saw tasker allows to do this using ADB hack.
If yes, what is the adb command for this.
If no, do you know any other app (possibly free) that can do this, (not tasker)
Re: Mobile network state toggle- ADB hack
Posted: 28 Jul 2020 10:26
by Desmanto
We can do this already using Set System Setting.
[global] mobile_data1 : 0 >>> 1
The key can be different in yours, you can find it using my secure logger.
viewtopic.php?f=3&t=7931
This reminds me that I haven't share my new secure setting logger flow. I almost forgot it due to many things to do in the office.
Re: Mobile network state toggle- ADB hack
Posted: 28 Jul 2020 16:39
by icefox56
Thanks for the reply Desmanto.
I downloaded your secure settings flow and changed mobile_data 1 to 0, but there was only visual change. i.e the 4G icon indicating mobile data was on disappeared. But the data send and received arrows were still working so was internet. I was able to load web pages (I tried multiple websites). Then I turned the screen off and on to see if it made any change, but no luck it was still the same.
My phone runs on stock android. I have unrooted my phone long ago. what should I do now? Any workaround?
Re: Mobile network state toggle- ADB hack
Posted: 28 Jul 2020 17:25
by Desmanto
Hmmm, zenfone pro M1 should be very close to stock. The method above works for my RN5 whyred with AEX Pie 9.0 ROM. I have root though, maybe the setting the global category is invoked using root rights.
Tasker method probably using adb shell
Without adb or dump permission, only execute root command can execute this. Maybe some other user who are using AM 1.38 EAP (and already grant DUMP permission to Automagic) can help test this whether this method work.
Last resort is to use Control UI to tap toggle the mobile data, but it has UI distraction.
Re: Mobile network state toggle- ADB hack
Posted: 29 Jul 2020 01:48
by icefox56
Control UI is not an option for me, I want to turn off data when screen has been off for 15 minutes.
Any idea when v1.38 is coming out?
I'm currently using macrodroid for turning off mobile data. I gave it WRITE_SECURE_SETTINGS permission and it works.
How come it does not work on automagic, it also have the same permission given?
Edit: Apparently Macrodroid isn't working also. It's just visual change.
But Tasker works. They use a code like
Re: Mobile network state toggle- ADB hack
Posted: 29 Jul 2020 11:21
by Desmanto
I just recheck, tasker use adb client to connect to the adb wifi. Your command above is to change the adb from USB to wifi adb. After that, any toggling command use the same svc based command (just like I posted above).
This require computer to invoke the command at every reboot. Only android 11 above can have this toggle without root/adb from computer. (of course, not yet released)
So far, AM 1.38 EAP also doesn't have separate adb client to connect to its own adb wifi. I am trying to find a working binary to use this adb client, but still can't find it.