Create System Application

后端 未结 5 1344
执念已碎
执念已碎 2020-12-01 02:10

What I should to do to create a system app (to obtain rights to use android:sharedUserId=\"android.uid.system\"in manifest file without receiving an error from

5条回答
  •  抹茶落季
    2020-12-01 02:46

    A system app must be signed with the platform key. This is done by developers deploying an android platform on their own device, or mobile carriers.

    If that is your case, the easiest way is to add this to your Android.mk:

    LOCAL_CERTIFICATE := platform
    LOCAL_PRIVILEGED_MODULE := true
    

    If you add those lines without adding android:sharedUserId="android.uid.system" to your manifest, you will be a platform_app. A system app is more privileged than a platform app. That uses the platform key and runs as the system user.

    If you are not the platform vendor, the platform vendor would need to sign your application using their platform key. Some vendors, including my company, will do this for 3rd parties demonstrating a valid reason for doing so.

    Without the signature, your application can only be used on rooted devices.

提交回复
热议问题