Android: Add app to firmware, use WRITE_SECURE_SETTINGS
<p>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</p>

<pre><code>cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
cm.setMobileDataEnabled(true);
</code></pre>

<p>Also found out which permissions I need, in particular WRITE_SECURE_SETTINGS, which is only available to system apps. I read adamk's <a href="http://stackoverflow.com/questions/3476600/why-are-these-permissions-being-refused/3477237#3477237">comment</a> and now need to know how to do what he suggested (add the app to system or sign it with the platform key).</p>

<p>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:</p>

<pre><code>adb remount
adb push app.apk /system/app/
adb sync
</code></pre>

<p>which did not work, the app was not found and installed. </p>

<p>What did I forget? How is the proper way to do this?</p>
