If an APK uses a key signature, the file with the other key signature cannot be installed or overwrite the old version at the time of release, which can prevent your installed application from being overwritten or replaced by malicious third parties, this is useful.
Currently, Google's attitude and strategy in the Android system are both non-profit-oriented and essentially different from Symbian signatures, the APK file installed from the development environment to the mobile phone using the eclipse + ADT plug-in already contains the debug signature file of the ADT plug-in, so it is not installed, however, the final version must be signed by its own key.
Keystore generated by Android
First, we need a keystore. If you already have one, you don't need this step:
CMD:
Go to the bin directory of JDK. In this way, the android. keystore file will be generated under this directory. We need this file when signing.
C: \ Program Files \ Java \ jdk1.6.0 _ 10 \ bin> keytool-genkey-alias Android. keystore-keyalg RSA-validity 20000-keystore Android. keystore
Enter the keystore password:
Enter the new password again:
What is your first name and last name?
[UNKNOWN]: qiaoling what is the name of your organization?
[UNKNOWN]: www.chinaandroid.com
What is your organization name?
[UNKNOWN]: www.chinaandroid.com
What is the name of your city or region?
[UNKNOWN]: Haidian
What is the name of your state or province?
[UNKNOWN]: BJ
What is the two-letter country code for this unit?
[UNKNOWN]: 86
CN = qiaoling, ou = www.chinaandroid.com, O = www.chinaandroid.com, L = Haidian, St = BJ, c = 86 correct?
[No]: Y
Enter the primary password of <Android. keystore> (if the password is the same as that of keystore, press Enter ):
Here, the parameter-validity indicates the number of days valid for the certificate. Here we write a maximum of 10000 days. In addition, the password is not displayed again (even if the password is lost), and the tables are all in the password. This password is required when you sign the .apk file.
Then sign:
In eclipse, right-click the project to be signed --> Android tools --> export signed application package...
The following dialog box appears. Select the project to be signed.
Next, select the location and password of the android. keystore file generated above
Next
Next, select the location and name of the file generated by the signature
Finish, get it done...