I am trying to learn how to install any application as system app.
Basically i am trying to use goToSleep and WakeUp function calls in android. I understand that to use these call in your application , application must be installed as system application.
Tried building application with permissions in Manifist.xml as given below
android:sharedUserId="android.uid.system"
uses-permission android:name="android.permission.DEVICE_POWER"
goToSleep call was used as discribed below
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
pm.goToSleep(SystemClock.uptimeMillis() + 10);
After successfully building the application the application was loaded into /system/app directory of android filesystem using following commands
adb remount ; adb push <*.apk> /system/app/
Running the application with above changes resulted in Error "Neither user 10050 nor current process has android.permission.DEVICE_POWER."
I also read that application must be signed as system app for this to successfully work i have the copy of android kernel source that i built, Using this how do i sign the current application as system application and successfully test the goToSleep functionality
Thanks,
-SP-