I would like to change the password I use in my keystore for an android app that is already available in google play and I would like to know some things before I do it:
1) If I change the keystore password, could I continue using the same keystore for my uploaded app without any issue (I need to do this, this is why I ask)
2) Does changing my alias password has the same consequences?
3) How should I use keytool?
You can change the default keystore password as follows: Change the keystore password in the keystore using the following command: $ keytool -storepasswd -keystore /path/to/security/keystore. jceks -storetype JCEKS -storepass 'changeit' -new 'newPassword'
bin file in android studio itself. Search for ". storePassword" .. That's it you got your keystore password.
From the logs: If you have your logs intact, then you can find the password in the Android Studio log files: Go to ~/Library/Logs -> AndroidStudio ->idea. log.
Keystore is a binary file that contains a set of private keys. Private key represents the entity to be identified with the app, such as a person or a company. So Keystore password is used to open a keystore and simple password is password of private entity stored in keystore file..!!
If you are using the same keystore for signing your application before pushing it to the play store, it should be fine.
Changing Keystore's password or alias password doesn't affect the way it is used to generate the signed apk.
In order to update the password using keytool:
keytool -keypass "previous password" -new "new password" -keystore "keystore location"
Security Note
As mentioned in vlz's comment below.
You should not include your password in the command because it'll be written to your command history (~/.bash_history).
Instead, you can use the below command (safely prompt for a password):keytool -storepasswd -keystore "keystore location"
Recovery plan
Make sure to backup your keystore file first.
The usage of keytool
might have changed in the past years. What worked for me was:
keytool -keypasswd -keystore pathToKeystoreFile -alias yourAlias -keypass oldAliasPassword -storepass oldStorePassword -new newAliasPassword
keytool -storepasswd -keystore pathToKeystoreFile -storepass oldStorePassword -new newStorePassword
PSA: Make sure to backup your keystore file first in case you accidentally introduce any typos!
We don't want to type the password as part of the command to avoid to store it in the shell history.
# Change the key password
keytool -keypasswd -alias "your_key_alias" -keystore "key_filename.key"
# Change the keystore password
keytool -storepasswd -keystore "key_filename.key"
I could change password as below:
keytool -keypasswd -alias "key alias" -keypass "previous password" -new "new password" -keystore "/../.android/debug.keystore"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With