Android modifies default KeyStore signature file when using Eclipse development

Source: Internet
Author: User

When you use Eclipse for Android project development, because each project group has its own signature, the default Eclipse ADT Debug run uses a temporary generated debug certificate, which defaults to C:\Users\XXX\.android\ Debug.keystore.

Each time the debugger has to use ADT's export signed application package to play with the duly signed packages, or to write another re-signing script, it is more troublesome.


Later found ADT allows custom debug with a certificate in Window->preferences->android->build->custom debug KeyStore here

Try it. Prompt after selecting official certificate: "Keystore is tampered with, or password is incorrect"


In fact, this interface does not provide input keystore password, choose Alias and so on, so it is very strange, looked at the official documents found that even the custom debug certificate, you also need to guarantee the same password as the default certificate, alias aliases and alias password.


The default certificate information that is mentioned in the documentation is as follows:


Keystore Name: "Debug.keystore"

Keystore Password: "Android"
Key alias: "Androiddebugkey"
Key Password: "Android"
CN: "Cn=android debug,o=android,c=us"


By following this rule, you can use a custom debug certificate. But think about the feeling that this function is very chicken, I hope the future version of ADT will improve it.

Then, we can change the password, alias and alias password of the signed file of the project according to the Android default certificate specification. Then set "Custom Debug KeyStore" to the modified signature file.


The following are the steps:

1. First of all, of course, first copy a formal certificate as the temporary debug certificate to be modified.


2. Modify the command for the KeyStore password (keytool is the command-line tool for the JDK):


keytool-storepasswd-keystore my.keystore


Where My.keystore is a copy of the certificate file, after execution will prompt for the certificate when The previous password, and the new password and repeat the new password confirmation . This step requires changing the password to Android.


3. Modify the alias of KeyStore:


Keytool-changealias-keystore My.keysTore-alias My_name-destalias Androiddebugkey


in this step, My_name is the certificate in the current alias,-destalias specified is to be modified to the alias, here according to the rules, Change to androiddebugkey! This command will prompt you to enter the KeyStore password and the current alias password.


4. Modify alias's password:


Keytool-keypasswd-keystore my.keystore-alias Androiddebugkey


This step will prompt you to enter Ke Ystore SecretCode, alias password, and then prompt to enter the new alias password, similarly, according to the rules, change to android!

This article is from "Xiao Ming's Code Road" blog, please be sure to keep this source http://798056674.blog.51cto.com/9862415/1760885

Android modifies default KeyStore signature file when using Eclipse development

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.