0

I had created new keystore with the existing keystore file because I had forgotten the password. But play store is not accepting my keystore file because the new keystore file is using different SHA-1. Is there any way to recover it?

Sonam Pasi
  • 522
  • 4
  • 18
  • 1
    Possible duplicate of [Forgot Keystore password, thinking of Brute-Force detection. will it corrupt the keystore?](https://stackoverflow.com/questions/6149530/forgot-keystore-password-thinking-of-brute-force-detection-will-it-corrupt-the) – Haem Oct 30 '17 at 17:01
  • 1
    Also see [this question](https://stackoverflow.com/questions/18701932/how-can-i-retrieve-a-saved-keystore-password-from-android-studio) – Haem Oct 30 '17 at 17:08
  • I had created a new keystore by using the exixting one. So the problem is not finding out the password. Google play is not accepting my new apk because the new SHA-1 certificate is not matching with the old certificate. – Sonam Pasi Oct 30 '17 at 17:12
  • It will not accept the new keystore because of the new SHA-1 fingerprint. You cannot update your existing app with a different keystore. You either need to figure out the password for the old keystore, brute force it (might take decades depending on your original password's length), or upload a new app with a new package name using the new keystore. – Gergely Kőrössy Oct 30 '17 at 19:00

1 Answers1

0

I run this command for my newly created keystore( with the existing keystore file).

keytool -list -keystore C:\Users\AndroidStudioProjects\keystore.jks

then I got all alias with SHA-1 for the keystore file.

Enter keystore password:

Keystore type: JKS Keystore provider: SUN

Your keystore contains 3 entries

newkey, Oct 30, 2017, PrivateKeyEntry, Certificate fingerprint (SHA1): R5:55:9V:12:5B:91:4C:01:92:D0:21:AE:A7:78:E7:9B:F3:80:8C:89 key1, Sep 6, 2017, PrivateKeyEntry, Certificate fingerprint (SHA1): 0C:1A:B7:EE:32:B7:AF:MD:14:12:D9:44:3A:02:C6:B6:58:30:AA:E3 appkey, Oct 30, 2017, PrivateKeyEntry, Certificate fingerprint (SHA1): 14:DB:9F:C4:00:D1:C3:34:81:A0:EE:27:8E:24:4E:68:45:AF:BM:50

So, now I have all the alias with their Certificate fingerprints (SHA1). My app was signed list time on Sep 6. But the problem was the password which I also have forgotten.

Thanks to this answer. As I am a window user I navigated through AndroidStudio>system>log>idea. I searched in idea file created on Sep 6. Here I found the password as well as alias. After that, I generated my signed APK with the alias and password.

Successfully updated my APK on google play!!

Sonam Pasi
  • 522
  • 4
  • 18