Android keystore password change
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:
- Open cmd prompt
- Browse to the location of the keytool / set the location of keytool in the path variable under the system variables and directly go to step 3
- Run the following command:
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:
- To change the password of an alias inside a store:
keytool -keypasswd -keystore pathToKeystoreFile -alias yourAlias -keypass oldAliasPassword -storepass oldStorePassword -new newAliasPassword
- To change the password of your keystore file:
keytool -storepasswd -keystore pathToKeystoreFile -storepass oldStorePassword -new newStorePassword
PSA: Make sure to backup your keystore file first in case you accidentally introduce any typos!