Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android keystore stopped working

People also ask

Where is the keystore file in Android?

The default location is /Users/<username>/. android/debug. keystore. if you don't find there on keystore file then you could try another one step II which have mentioned it step II.

What is keystore file in Android?

The Android Keystore system lets you store cryptographic keys in a container to make it more difficult to extract from the device. Once keys are in the keystore, they can be used for cryptographic operations with the key material remaining non-exportable.


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:

  1. keytool -importkeystore -srckeystore old.keystore -destkeystore new.keystore -v
  2. Entered the new keystore password twice
  3. Hit Enter when it asked me for the source keystore password (left it blank)
  4. 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.


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.


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.


I will suggest couple of more heat and trials.

Have patience to apply these,

Steps:

  1. Untick the build automatically (Project-> Build Automatically) in eclipse and clean your project.
  2. Build it again.(Right Click on the project+Build Project)
  3. Export Project.
  4. Select Android Export.(auto aligned for you)
  5. 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 ;)
  6. Let me know if it works for you.

Hopes this will help you.