Search code examples
androidgoogle-playaliaskeystore

Lost keystore alias but have file and password used for alias


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?


Solution

  • 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.