ERROR: Failed to read key from storage: ... Cannot restore key in Android Studio when creating a signed APK

I am trying to create release apk for my new game. Despite the fact that I updated one of my applications in just 3 days, keystore had no problems at all. I am absolutely sure that I remember my passwords correctly. Because when I give the wrong passwords, it says that your password or username is incorrect.

That's what I'm doing:

enter image description here

And here is what I get:

enter image description here

Please help me, what am I doing wrong here? Android Studio updated 2 days ago. Do you think this will cause this problem? What should I do? Any help would be greatly appreciated ...

I really read this Android Studio post : I can’t restore the key before posting this question. I tried to do as he showed in his answer, although I came across this hint: "invalid file or invalid password." Now that I know that the password is absolutely correct. I'm afraid I will never be able to update my applications again.

+5
source share
2 answers

I recommend that you launch a smart word list attack on an alias password using this tool here:

http://maxcamillo.imtqy.com/android-keystore-password-recover/

  • Download the JAR file for this project using the URL above.

  • Create a text file called wordlist.txt with the words and lines that make up your password, in the order in which you think they appear. Put each line that you think is part of your password on a separate line. Do not leave blank lines between each line. You may need to work with wordlist.txt several times in this process to crack the password. You can also try all the options for what you think is your password that you can think of.

  • Save the wordlist.txt file in the same folder as the JAR file.

  • At the command prompt, change to the directory containing the wordlist.txt file and the JAR.

  • At the command prompt, type: java -jar AndroidKeystoreBrute_v1.06.jar -k "full path to your keystore.jks" -d wordlist.txt to view the available options. You can try and use different options than what I used in my testing.

  • Run java -jar AndroidKeystoreBrute_v1.06.jar -m 3 -k "full path to your keystore.jks" -d wordlist.txt

The -m parameter specifies the method used to crack the password: 1 = brute force attack (may take weeks, months or longer) 2 = dictionary attack (your password should be in the dictionary) 3 = attack of the smart word list (lines you specify in the wordlist .txt)

I tested this for my alias password many times and with many different options in wordlist.txt, and it either cracked my password in less than 1 second or didn't find the password at all. Since you think your alias password matches your keystore password, this procedure should help you find both passwords.

Of course, I know my password, so I knew which lines to put into it would work. But since you are pretty sure that you remember your password, a smart word list attack should quickly find your password if it is in fact a close change of what you remember.

Good luck

In the future, you can save your password in the password manager and always copy and paste passwords. Human memory is great for remembering general ideas and completely unreliable for remembering exact objects or details.

+1
source

After some R&D I got a solution

that your "key storage password" and your "key password" must be the same.

0
source

Source: https://habr.com/ru/post/1240762/


All Articles