Explore Courses Blog Tutorials Interview Questions
0 votes
in Java by (5.3k points)

I have a bunch of .keystore files and need to find one with specific CN and alias. Is there a way to do it with keytool, jarsigner or some other tool? I found a way to check if specific keystore was used to sign a specific apk, but I also need to get the alias and certificate name in each of the files.

1 Answer

0 votes
by (9.5k points)

I think you can run the following command to list the content of your keystore file

keytool -v -list -keystore .keystore

If you are looking for a specific alias, you can also specify it in the command:

keytool -list -keystore .keystore -alias foo

If the alias is not found, it will display an exception:

Browse Categories