查询签名信息
参考:The Most Common Java Keytool Keystore Commands
# Java Keytool Commands for Checking
# If you need to check the information within a certificate, or Java
# keystore, use these commands.
# Check a stand-alone certificate
keytool -printcert -v -file mydomain.crt
# Check which certificates are in a Java keystore
keytool -list -v -keystore keystore.jks
# Check a particular keystore entry using an alias
keytool -list -v -keystore keystore.jks -alias mydomain
实际操作分 3 种情况:
- 对于 apk 包,直接使用:
keytool -list -printcert -jarfile app.apk
- 对于解压/反编译文件,在
META-INF/
下找到一个***.RSA
,然后使用命令:
keytool -printcert -v -file ***.RSA
- 对于本地的密钥库文件
****.keystore
,则可直接使用:
keytool -list -v -keystore ****.keystore -alias mydomain -storepass mypassword