Android How can app run as System App?
What is required for an app to run as a System app? What needs to be requested from the device vendor? Does the process change if the device is roote开发者_运维技巧d and the app is to call a method on PowerManager
or other system management classes that affect the device?
I am able to call to set brightness but not do operations like put the device in sleep mode etc.
You have to sign your application with system key , see this thread How to compile Android Application with system permissions
System permissions such as access to PowerManager need the application to be signed with the platform key besides giving android.permission.POWERMANAGER
or a similar permission in the manifest.
As far as signing with the platform key is concerned, we can do that by building the entire firmware with the application included.
java -jar signapk.jar platform.x509.pem platform.pk8 bin/TestApp-unsigned.apk bin/TestApp.apk
精彩评论