0

I am creating a new thread as I could not fix my problem from existing threads and googling.

I just finished my new update of one of my published apps. I tried to generate a signed apk with the same keystore I always use and ofcourse the passwords that I had save in a txt file. But when I try to sign the apk, I get an error

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

Since I am sure about the passwords, how can I fix this error? I really do not want to delete my app and make a fresh one.

Tank you in advance.

Isabel Inc
  • 1,871
  • 2
  • 21
  • 28
George
  • 177
  • 1
  • 12
  • Try restoring to a `previous version` of the `.key` file if you are running *Windows*. – CodeWalker Aug 23 '16 at 14:02
  • What do you mean a previous version? The keystore is supposed to be the same until the end of the updates. Am I wrong? By the way, how I do that? – George Aug 23 '16 at 14:04
  • It is just a work around if your .key file has encountered some malformation due to electronic shenanigans. Right click on the file and then select `Restore to a previous version` – CodeWalker Aug 23 '16 at 14:14
  • Well just tried but there are no previous versions of the file. Tried to sign again and still nothing. Am I doomed? – George Aug 23 '16 at 14:17
  • Do you have any restore points under `System Restore` ? – CodeWalker Aug 23 '16 at 14:21
  • have you tried the `-importkeystore ` for keytool command? check this http://stackoverflow.com/questions/13535424/android-keystore-stopped-working at end of question where it says **Solution (6/29/14):** good luck – Yazan Aug 23 '16 at 14:30
  • @CodeWalker i don't think System Restore saves any user data, it only save points for OS settings and so ... – Yazan Aug 23 '16 at 14:31
  • @Yazan I did not try this. But, I think it will ask for password again, correct? The problem is that every command I used in cmd, everytime asks for password and ofcourse it says password wrong. The funny think is that when I brute force the keystore, I get again the password I put. – George Aug 23 '16 at 14:35
  • yes, i know but give it a try, when you sign an app may be some other parts of the file is corrupted, so you can't, but this method might allow you to extract the key into a file, then create a new JKS with the same key, give it a try cuz if it works, it's way better than using new key and replace your app on store :) – Yazan Aug 23 '16 at 14:37
  • @Yazan Well friend, it asks for password as I said and still the error occures. Any other ideas? Thank you in advance! – George Aug 23 '16 at 14:47
  • How old is the keystore? May be it was created using an now outdated algorithm. Try if you can open it with Portecle. It tries all available algorithms and your password. – Robert Aug 23 '16 at 14:53

0 Answers0