Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Keystore was tampered with or password was incorrect

Writer Matthew Martinez

I know there are already such questions but I couldn't find any answer that could help me.

I am trying to get a Google Maps API key for which I have to have a MD5 key using this command :

keytool -list -v -alias androiddebugkey -keystore "/Users/Sachin Parashar/.android/debug.keystore" -storepass android -keypass android

but it is giving this error :

keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
java.io.IOException: Keystore was tampered with, or password was incorrect at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:780) at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56) at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:225) at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70) at java.security.KeyStore.load(KeyStore.java:1445) at sun.security.tools.keytool.Main.doCommands(Main.java:792) at sun.security.tools.keytool.Main.run(Main.java:340) at sun.security.tools.keytool.Main.main(Main.java:333)
Caused by: java.security.UnrecoverableKeyException: Password verification failed at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:778) ... 7 more

Does anyone know what's wrong with this command?

3

1 Answer

Read the stacktrace. This error is raised when your password is just wrong.

As you're dealing with the debug keystore, you can remove it and create a new one.

First, delete this file

/Users/Sachin Parashar/.android/debug.keystore

Then, run (on the same folder, i.e. /Users/Sachin Parashar/.android/)

keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

Finally, you can run what you were trying before

keytool -list -v -alias androiddebugkey -keystore "/Users/Sachin Parashar/.android/debug.keystore" -storepass android -keypass android
4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.