如何檢視apk包的簽名信息,用以驗證是否簽名成功
1、檢視 keystore
$ keytool -list -keystore debug.keystore
結果:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
androiddebugkey, Mar 21, 2013, PrivateKeyEntry,
Certificate fingerprint (MD5): E0:F4:90:EE:CD:77:17:0E:B8:C4:AC:64:B2:F6:FC:83
2、檢視三方應用或是系統應用簽名
用winrar開啟待檢視的apk,將其中META-INF資料夾解壓出來,得到其中的CERT.RSA檔案
$ keytool -printcert -file META-INF/CERT.RSA
結果:
Owner: CN=Android Debug, O=Android, C=US
Issuer: CN=Android Debug, O=Android, C=US
Serial number: 514ab2e1
Valid from: Thu Mar 21 15:12:33 CST 2013 until: Sat Mar 14 15:12:33 CST 2043
Certificate fingerprints:
MD5: E0:F4:90:EE:CD:77:17:0E:B8:C4:AC:64:B2:F6:FC:83
SHA1: 7F:E5:11:D8:37:4F:DA:D7:75:EA:A5:8C:47:06:85:95:6D:1D:3F:2B
Signature algorithm name: SHA1withRSA
Version: 3