Jarsigner apk A workaround that cannot be installed _android

Source: Internet
Author: User
Tags sha1

For some reason, to re-sign unsigned apk, need to use the Jarsigner tool, but after signing, APK cannot install, baffled. Finally found a solution, now share to everyone:

When signing, add 2 parameters:

Copy Code code as follows:

-digestalg Sha1-sigalg Md5withrsa

The initial estimate of the problem with the JDK version is the cause of the inability to sign the error. JDK 1.6 signatures are fine, but 1.7 will have this problem.

The complete signature command is as follows:

Copy Code code as follows:

Jarsigner-verbose-keystore feelyou.keystore-storepass Feelyou.info-signedjar signed.apk-digestalg sha1-sigalg MD5wi Thrsa unsigned.apk feelyou

Explain:

1,-keystore feelyou.keystore: Specify the signature file that needs to be used, write file name directly in the current directory, otherwise please specify the specific path
2,-storepass Feelyou.info: Automatically enter the password, keystore password and alias password are all I used are feelyou.info
3,-signedjar SIGNED.APK: Specifies the file store path after the signature, which means that the signed.apk file name exists under the current path
4,-digestalg sha1-sigalg Md5withrsa: This is the parameter that must be added if you are the JDK 1.6 is also unaffected
5, unsigned.apk: unsigned apk path, here is unsigned.apk file under current path
6, Feelyou: Last this is alias

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.