I'll teach you to sign apk two times.

Source: Internet
Author: User
Tags sha1

Hello Everyone, just started to write a blog, write a bad place please forgive me. It's a record of your work.

due to the recent use of the project, Bang Bang security reinforcement, after the completion of the need for the APK two times signature.

Bang Bang security provided by the signature software do not know is not the cause of the environment, in my place, can only use the command to sign!

First, sign the certificate (note: You can use KeyStore to generate one, you can use the direct copy out of studio) and the APK file to be signed together with the Java JDK in the bin directory,-– My directory is D:\Java\bin, I just copied it directly from studio, and I used it.

Note: Quickly open a command window: Hold down Shift-click in the Bin directory to open the Command line window

run: jarsigner-verify echat_ydbg_3.0.5_1226_sec.apk See if APK has a signature (note: echat_ydbg_3.0.5_1226_sec.apk the name of the file you want to reinforce) will see The jar is not signed. (missing signature or unable to resolve signature), indicating missing signature.

Start signing below

1. Java jdk1.7 above run: (Note: The test is feasible.) )
: Jarsigner-digestalg sha1-sigalg md5withrsa-keystore echat.jks-storepass 123456-signedjar Echat_ydbg_3.0.5_1226_sig ned.apk echat_ydbg_3.0.5_1226_sec.apk codesign

Parameter description: Jarsigner-digestalg sha1-sigalg md5withrsa-keystore ( Note: Your signature certificate name )-storepass ( Note: Your signature certificate password )- Signedjar (Note: apk name after signature ) (Note: unsigned apk name ) ( Note: alias of signing certificate )

2. Java jdk1.6 and the following runs: (note: not personally tested.) )
: Jarsigner-verbose-keystore Echat.jks-signedjar echat_ydbg_3.0.5_1226_signed.apk echat_ydbg_3.0.5_1226_sec.apk Codesign

Next, you will be prompted to enter the password, enter your signature certificate of the password.

Parameter description: Jarsigner-verbose-keystore (Note: your signature certificate name )-signedjar (note: apk name after signing ) ( Note: unsigned apk name ) ( Note: The alias of the signing certificate )

It's OK to be here, isn't it a simple feeling? You can try it if it is useful.

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.