-4

I was working with androidstudio where I was making a release (signed) apk build and it gave me an error message Keystore was tampered with, or password was incorrect. The file worked in the past so I grabbed a known-good backup of the file and placed it back in the original path (exactly the same filename and location as where I took it from), and still had no luck.

I tried all the possible solutions I found, and none of them worked.

2 Answers2

0

I finally solved this by using keytool to transfer the key into a new keystore:

keytool -importkeystore -srckeystore <problematic>.jks -destkeystore new.jks

And when asked for a password for the old keystore (NOT the private key, which you must enter), I left it blank, and ignore the warning about it not being verified.

0

Firstly, you need to transfer the keystore to a new keystore using the fllowing commands:

keytool -importkeystore -deststorepass password -destkeystore .keystore -srckeystore platform.p12 -srcstoretype PKCS12 -srcstorepass android

keytool -list -v -keystore .keystore