简体   繁体   中英

How to make a system app in Android code

I'm trying to make a app that works like a parental control, but doing so, I got stuck in system app permissions, looking about it, I am not able to find anything that tells me that it is possible to do without using a specific ROM for my app. But in the Play Store, has a lot of apps that makes that. In my app, every time that I try to block connectivity, using ConnectivityManager , he gives me:

java.lang.SecurityException: Neither user 10228 nor current process has android.permission.MODIFY_PHONE_STATE.

And the permission is in the manifest. In the manifest, he gives me the error:

Permission is only granted to system apps.

So, I'm asking, how to make a system App in Android code without root the device?

how to make a app that it is a system app in Android code without root the device?

The closest thing to what you describe is for you to create your own custom Android ROM, where your app is pre-packaged as a system app, and convince people to install your ROM on their device, replacing their existing Android installation.

Otherwise, this is not possible. This should be obvious: if everyone could write an app that made themselves be a system app, there would be no value in having a distinction between regular apps and system apps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM