How do I install system certified signed APK

  • 2020-06-03 08:19:48
  • OfStack

There are two solutions:

1 kind

If you use repo sync as the entire source code of android, you can directly put your app under /packages/apps to mm, but remember to add the LOCAL_CERTIFICATE attribute to Android.mk.

Any APK in the system that USES ES18en.uid.system to share UID will first add android:sharedUserId= "android.uid.system" to Android.mk, then add LOCAL_CERTIFICATE := platform. See Settings, etc

All APK in the system that USES ES37en.uid.shared to share UID will add android:sharedUserId= "android.uid.shared" to the manifest node and then add LOCAL_CERTIFICATE := shared to Android.mk. See Launcher, etc

In the system, android:sharedUserId= "android.media" is added to manifest node for all APK using ES56en.media as the share of UID, and then LOCAL_CERTIFICATE := media. See Gallery, etc.

2 kinds of

Of course, not everyone has the opportunity or need to download the entire source code. Simply, after you have created apk with IDE, you can go to /build/tools/signapk/ to find the signapk.jar file. Go/build target/find platform product security/pk8, platform. x509. pem these two files. Drop them into a folder with your apk, and then cd goes to that folder and executes java-jar signapk. pem platform.pk8 Signed.


Related articles: