Fixing java.io.IOException: keystore password was incorrect

When trying to generate or view your Android keystores with a command like keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
, it is common to encounter the following error
keytool error: java.io.IOException: keystore password was incorrect
java.io.IOException: keystore password was incorrect
at java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2097)
at java.base/sun.security.util.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:228)
at java.base/java.security.KeyStore.load(KeyStore.java:1500)
at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:1102)
at java.base/sun.security.tools.keytool.Main.run(Main.java:419)
at java.base/sun.security.tools.keytool.Main.main(Main.java:412)
Caused by: java.security.UnrecoverableKeyException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
... 6 more
The fix: Use the Default Password "android
"
That's it! Just use the correct default password of android
and you should be good to go!