One, generate the. KeyStore signature File
DOS access to the JDK Bin directory
Run the following command:
Keytool-genkey-alias android-keyalg rsa-validity 20000-keystore android.keystore
Process, is there any certainty? Fill in Y, enter
(-validity 20000 represents the number of days of validity), and when the command is completed, the Android.keystore is generated in the bin directory
To view information about a signature:
Keytool-list-keystore "Android.keystore" Enter the KeyStore password you set
Second, use the. KeyStore to sign the APK
"Prerequisite" DOS entry into the JDK's Bin directory
JDK1.8 command: (JDK1.8 algorithm has changed, need to specify-SIGALG and-digestalg)
Jarsigner-verbose-sigalg sha1withrsa-digestalg sha1-keystore android.keystore my_apk_sign.apk my_apk_unsign.apk Alias_name
JDK1.6 command:
Jarsigner-verbose-keystore Android.keystore my_apk_sign.apk my_apk_unsign.apk alias_name
You can also specify some of the remaining options, such as-storepass ...
Such as:
Jarsigner.exe-verbose-keystore d:\aa\debug.keystore-storepass Android-signedjar d:\aa\gblnn_signed.apk d:\aa\gblnn _unsign.apk Androiddebugkey
JDK 1.8 to APK signature (Android)