如何找出哪个键被用来签署的应用程序? [英] How to find out which key was used to sign an app?

查看:131
本文介绍了如何找出哪个键被用来签署的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有签字的应用程序和几个重要的文件。 我想更新的应用程序,所以我需要找出其中关键之一是使用。 如果没有任何按键。是否有可能在主目录找到密钥文件?例如,通过内容?

I have an app which is signed and several key files. I'd like to update the app so i need to find out which one of keys was used. If none of keys. Is it possible to find in home dir a key file? For example by content?

推荐答案

首先,解压缩APK和提取文件/META-INF/ANDROID_.RSA(这个文件也可能CERT.RSA,但应该只有一个.RSA文件)。

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).

然后发出以下命令:

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

瞧!我们现在能够确定的APK也与此密钥库签署,并与别名android_key。

Voila! we can now determined the apk has been signed with this keystore, and with the alias 'android_key'.

的Keytool就是Java的一部分,所以一定要确保你的路径有Java安装目录在其中。

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

这篇关于如何找出哪个键被用来签署的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆