SHA1 fingerprint is a unique hash or can be called as the signature of your application. In the old days, we use to verify application from client-side like providing specific keys. This way of verifying the application was vulnerable. By using SHA1 fingerprint we can verify our application from the server rather than adding secrete keys inside the application. Nowadays almost all the services are using SHA1 fingerprint to verify applications. Some of them are google maps API, Firebase, Google Plus sign in, etc. In this tutorial, I will explain the types of SHA1 fingerprint and how we can create  SHA1 fingerprint in detail.

Types SHA1 fingerprint

There are two different types of SHA1 fingerprint while creating android applications. First one is debug SHA1 fingerprint and other one is release SHA1 fingerprint. In debug SHA1 fingerprint it is used while developing application. Before uploading app to playstore we have to create release SHA1 fingerprint. Now let’s create this one by one

How to create debug SHA1 fingerprint

STEP 1 : Create or open existing android studio project.

STEP 2 : Go to View -> Tools Window -> Gradle. A small Panel from the right of the screen will come out as shown below.

Obtaining SHA1 Fingerprint from Android Keystore - Gradle Window
Obtaining SHA1 Fingerprint from Android Keystore – Gradle Window

STEP 3: Now inside the Gradle window go to your app name -> Tasks -> android. Double click on singingReport to run this script a small window at the bottom will come and execute a task after executing you will see the output as shown below.

Obtaining SHA1 Fingerprint from Android Keystore - singingReport
Obtaining SHA1 Fingerprint from Android Keystore – singingReport

STEP 4 : Inside run window click on Toggle to plain text view as shown below.

Obtaining SHA1 Fingerprint from Android Keystore - Toggle to plain text
Obtaining SHA1 Fingerprint from Android Keystore – Toggle to plain text

after you toggle to plain text view you can see debug  MD5 and SHA1 fingerprint as shown below.

Obtaining SHA1 Fingerprint from Android Keystore - plain text view
Obtaining SHA1 Fingerprint from Android Keystore – plain text view

How to create release SHA1 fingerprint

STEP 1 : Go to Build -> Generate Signed APK. Window will popup as shown below.

Obtaining SHA1 Fingerprint from Android Keystore - build signed APK
Obtaining SHA1 Fingerprint from Android Keystore – build signed APK

STEP 2: Now if you already created a Keystore file then you can provide an existing Keystore path or create a new one by clicking on  Create new button. Provide Alias, Password, and all other info as you want and create it as shown below. and click on the Next button.

Obtaining SHA1 Fingerprint from Android Keystore - create new keystore
Obtaining SHA1 Fingerprint from Android Keystore – create new keystore

STEP 3: In the next window select build type as a release and check V2 (Full APK Signature). Click finish this will start creating Signed in APK and Keystore file.

Obtaining SHA1 Fingerprint from Android Keystore - fingerprint type
Obtaining SHA1 Fingerprint from Android Keystore – fingerprint type

STEP 4: After finished creating signed APK and Keystore file right click app folder go to module setting inside config and new config provide all the info as we entered while creating signed apk as shown below.

Obtaining SHA1 Fingerprint from Android Keystore - open module setting
Obtaining SHA1 Fingerprint from Android Keystore – open module setting
Obtaining SHA1 Fingerprint from Android Keystore - create new config
Obtaining SHA1 Fingerprint from Android Keystore – create new config

STEP 5: Now again go to View -> Tools Window -> Gradle. Double click on singingReport to run this script a small window at the bottom will come and execute a task after executing you will see the output as shown below.

Obtaining SHA1 Fingerprint from Android Keystore - singingReport
Obtaining SHA1 Fingerprint from Android Keystore – singingReport

STEP 6 : Inside run window click on Toggle to plain text view as shown below.

Obtaining SHA1 Fingerprint from Android Keystore - Toggle to plain text
Obtaining SHA1 Fingerprint from Android Keystore – Toggle to plain text

after you toggle to plain text view you can see release MD5 and SHA1 fingerprint as shown below.

Obtaining SHA1 Fingerprint from Android Keystore - plain text window
Obtaining SHA1 Fingerprint from Android Keystore – plain text window

If you still have any queries, please post them in the comments section below, I will be happy to help you.

Author

Hello there, My name is Amardeep founder of loopwiki.com. I have experience in many technologies like Android, Java, Php, etc. In this variety of technologies, I love Android App Development. If you have any idea and you want me to develop for you then let's have chat Conatct

Write A Comment