In the java 1.8.0 environment, perform the android apk signature operation, 1.8.0apk

Source: Internet
Author: User

In the java 1.8.0 environment, perform the android apk signature operation, 1.8.0apk

Note: The article references the signature instructions of the android developer community, but as the android developer community in China is no longer able to access it normally, record it here.

Address: http://developer.android.com/tools/publishing/app-signing.html#considerations

When developing an android application, it can be released only after it is signed. Currently, the ide developed for android applications usually comes with the signature function, for example, android studio, eclipse, and intellij idea. If you prefer to use the feature signature provided by ide, you do not need to continue reading it. The following is a manual signature tutorial for android apk. Although I do not like this method very much, the two predecessors of the company prefer to use bash scripts, for versions like this, the script is used, the command is used, the version is ready, and the shutdown is released. Therefore, the commands used below are all executed in the cygwin environment, so they are preceded by the $ symbol. [Ps: I don't like linux syntax very much. You have to remember that there are too many things .]

So far, the tutorials on android apk signature on the Internet are generally in java 1.6 or earlier versions. However, java has been updated to 1.8 and I have not installed java 1.7, upgrade java 1.6 to java 1.8 directly. The command format for generating keys and signatures between java 1.6 and java 1.8 is a bit different. version 1.6 is not covered in this article, A single search on the Internet is basically all.

1. Generate a key (ps: What is the difference between a key and a key ?)

Run $ keytool-genkeypair-v-keystore test. keystore-alias test-keyalg RSA-validity 20000.

Parameter description:

1. genkeypari: generate a key pair.

2. keystore: name of the keystore, as shown in "test. keystore ".

3. alias: the alias of the key, which must be used for signature.

4. keyalg: Key algorithm name.

5. validity: Valid days.

Run:

  

 

  

2. Verify your generated key file.

Enter the command: $ keytool-list-v-keystore test. keystore

Run:

  

 

3. Execute the signature. Because there is no ready-made apk when I write an article, I only add the executed command here.

Run $ jarsigner-verbose-sigalg SHA1withRSA-digestalg SHA1-keystore test. keystore xxx.apk test.

Parameter description:

1. in jdk 1.8, the sigalg and digestalg parameters must be included; otherwise, the signed apk package cannot be installed.

2.-keystore: The key file generated by you.

3. xxx.apk is the apk you want to sign.

4. test Is the alias of the key file.

 

My ass is sore and I am going to watch TV series. Youku has recently played "dahanxian guard zifu", which is quite similar to my taste. It is estimated that it will be half past one after watching three sets tonight.

 

 

 

 

  

  


The computer uses the android reverse assistant to sign the apk and prompts the java environment.

You lack JDK. Download and install JDK and set the environment variable. Go to the official ORACLE website to download JDK, and then go to System Properties, advanced system settings, and create three variables JAVA_HOME, CLASSPATH, and PATH under environment variables. How can I set environment variables? There are many graphic tutorials on the Internet?

Edit the SDK on your computer and sign the android apk software in a java environment.

Yes, you need Android jdk. Because the signature uses java software, the runtime environment of the java software must be available. For editing, the apktool. jar used for decompilation is also java.

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.