How to get the SHA1 fingerprint certificate for release and debug in Android Studio?

There are two types of fingerprint certificates in Android, one is Debug and the other is Release. You need to sign your app in Debug mode just for testing purposes. Do not publish apps that are singed in debug mode. You need to sign your app with Release certificate before publishing. Here’s how to get the SHA1 fingerprint certificate for both Release and Debug mode in Android.

Get-SHA1-fingerprint-android
SHA1 fingerprint using command line windows

 

1. Generating the release SHA1 fingerprint certificate

  1. Before generating the release certificate, you need to first generate signed apk. You can choose the generate signed apk option from build menu in Android Studio. You may choose an existing keystore or create a new one, remember the alias name, as you might need it later. Here’s more information about generating signed apk. Generate signed APK
  2. Once you’ve generate the signed apk you can easily find out your SHA1 fingerprint using the keytool command –
  3. keytool -list -keystore keystore_path.jks. You need to run this command from the bin directory of your java installation folder. Usually it’s located at C:Program FilesJavajdk1.8.0_11bin.
  4. In the command above, you need to replace the keystore_name with the path of the keystore you had created in the first step.
  5. After you execute this command, you will be asked for you alias name, so remember the alias name that you created in the first step and input that alias name, and bingo you have for release SHA1 Fingerprint certificate.

2. Generating the debug SHA1 fingerprint certificate

  1. To generate debug SHA1 fingerprint certificate, you first need to know the location of your debug.keystore file. This file is created by automatically by Android Studio when you first build your project. The location of this file for window user is C:UsersYourUsername.android and for mac and linux user is ~/.android/
  2. Once you have the path just execute the following – 
  3. keytool -list -alias androiddebugkey -keystore C:UsersYourUsername.androiddebug.keystore
  4. Once you execute it, the terminal will ask for a password, the password is android, It won’t be visible when you type it.
  5. And now you have your debug SHA1 fingerprint certificate. Use it to test your application.

Don’t miss these tips!

We don’t spam! Read our privacy policy for more info.

Sharing is caring!

Leave a Comment

Your email address will not be published.