How to get keystore file from signed apk

给你一囗甜甜゛ 提交于 2019-12-21 17:22:04

问题


I have already signed my apk with default debug.keystore key.But unfortunately my system destroyed,Now I need to get the key store from the already signed apk.

to replace with old apk with new apk.

I have MD5,SHA fingerprints with.But i could make them as keystore to sign the apk.

Any suggestions would be appreciated.Thank you in advance.


回答1:


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 finger prints, signature algorithms and version.




回答2:


First, unzip the APK and extract the file /META-INF/ANDROID_.RSA (this file may also be CERT.RSA, but there should only be one .RSA file).

Then issue this command:

keytool -printcert -file ANDROID_.RSA

You will get certificate fingerprints like this:

 MD5:  B3:4F:BE:07:AA:78:24:DC:CA:92:36:FF:AE:8C:17:DB
 SHA1: 16:59:E7:E3:0C:AA:7A:0D:F2:0D:05:20:12:A8:85:0B:32:C5:4F:68
 Signature algorithm name: SHA1withRSA

Then use the keytool again to print out all the aliases of your signing keystore:

keytool -list -keystore my-signing-key.keystore

You will get a list of aliases and their certificate fingerprint:

android_key, Jan 23, 2010, PrivateKeyEntry, Certificate fingerprint (MD5): B3:4F:BE:07:AA:78:24:DC:CA:92:36:FF:AE:8C:17:DB Voila! we can now determined the apk has been signed with this keystore, and with the alias 'android_key'.

Keytool is part of Java, so make sure your PATH has Java installation dir in it.



来源:https://stackoverflow.com/questions/36348988/how-to-get-keystore-file-from-signed-apk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!