For some reason, to re-sign unsigned apk, need to use the Jarsigner tool, but after signing, APK cannot install, baffled. Finally found a solution, now share to everyone:
When signing, add 2 parameters:
Copy Code code as follows:
-digestalg Sha1-sigalg Md5withrsa
The initial estimate of the problem with the JDK version is the cause of the inability to sign the error. JDK 1.6 signatures are fine, but 1.7 will have this problem.
The complete signature command is as follows:
Copy Code code as follows:
Jarsigner-verbose-keystore feelyou.keystore-storepass Feelyou.info-signedjar signed.apk-digestalg sha1-sigalg MD5wi Thrsa unsigned.apk feelyou
Explain:
1,-keystore feelyou.keystore: Specify the signature file that needs to be used, write file name directly in the current directory, otherwise please specify the specific path
2,-storepass Feelyou.info: Automatically enter the password, keystore password and alias password are all I used are feelyou.info
3,-signedjar SIGNED.APK: Specifies the file store path after the signature, which means that the signed.apk file name exists under the current path
4,-digestalg sha1-sigalg Md5withrsa: This is the parameter that must be added if you are the JDK 1.6 is also unaffected
5, unsigned.apk: unsigned apk path, here is unsigned.apk file under current path
6, Feelyou: Last this is alias