Android keystore stopped working
Solution 1:
I may have had the same problem. I never did figure out why it was failing (though I wonder if it was because the keystore password was shorter than 6 digits), but I was able to copy my key into a new keystore, which I then renamed to replace the old one, and it mysteriously worked after that (using the new passwords). Needed the key password, by the way. Working off https://security.stackexchange.com/a/3795, I did the following:
keytool -importkeystore -srckeystore old.keystore -destkeystore new.keystore -v
- Entered the new keystore password twice
- Hit Enter when it asked me for the source keystore password (left it blank)
- Entered the key password
After double-checking that the new one worked, I just copied it over the old one. Hope it works for you; good luck.
Solution 2:
I had the same problem and I tried everything that is suggested in this thread but nothing was able to save my alias password. The point is that I was absolutely sure about the password, since I had updated the app four times already. I was getting the "Keystore was tampered with, or password was incorrect" message.
The solution
It appears that at the creation of the keystore using eclipse, a space character was added in front of the password!
This nasty bug was apparently fixed at a later version rendering me unable to sign my app with the password I thought was the correct one.
Based on this SO link: Ant fails to build signed apk after updating to android v20 I would suggest that you try adding a space character before of after your password.
Solution 3:
Try to remove .metadata folder in your workspace and clear all temp folders. If your keystore file isn't damaged and you have tried to reinstall Eclipse, ADT, Android SDK and Java SDK correctly, I don't see other possibly causes for this strange issue excluding .metadata cache files and\or some temp corruption.
Another suggestion
Try to use Portecle an utility for managing and examining keystores, keys, certificates, certificate requests, certificate revocation lists etc.
Solution 4:
I will suggest couple of more heat and trials.
Have patience to apply these,
Steps:
- Untick the build automatically (Project-> Build Automatically) in eclipse and clean your project.
- Build it again.(Right Click on the project+Build Project)
- Export Project.
- Select Android Export.(auto aligned for you)
- Choose your key. provide the password. alias should come in the list.(Be sure about the caps lock). Sometimes we give correct password but due to caps it always fails ;)
- Let me know if it works for you.
Hopes this will help you.