I recently gave one of my applications to another developer to work on. They where to upload updates to Google Play and therefore needed the keystore to sign the application.
Now me being naive to start with my keystore had an alias that was specific to me and not the app, it also had a password that I was using elsewhere (tut tut). So I wanted to change these so I could give this user a copy of my keystore that was specific to them.
The initial keystore has a structure like this:
Name: old.keystore Password: password123 Alias: my_name Alias Password: password456
Here’s how you’d go about it from already having your initial keystore.
- Copy your original keystore to a new location
- Change the keystore password
- Change the alias name
- Change the alias password
- Give to your new developer
Ok.. here .. we go.
Copy and Paste, thats easy! Now we have a new keystore called:
Next if we want to change the keystore password, ensure you have keytool on your path and you are in the directory of your keystore. Use the command:
keytool -storepasswd -keystore my.keystore
That’s your keystore password changed!
Next if we want to change the keystore alias password, ensure you have keytool on your path and you are in the directory of your keystore. Use the command:
keytool -keypasswd -keystore my.keystore -alias my_name
That’s your keystore alias password changed!
Next if we want to change the keystore alias, ensure you have keytool on your path and you are in the directory of your keystore. Use the command:
keytool -changealias -keystore my.keystore -alias my_name -destalias my_new_name
That’s your keystore alias changed!
If you followed all three steps your keystore now looks like this:
Name: my.keystore Password: newPassword123 Alias: my_new_name Alias Password: newPassword456
So there you go, now you can pass that keystore to the new developer knowing they can still update the application but not giving away any sensitive data about yourself!