deczaloth
deczaloth

Reputation: 7485

How to handle 'Keystore was tampered with or password was incorrect' in visual studio

While trying to sign a new version of a published App via Visual Studio (V16.6.2) i got the error

Keystore was tampered with, or password was incorrect

which was a huge surprise for me since i was quite sure of my password.

What could be the problem?

Upvotes: 5

Views: 5072

Answers (3)

Mr. Onion
Mr. Onion

Reputation: 111

In my case, i had a "\" symbol in my password. Escaping it like so - "\\" did the trick

Upvotes: 2

Ângelo Polotto
Ângelo Polotto

Reputation: 9531

I get that problem and It's really annoying the lack of information of what happening. I solved with following steps:

  1. creating the APK archive in Visul Studio;
  2. Sign the APK with an amazing tool called uber-apk-signer (https://github.com/patrickfav/uber-apk-signer)

Upvotes: 1

deczaloth
deczaloth

Reputation: 7485

After hours of trying different variations of the password i gave a try to a password-recover tool (suggested in a post in Medium) just to find out that the password i was sure about was actually the right one. Yet, the password kept being rejected by Visual Studio, so i did some research and i came to a thread in github where the main post states

Password have the next symbols: @ ^ ] $

then i thought, "ok, my password also has a special symbol: '%'", so, after being sure my password was correct, i opened the adb Command Prompt in Visual Studio

enter image description here

and used keytool command to change both Key Password and Keystore Password (those passwords are the same for keystores created in old Visual Studio versions!):

keytool.exe -keypasswd -alias myalias -keystore "pathtokeystore"
keytool.exe -storepasswd -alias myalias -keystore "pathtokeystore"

By doing so, i changed both passwords (same character combination for both again, so i only have to remember one!), but now without special characters.

Voilà! Now i could sign my app...

Upvotes: 5

Related Questions