Lost keystore alias but have file and password used for alias

waronin3D picture waronin3D · Nov 21, 2013 · Viewed 19.9k times · Source

recently I added a new alias to my keystore to sign my app.

Now I lost the new generated file with the alias, but remember the password and the alias name and have an older copy the file. Is there a way to recreate the alias using this things?

Answer

mah picture mah · Nov 21, 2013

You can list the contents of your keystore with the command:

keytool -list -keystore <name of keystore file>

To do this, you will need to provide the keystore password (not the alias password). This will tell you the aliases in the file, which are self-contained, allowing you to sign. If you wish, you could also extract keys using other options / tools.