How to retrieve Key Alias and Key Password for sig

2020-01-27 09:44发布

I have an android app currently published in Google Play which I update periodically. I follow the following process to sign the app before a new push:

Press right-mouse on the project, the 'Android tools' -> export signed application package Provide keystore password Sign your app Upload the apk file into Google Play Developer Console

Recently I have imported the project from Eclipse to Android Studio and continued working on Android Studio. Now I am planning to push a fix in the app. I have figured that I have this option to sign apk in android studio

Build -> Generate Signed apk ->enter image description here

As per my understanding, for my android app I have to use the same key store and key store password which I used earlier to push updates into Google Play. Also here it's asking for Key Alias and Key Password. I don't remember the Key Alias and Key password(number 4 input in the image) while signing apk in Eclipse. Any suggestion what can I do now? If I already know my keystore and keystore password, is there an way to retrieve the key alias and alias key password?

Update: Now I can retrieve my key alias through keytool -list -v -keystore name.keystore command

18条回答
别忘想泡老子
2楼-- · 2020-01-27 10:34

Android Studio 3.0 below working method:
Find your old zipped project.
If you have built the apk, you'll find the password in file:

Project\.gradle\2.14.1\taskArtifacts\taskArtifacts.bin

Pandroid.injected.signing.store.password=password

If you don't have zipped project, search your git repositories if you have .gradle folder pushed or not.
Otherwise you'll have to recover files and search files by content "Pandroid.injected.signing.store.password".

查看更多
霸刀☆藐视天下
3楼-- · 2020-01-27 10:35

In windows - Just open your keystore file in notepad, and on very first line - you can see your alias written in English letter.

查看更多
孤傲高冷的网名
4楼-- · 2020-01-27 10:38

If looking in the logs doesn't help, you can also try to brute-force the password - check method 3 on this post - Android KeyStore Password Recover.

This SO post has more answers as well.

查看更多
虎瘦雄心在
5楼-- · 2020-01-27 10:38

Just open the key file (.jks file) with notepad++ .You will get the alias name in the first line...

查看更多
smile是对你的礼貌
6楼-- · 2020-01-27 10:44

I have found my key password in below path

Project\.gradle\2.14.1\taskArtifacts\taskArtifacts.bin open the file and search with the part of the password that you remember. You will found it definitely.

Also, You can refer this answer stackoverflow.com/a/43007357/7089151

查看更多
Anthone
7楼-- · 2020-01-27 10:44

You can find your keystore details without using password as following way.

Execute the command (keytool -list -keystore <path>) in command prompt

You can find the Keytool in java folder in my machine I could find form the following path

C:\Program Files (x86)\Java\jdk1.7.0_71\bin> keytool -list -keystore C:\<YourKeystore>.Keystore

Then it will ask you to enter the password, Here you don't need to enter the password instead of that press up arrow button and enter it. then the same details will be display with warning message as below.

***************** WARNING WARNING WARNING *****************

  • The integrity of the information stored in your keystore *

  • has NOT been verified! In order to verify its integrity, *

  • you must provide your keystore password. *

***************** WARNING WARNING WARNING *****************

Keystore type: JKS Keystore provider: SUN

Your keystore contains 1 entry

samplekey, Apr 26, 2017, PrivateKeyEntry, Certificate fingerprint (SHA1): XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX

查看更多
登录 后发表回答