What is the best (most safe) way to change protected system settings like brightness, gps, data, … within a root app?
I read about 2 ways to do so:
1) copy settings.db to your app folder manipulate it with sql api and then copy it back –
seems more than just a bit risky to me.
See here
2) use root to copy your app to the system folder and hold WIRTE_SECURE_SETTINGS permission – seems doable, but does that break the market link, so the users won’t receive updates anymore? See here
Or is there a different way?
Thx for your help!
Instead of moving your app to
/system/app, you can execute your “modification” commands as root usingsuAn explanation of how to do this using
Runtime.exec()(and also one implementation) can be found here.