Obtaining SHA1 Fingerprint from Android Keystore


Photo Credit: Daniel - Android SHA1 Fingerprint

To access APIs in Android from Google API console you need to generate an API Key. This same API key can me used for accessing multiple APIs under the same project. To generate an API key you require, SHA1 fingerprint of your keystore. Keystore is basically a place where the private keys for your app are kept. In simple words its a certificate generated by user or a program, used for signing an Android  app.

In android there are two types of keystores. A debug keystore, and a release keystore. Debug keystore is generated automatically when the Android SDK is installed or run for the first time. Release keystore has to be generated manually by the user for each application before release. As it requires private information such as name, password etc. To obtain an Android SHA1 fingerprint from your desired keystore, please follow the steps below:

1) Getting Android Debug Keystore SHA1 Fingerprint:

The hard way:

  1. Open a terminal window.
  2. Change the directory to the JDK bin directory, mine was jdk1.7.0_05 (could be different for you).
  3. Next we have to run the keytool.exe. Use the following line to get the Android SHA1 fingerprint.
    Windows:

    Mac and Linux:

Android SHA1 Fingerprint

 

The easy way (Only for Eclipse IDE):

  1. Open Preferences by Navigating to Window -> Preferences.
  2. Select Android -> Build.
  3. Android SHA1 Fingerprint

2) Getting Android Release Keystore SHA1 Fingerprint:

To find out the Android SHA1 fingerprint for release keystore, follow these steps:

  1. Open terminal
  2. Change the directory to the JDK bin directory, mine was jdk1.7.0_05 (could be different for you).
  3. Next we have to run the keytool.exe. Use the following line to get the SHA1 fingerprint.

    Example:

    It will prompt for a password.
  4. Enter the password, you will get the SHA1 and MD5 fingerprint.

Android SHA1 Fingerprint

Extracting the SHA1 fingerprint from an Android keystore cannot be simpler than this. Above steps can be used on Windows, Mac and on Linux machines.

About Mohit Gupt

An android enthusiast, and an iPhone user with a keen interest in development of innovative applications.


Leave a comment

Your email address will not be published. Required fields are marked *

12 thoughts on “Obtaining SHA1 Fingerprint from Android Keystore