android - test if a specific key was used to sign an .apk file -
i have .key file , signed .apk file (android phongap application built using phonegap build).
how can check if .apk signed using key?
you retrieve , compare fingerprints of public keys included in apk file , key file.
for apk:
- unpack file
/meta-inf/cert.rsa
apk. - use
keytool -printcert -file cert.rsa
compute sha1 + md5 fingerprints.
for key file:
- run
keytool -list -v -keystore <keystore file> -alias <key alias>
. - input keystore password.
- this output sha1 + md5 fingerprints. if omit
-v
md5 fingerprint printed.
Comments
Post a Comment