How do I go about getting the details of the certificate an apk was signed with. I have a bunch of apks signed with different certificates and I am trying to group them based on their certificate.
I can get the certificate expiry details using the jarsigner and complete my task but I was curious if I can get any more details or extract the public key ( I believe it stored in META-INF/cert.RSA but it's not readable )
Drag an APK or app bundle into the Editor window of Android Studio. Switch to the Project perspective in the Project window and then double-click the APK in the default build/output/apks/ directory. Select Build > Analyze APK in the menu bar and then select your APK or app bundle.
RSA" file under "./META-INF" folder for an Android application. To my understanding, "CERT. RSA" is used to verify the signiture of "CERT. SF" file under the same directory. It should consist of the certificate meta info (subject, issuer, Series number, etc.), the signature of "CERT.
Try the following:
openssl pkcs7 -inform DER -in CERT.RSA -noout -print_certs -text
unzip -p Name-of-apk.apk META-INF/CERT.RSA | keytool -printcert
is what I used .
It produces information such as the owner, issuer, serial number, valid through, certificate fingerprints, signature algorithms and version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With