Create System Application

后端 未结 5 1338
执念已碎
执念已碎 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:35

    Ok, I think that I find sollution from great xda developers: http://forum.xda-developers.com/showthread.php?t=1776095 here is full description how to obtain access to apps signed by platform keys. Do you apply with this approach?
    PS it is interesting that users from stack instead of investigating hard problem immediately say that you can not solve it, then reduce novice user's reputation...

    0 讨论(0)
  • 2020-12-01 02:38

    What I should to do to create a system app

    There are two types of system apps:

    • Apps installed on the system partition, which can be accomplished by users with root privileges

    • Apps signed by the same signing key that signed the firmware

    to obtain rights to use android:sharedUserId="android.uid.system"

    That definitely would require your app to be signed by the same signing key that signed the firmware. That's true for any android:sharedUserId.

    But some guys edit stock apps, prepare zip file which user can update system apps by recovery.

    You are welcome to provide any evidence that what they do somehow involves android:sharedUserId="android.uid.system".

    0 讨论(0)
  • 2020-12-01 02:38

    There is two types of system apps.

    Type 1: The App which is in the same signature of the Device ROM .

    Type 2: The Signed app which is in system/priv-app ( Might differ based on adnroid version ) in your device storage location .

    Visit this link -> http://www.archive.ricston.com/blog/explaining-behavior-android-application-system-apps-nonsystem-apps/

    0 讨论(0)
  • 2020-12-01 02:40

    I did not need to sign my app with the firmware signature! I have a rooted device. Therefore I can grant myself rights to write to certain directories using adb.

    I moved my app to /system/priv-app instead of /system/app using those steps: Push my apk to /system/app

    Now, I can access system permissions like android.permission.SHUTDOWN

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题