I want my app (PerApp) to write to Settings.Secure on rooted devices, but without having the app to be installed in /system/app.
Any suggestions on how to do it?
One possibility is to launch a component of the app with root privileges via app_process, and then have the component with a static main() use reflection to access Settings.Secure. The latest version of my Force2SD does that successfully to access hidden functions of the packagemanager. However, the problem is that the standard API for Settings.Secure needs a Context, and I don't know how to gain a working Context for something that starts from the commandline with a static main().
I could include a sqlite3 binary, but I am concerned about the stability issued with writing directly to the settings database on the fly, and don't know if the OS will register the changes immediately. Moreover, loading a large binary like sqlite3 will slow things down.
Any suggestions on how to do it?
One possibility is to launch a component of the app with root privileges via app_process, and then have the component with a static main() use reflection to access Settings.Secure. The latest version of my Force2SD does that successfully to access hidden functions of the packagemanager. However, the problem is that the standard API for Settings.Secure needs a Context, and I don't know how to gain a working Context for something that starts from the commandline with a static main().
I could include a sqlite3 binary, but I am concerned about the stability issued with writing directly to the settings database on the fly, and don't know if the OS will register the changes immediately. Moreover, loading a large binary like sqlite3 will slow things down.