How the Android app signs the system

Source: Internet
Author: User

Sometimes write a program need to call the system library, if the permissions are not enough, there are some methods in the library. You will need to sign the APK system.

Simple and common method:

1, add android:shareduserid= "Android.uid.system" to the manifest node in the APK's Androidmanifest.xml

2, run or package get APK

3. Use the target system's platform key to sign the APK file:

Find the Platform.x509.pem and platform.pk8 two files in the system android\build\target\product\security directory, in the system in out/host/ Locate the Signapk.jar file in the Linux-x86/framework directory, copy it out and put it in a folder, and put the apk that needs to be signed into a folder.  Then first enter the file directory, and then enter the following statement on the cmd: Java-jar signapk.jar Platform.x509.pem Platform.pk8 was signed apk name. apk After signing the APK name APK, after execution will get a new apk "signature after apk name" in the current directory. "APK" is a system-signed apk.

For example, to sign a reset.apk, such as:

CMD into current directory: input command Java-jar signapk.jar platform.x509.pem platform.pk8 reset.apk s_reset.apk

Press Enter and the resulting s_reset.apk is the system-signed apk.

It is important to note that it must be Platform.x509.pem before platform.pk8 , otherwise it will be an error.

How the Android app signs the system

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.