APK signature for your Android app

Source: Internet
Author: User

The APK signature must first contain a keystore signature file.

The keystore is generated by the built-in JDK tool keytool.
Start-> Run-> cmd-> Cd to JDK Directory D: \ Java \ jdk1.7.0 _ 01 \ bin
(You can also add the JDK bin path to the environment variable so that keytool can be used anywhere)
Then enter:

Keytool-genkey- Alias Yourtion. Key-keyalg RSA-validity 20000-keystore yourtion. keystore
-Alias is followed by the alias yourtion. Key.

-Keyalg is the encryption method. Here it is RSA.
-Validity is valid. The value is 20000.
-Keystore is the name of the keystore to be generated. Here is yourtion. keystore.

Press ENTER
Press enter and you will be prompted to enter the password: remember what to use for signature.
Then confirm your password.
You will be asked to enter the name, organization unit, organization name, city area, Province name, and countryCode.


After running, you can find the generated keystore file in D: \ Java \ jdk1.7.0 _ 01 \ bin.

Next, sign the APK.
The command used is jarsigner under JDK bin.
Now, run the following command to sign the APK:

Jarsigner-verbose-keystore yourtion. keystore-signedjar yourtion_signed.apk yourtion.apk yourtion. Key

-Keystore: the name of the keystore.

Yourtion_signed.apk is the named APK

Yourtion.apk is the APK before the signature

Press enter to enter the password you just set. Press enter to start signing.

Note: Sometimes the signature will fail, because you may use the APK built by eclipse that has been signed by default, so please re-use the unsign APK.
Right-click Project> Android tools> export unsigned application package...

After running successfully, a signed APK file will be added to the D: \ Java \ jdk1.7.0 _ 01 \ bin directory.

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.