I reset my Keystore password

戏子无情 提交于 2020-01-05 03:43:13

问题


I was in the in the process of singing my apk for my release and i forgot keystorepassword so i clicked reset. then I got this error.

Error:Execution failed for task ':app:packageRelease'.

com.android.ide.common.signing.KeytoolException: Failed to read key "app name" key from store "C:\keystore\keystore.jks": Keystore was tampered with, or password was incorrect

What is my best way to fix this?


回答1:


If you forgot your password, there is no way to fix this. If your application is not published to the playstore, you are free to change the sign-in cert to a new one. Otherwise you will not be able to update your app at playstore, you have to unpublish your current app, change the package name and publish a new one with a different key and package. So always try keep a backup of your cert file and password.




回答2:


It's easy to find

lost password and keyAlias

from the Android Studio itself, Make it to project then select .gradle -> select the latest version (in mine its 4.6) -> taskHistory.bin

then search for

keyAlias , keyPassword , storePassword

cheers :D you got your passowrds and keyAlias ... Happy building release APK




回答3:


On Windows, I found the keystore file path, password, key alias and key password in an earlier log report before I updated Android Studio.

From windows file explorer c:/Users/your pc name/.AndroidStudio2.0 (your android studio version)\system\log\idea.log.1 (or any old log number)

Then I searched for “password” and found this from an earlier date:

-Pandroid.injected.signing.store.file= path to your keystore 
-Pandroid.injected.signing.store.password= KEYSTORE PASSWORD
-Pandroid.injected.signing.key.alias= KEY ALIAS
-Pandroid.injected.signing.key.password= YOUR_KEY_PASSWORD



回答4:


Open the project in Android Studio. On the left pane select Project option to display all the files and folders in your project. You'll find the .gradle folder, inside that you'll find the folder with your gradle number, mine was 5.1.1

Inside that folder, you'll find the executionHistory Folder, and inside that executionHistory.bin file. Open that file in Android Studio itself.

Now search(Ctrl+f) in that file for signingConfig.keyPassword and you'll find more than 1 matches. GO THROUGH ALL OF THEM and you'll find your password after one of these matches.

PS - I'm using Android Studio 3.5

My Folder Structure

Good Luck



来源:https://stackoverflow.com/questions/43189678/i-reset-my-keystore-password

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!