A script that looks at the APK signature is written with the shell. The code is very small and simple.
Copy Code code as follows:
#!/bin/bash
mkdir. temp_for_certificate
CD. Temp_for_certificate
Count=0
While [-N ' $]
Todo
count=$[$count +1]
echo "(# $count)" ' BaseName ' "": "
echo ""
Path= ' jar TF ' $ | grep RSA ' #查找apk中RSA文件
Jar XF $ $path #把RSA文件解压出来
Keytool-printcert-file $path #查看指纹证书
Rm-r $path #删除之前解压的文件
echo "--------------------------------------------"
Shift
Done
Cd..
Rm-r. temp_for_certificate
(Save it to a file, named GetCertificate)
How to use:
Copy Code code as follows:
GetCertificate superuser.apk skype3.0.apk
Output:
Copy Code code as follows:
(#1) SUPERUSER.APK:
Owner: Cn=adam Shanks, Ou=android, O=soupcoconut, L=FWB, St=florida, C=us
Issuer: Cn=adam Shanks, Ou=android, O=soupcoconut, L=FWB, St=florida, C=us
Serial Number: 4c614057
Validity period: Tue Aug 20:04:39 CST 2010 to Sat Dec 20:04:39 CST 2037
Certificate fingerprint:
Md5:d2:42:30:aa:be:81:62:30:fe:b4:0e:f1:cf:11:b0:c0
sha1:5f:11:3f:c2:c2:0a:7c:9b:d9:28:19:22:6a:32:a1:90:4b:75:ef:8b
Signature Algorithm Name: Sha1withrsa
Version: 3
--------------------------------------------
(#2) SKYPE3.0.APK:
Owner: Cn=skype, Ou=mobile Client, O=skype, L=london, C=GB
Issuer: Cn=skype, Ou=mobile Client, O=skype, L=london, C=GB
Serial Number: 4c0e1962
Validity period: Tue June 18:20:18 CST 2010 to Fri 18:20:18 CST 2040
Certificate fingerprint:
Md5:37:5f:1a:56:c5:2a:51:ff:35:f3:6c:c5:a6:69:54:ec
Sha1:77:18:07:d1:b8:41:4d:69:89:e7:d8:ef:0b:97:97:24:3b:93:1f:95
Signature Algorithm Name: Sha1withrsa
Version: 3
--------------------------------------------
You can also use Jarsigner to view signatures
Copy Code code as follows:
Jarsigner-verify-verbose-certs superuser.apk
Jarsigner detailed usage details for help