keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect, Android keystore

14,152

Solution 1

  1. Obviously you are still getting the password wrong, whatever you may think.
  2. You don't need the password to get the SHA1 fingerprint. Just hit the ENTER key.

Solution 2

The Password is default : android

Solution 3

Better we use this format, it will give you much easier approach

RUN THIS

keytool -list -v -keystore D:\Shelivery\SHelivery.keystore

THEN

enter Password re-enter Password

And you will see all the possible things.

i don't like posting typical working solution where it is not necessary to invest time.

Share:
14,152
Orbit
Author by

Orbit

Updated on June 04, 2022

Comments

  • Orbit
    Orbit almost 2 years

    I'm trying to access my keystore because I need to get the SHA1 fingerprint to generate a release Google Maps Api key: google map docs

    When trying to enter my key on the command line (or copying and pasting it), I'm getting the following:

    keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect

    Now, if I go inside Android Studio and select "Generate a Signed APK", it asks for my keystore password, and if I enter it, (along with the alias and alias pass) I can click finish and it begins to build a release APK (though of course it fails because as mentioned above, I need a Google Maps release key instead of a debug one.)

    So because of that I know it has to be the correct password, and yet I'm still getting this error. Has anyone else experienced this? What is the possible cause and what is the solution?

  • Orbit
    Orbit about 8 years
    Thanks for the reply. So doing keytool -list -keystore your_keystore_name, it still asks for a password, but hitting enter on it without entering anything does print out the SHA1 fingerprint, so thats good. As to your first point, i've literally copied and pasted into Android Studio and then pasted into the command line. The wizard will begin building the signed apk, but the command line will throw the error.
  • Orbit
    Orbit about 8 years
    Part of my concern is finding issues like these: code.google.com/p/android/issues/detail?id=187532, where they mention it possibly breaking the credentials. Im not sure how that would work, and many of them suggest the command line still works for them, so im not sure whats going on.
  • user207421
    user207421 about 6 years
    The password is whatver the user has set it to.
  • user207421
    user207421 over 4 years
    @Orbit You have that back to front. The credentials are broken by not getting the password right, or the class path in that bizarre bug. Not the other way round.