Elena  Kovaleva Elena Kovaleva - 1 month ago 35
Android Question

Android Studio: Keystore was tampered with, or password was incorrect

When I try to build on Android Studio a signed APK-file on another computer (not on the PC on which key was generated), the error is occurs:

Information:Gradle tasks [:app:assembleRelease]
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
......
:app:prepareComGoogleAndroidGmsPlayServicesWearable810Library UP-TO-DATE
:app:prepareReleaseDependencies
:app:packageRelease FAILED
Error:Execution failed for task ':app:packageRelease'. Failed to read key SkidkaRu from store "C:\Users\elena\keyappskidkaru.jks": Keystore was tampered with, or password was incorrect


When, I opened a Terminal window and typed in the following:

keytool -storepasswd -new [inserted password] -keystore [inserted file name]

keytool -keypasswd -alias [inserted alias] -new [inserted new key password] -keystore [inserted keystore file name]


Still, there was an error "Keystore was tampered with, or password was incorrect"

The password exactly right. The key was copied from the computer on which it was generated at the first time.

The application has already been published in the google play market, so I can not create a new keystore.

Answer

Helped up key using AndroidKeystoreBrute library with the same password and key alias. Perhaps the old key is damaged in some way , because in the path alias to it did not show up.