I'm trying to write an app that can turn my mobile data connection on and off. Already got the source and built my own sdk, where I removed the @hide statements so I can use the relevant function
cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
cm.setMobileDataEnabled(true);
Also found out which permissions I need, in particular WRITE_SECURE_SETTINGS, which is only available to system apps. I read adamk's comment and now need to know how to do what he suggested (add the app to system or sign it with the platform key).
At first I would like to do that on the emulator only, and then on my phone (which is rooted and using a custom ROM). I tried pushing it to the system directory on the emulator:
adb remount
adb push app.apk /system/app/
adb sync
which did not work, the app was not found and installed.
What did I forget? How is the proper way to do this?