• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Phone rooted, still can't enable or disable mobile data

Plecto123

Newbie
Secure settings is installed and Tasker is set to disable mobile data when I shake the phone, but Tasker says "An error occurred while executing action". I've also enabled "Device Admistratior" for Secure Settings although I don't know if that would matter. What's wrong? :(
 
Whenever you make a change you need to exit with a save before exit. It is the only way in Tasker to be sure that all aspects of what you are updating are known to all sections of Tasker. Whenever you get a "weird" result it is almost always because one element did not get changed with the update.

You can also restart Tasker sometimes this makes a difference.

You can also reboot the system sometimes this makes a difference.

... Thom
 
To be clear, you are trying it in secure settings plug-in within Tasker? I ask, because some folks don't quite understand how to use plugins.
 
Make sure you check "use root" if that is in the dialogue

Go into SU and make sure Tasker is allowed to get root.

But still might not work because secure settings sometimes has problems with newer root.
So next step is forget secure settings and use tasker run shell with linux shell commands:
Run Shell: svc data enable ... with "use root" checked (turns data on)
Run Shell: svc data disable ... with "use root" checked (turns data off)

The above doesn't rely on secure settings and really should work (works fine for me).

If all else fails for this command or other root commands, try temporarily disabling secure linux enforcing by doing this before attempting to turn data on/off
run shell setenforce permissive (use root)

... and this after changing data state:
run shell setenforce enforcing (use root)
(you are more vulnerable to a range of attacks in permissive mode so it's important to set it back to enforcing when you're done).

A great thread on using linux/tasker shell commands instead of secure settings here:
https://www.reddit.com/r/tasker/comments/4goz99/how_to_replace_some_secure_settings_actions_with/
In particular everything in the long list of settings for system, global, and secure are all available from shell command.
 
Last edited:
Thanks electricpete, worked like a charm! Tasker is not mentioned in SU by the way, I guess that might be the issue? Secure settings has root access though.
 
If you were able to get it to work with shell command, then tasker has no problem with root access. I would think it shows up with a green or grey icon in the su app list though (like my screenshot attached).

The problem I heard is that secure settings is not being updated as android and chainfire's su app evolve. So parts of SS are breaking and it won't get any better unless the SS dev gets involved again. Hence the interest on Reddit for alternate ways to accomplish these things. Also it's good for our security to reduce the use of non open source root apps whenever possible.
 

Attachments

  • Screenshot_20160519-172121.png
    Screenshot_20160519-172121.png
    445.7 KB · Views: 278
Back
Top Bottom