Android app signature elevation

Source: Internet
Author: User

Recently, I encountered the problem of restarting the Android system during development. After a day of tossing and surfing the Internet, I finally solved the problem. Here the problem is mainly about permissions. Share as follows:

Environment: android2.2 eclipse3.7 jdk1.6

My main signature method is as follows:

1. Add Android: shareduserid = "android. uid. system" to the manifest node in androidmanifest. xml ".

2. After addingProgramIt cannot be used directly on a virtual machine. However, you can use eclipse to compile the SDK into an APK.

3. Compile the APK and open the APK with the compression tool. Delete the CERT. SF and cert. RSA files in the META-INF directory.

4. Use the signapk. Jar tool that comes with Android and platform. x509.pem and platform. pk8 in the source code to re-sign the APK.

Run Java-jar signapk. Jar platform. x509.pem platform. pk8 old.apk new.apk. After the execution, new.apk is the signed file.

(Note: when executing the command, all files are stored in the same directory. If not, modify the path ).

The platform. x509.pem and platform. pk8 files can be found in build/target/product/security of the source code. Signapk. jar can be compiled to build/tools/signapk.

5. You can install and use the signature.

In addition, this signature may cause the operation of files in the sdcard directory to fail.

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.