1. Useful Links
- Signed Document: Http://android-dls.com/wiki/index.php?title=Generating_Keys
- Summary of others ' signature: http://www.cnblogs.com/wanqieddy/p/3556060.html
2. Role of signature (1) The Android system requires that all programs are digitally signed to be installed,if no digital signature is available, the system will not install and run the program。 (2) 3. Step Method 1: Use Keytool and Jarsigner signatures (these two files are in the JRE package) (1) Generate KeyStore using Keytool
Keytool-genkeypair-keystore keystorename-storepass keystorepassword-keyalg rsa-validity $ ((+ * 365))-alias Keyalias -keysize 2048-dname "Cn=j Random Hacker, O=hackerco, L=anytown, St=anystate, C=us"
(2) Use Jarsigner to package apk according to KeyStore
- Signing an unsigned apk: Jarsigner-verbose-keystore keystorename apkfilename Keyalias
- Signature of an already signed apk: Jarsigner-verbose-keystore keystorename-signedjar signedapkfilename apkfilename Keyalias
(3) Check if the APK is signed: Jarsigner-verify-verbose-certs Apkfilename Method 2: Signing with signapk signapk download: http://android.pocitac.com/ download/old/tutorials/
(1) using OpenSSL to generate signature files
OpenSSL genrsa-out key.pem 1024openssl req-new-key key.pem-out request.pemopenssl x509-req-days 9999-in Request.pem -signkey key.pem-out certificate.pemopenssl pkcs8-topk8-outform der-in key.pem-inform pem-out key.pk8-nocrypt
(2) using signapk to sign apk
Java-jar Signapk.jar Certificate.pem key.pk8 application.apk application_signed.apk
Android APK Signature