SHA-1 fingerprint of keystore certificate
Asked Answered
I

48

645

Is the method for getting an SHA-1 fingerprint the same as the method of getting the fingerprint? Previously, I was running this command:

Windows Command Prompt running keytool.exe

It's not clear to me if the result I'm getting is the SHA-1 fingerprint. Can somebody clarify this?

Iraidairan answered 31/3, 2013 at 8:55 Comment(4)
Hope this link will help you. #12214967Androclinium
Easiest way to Get SHA-1 For Release and Debug mode android studio gradle. Check thisPernicious
run this command in your terminal: keytool -exportcert -list -v \ -alias androiddebugkey -keystore ~/.android/debug.keystore. It will ask for your keystore password. which you can find from the file named "debug.keystore.properties" in the android/keystore folderDedicate
youtube.com/watch?v=CPAxGzZ4pi8Cloudy
I
1234

Follow this tutorial for creating SHA1 fingerprint for Google Map v2

For Debug mode:

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android 

for Release mode:

keytool -list -v -keystore {keystore_name} -alias {alias_name}

example:

keytool -list -v -keystore C:\Users\MG\Desktop\test.jks -alias test

On windows, when keytool command is not found, Go to your installed JDK Directory e.g. <YourJDKPath>\Java\jdk1.8.0_231\bin\, open command line and try the above commands for debug/release mode.

Another way of getting your SHA1 OR SHA-256 use ./gradlew signingReport

For more detailed info visit Using Gradle's Signing Report

Insight answered 31/3, 2013 at 8:59 Comment(12)
~/ is your home directory in *nix systems. Under Windows, just use %USERPROFILE%Kakaaba
If you're writing Android apps on Xamarin, use this: keytool -list -v -keystore "%USERPROFILE%\AppData\Local\Xamarin\Mono for Android/debug.keystore" -alias androiddebugkey -storepass android -keypass androidKakaaba
how to get release sha1. I am getting it from my app.jks but console.google is showing its already used.Sonnysonobuoy
$ keytool -list -v -keystore ~/.android/debug.keystore -storepass android only this also worksGroark
Look at this to get SHA-1 key using android studio. easybook4u.com/index.php/2017/08/25/…Attack
do you also know how to remove it?Brigidabrigit
your solution is working fine. why the heck, google official documentation doesnt work? coment defiined here wont execute and return error. developers.google.com/android/guides/client-authSimplism
after generating releasemode api key for sha1 for google places api for android place picker map opened and closed immediately.In log showing forbidden error 403 please help meKurbash
Give example for debug pleaseFetterlock
I just created a .bat for convenience: ??@echo off ??title SHA-1 from release keystore ??color 0a ??cd C:\Program Files\Android\Android Studio\jre ??set /p keystorePath= Set the path to the keystore here (just drag it here): ??set /p alias= Enter the keystore alias: ??echo : ??echo : ??echo : ??keytool -list -v -keystore %keystorePath% -alias %alias% ??echo : ??echo : ??echo : ??set /p cmd=Press any key to exit Create a .bat file, paste this code, replace the "??" by line breaks and change JRE path if needed.Burkle
There are archive snapshots of the tutorial referenced above.Gulgee
Just for future reference: make sure you point to ~/.android/debug.keystore file. As I already had a keystore file, I thought I should reference it or create a new one in order to make this command work properly.Cartoon
S
744

If you are using android studio use simple step

  1. Run your project
  2. Click on Gradle menu
  3. Expand Gradle Tasks tree
  4. Double click on android -> signingReport and see the magic
  5. It will tell you everything on the Run tab

enter image description here

Result Under Run Tab If Android Studio < 2.2
enter image description here

From android studio 2.2
Result will be available under Run console but use highlighted toggle button

enter image description here

Or
Second Way is
Create new project in android studio New -> Google Maps Activity

enter image description here

then open google_maps_api.xml xml file as shown in pics you will see your SHA key

enter image description here

Spleenwort answered 2/11, 2015 at 14:9 Comment(16)
My 'gradle projects' window is empty... any ideas why that might be?Trichloride
It will appear once you run the project either in emulator or on deviceSpleenwort
Yea I tried that but nothing happened. Seems as though, in my case, I had to press the 'refresh' button before anything showed up!Trichloride
For all Android devs, this is quite an easy way to find the SHA1. Nice finding man.Ambassadress
is sha1 key same for all the apps? or different for every app?Leandra
@anwar Hossain Every time you generate SHA1 It can be different every time irrespective of app. I have tried two different days it has given me differentSpleenwort
@LokeshTiwari I think on Android Studio 2.1 the signReport task is in Tasks -> androidAmbassadress
@AdnanAli Thank you for pointing out. Yes it is available in 2.2 but use Toggle button in Run Console check updated picSpleenwort
plus 1 for toggle task execution/text mode :DZima
It now appears under "Gradle Console" tab from Android studio 2.2.3Casablanca
The google Maps activity idea is the BEST. Thank youMayence
@onexf go to build variants >> change debug to releaseSpleenwort
I've followed the steps in this answer and it works great. But how to change the Gradle setting back to whatever it was so that when I click the Run button in Android Studio, it installs and runs the app on my device/emulator as it did previously?Sodomy
...solution to my Run problem here: https://mcmap.net/q/10300/-how-to-assign-run-button-in-android-studio-to-run-39-app-39 .Sodomy
It's the best solution for Android Developers who work on Windows because keytool is not works in Windows console.Studner
Works fine, thanks for this answer. However, I am curious if I can use this to get SHA1 for release key of my app. (the default is debug key)Garret
P
210

Easiest way for getting SHA1 Key in android studio both (Debug and release Mode)

  1. Open Android Studio
  2. Open Your Project
  3. Click on Gradle (From Right Side Panel, you will see Gradle Bar)
  4. Click on Refresh (Click on Refresh from Gradle Bar , you will see List Gradle scripts of your Project)
  5. Click on Your Project (Your Project Name form List)
  6. Click on Tasks/Android
  7. Double Click on signingReport (You will get SHA1 and MD5 in Run Bar)

If you are using new Android Studio it shows time to execute on top there is Toggle task execution mode click on that you will get you SHA-1 key. Check 2nd and 3rd reference images.

Check image for details enter image description hereenter image description here

Generate SHA-1 for Release Mode

1-First add keystore config in your gradle How to add config in gradle.

2-After Adding Config in gradle change build variant. enter image description here

3-Then Follow Above Procedure you will get SHA-1 for release mode.

4-Check Image. enter image description here

Pernicious answered 10/2, 2016 at 7:4 Comment(2)
How to change the location? I know how to change to a different keystore when signing, but what about the default one?Margoriemargot
very detailed answer with images, helps a lot... very easy to understand than other answers here... up-vote for the images in answerGorey
J
90

Go to your java bin directory via the cmd:

C:\Program Files\Java\jdk1.7.0_25\bin>

Now type in the below comand in your cmd:

keytool -list -v -keystore "c:\users\your_user_name\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android 
Joacima answered 9/4, 2014 at 5:50 Comment(1)
thanks I used password as "android" that solved this issueOverland
C
46

![Go to far left[![][1][1]

Please refer to the following images and get the SHA-1 key Refresh

View in console panel at bottom

Corrie answered 22/2, 2017 at 12:2 Comment(2)
Agree: best option. "Plused" one. I missed a l little bit more text information, but the main path you've shown. Thank you.Hospitable
1)You have to double click on the filename.Debra
R
45

If you are using eclipse, go to: Window->Preferences->Android->Build You will find what you are looking there.

enter image description here

Rumilly answered 27/1, 2014 at 7:57 Comment(1)
Where can I find the equivalent on Android Studio? My IDE is pointing to the wrong SHA1Margoriemargot
R
45

An easy answer. To find SH1 in the new Android Studio Version. Do these simple steps.

Step 1 Go to setting and you can also press CTRL + ALT + S

Edit

Step 2 for latest android studio including - Android Studio Electric Eel | 2022.1.1

Go to Experimental and then UnTick the option named Only include test tasks in the Gradle task list generated during Gradle Sync if it is Ticked and then press ok

Step 2 for older versions of the android studio -

Go to Experimental and then UnTick the option named Do not build Gradle task during Gradle sync if it is Ticked and then press ok

Continue

Step 3 Go to File then choose the option of Sync Project with Gradle files

Step 4 Click on Gradle on the right side of panel then Tasks then android then double click on signingReport

Then you will get the SH1 fingerprint

enter image description here

Revolutionist answered 15/6, 2021 at 9:2 Comment(2)
Thanks, This is best answer for latest android studio.Bartie
this one, yes - is a comment worth the highest possible grade. In addition to being correct, he explains everything in detail.Kassi
N
40

Run the following command to get your sha1: keytool -v -list -keystore "< debug.keystore path >"
If you do not know the path of debug.keystore, you may find your debug.keystore path by checking windows-->preferences-->android-->build

I prepared step by step tutorial to show how you can use google map android v2 on emulator(android 4.2.2)
have a look at to my blog: http://umut.tekguc.info/en/content/google-android-map-v2-step-step

Nutation answered 2/4, 2013 at 5:46 Comment(0)
M
39

I saw lots of posts about this issue, so I will keep it simple + examples.

To get the SHA1 for ClientID for Sign In with Google+ and more actions:

General Form:

keytool -list -v -keystore <your_keystore_full_path> -alias <your_alias_name>

For Debug, replace with your debug.keystore path, for Example :

keytool -list -v -keystore C:\Users\DAVID\.android\debug.keystore -alias androiddebugkey

Password: android

For Release, replace with your keystore path and alias password, for Example :

keytool -list -v -keystore C:\ProjectsData\keystore\my-release-key.keystore -alias alias_name 

Password: Your alias password.

Minnick answered 7/8, 2014 at 13:18 Comment(3)
Works great! I have included both a DEBUG and a RELEASE key in console.developer.google.com. Not sure if both are really needed. Nevertheless it works great, after spending 4 hours on this G**gle feature.Algeria
If your alias key have space like "App Moon" then add double quation "App Moon" as alias name.Julio
the best and working solution , for google clientID i needed SHA-1 in release mode , other solutions give us the SHA-1 in debug modeSoughtafter
S
35

This is step by step process of what worked for me.

First run the app then follow steps below (also shown in screenshot)

  1. click signing report
  2. open gradle console dialog
  3. it should display your SHA-1 certificate number

enter image description here

Sparling answered 27/9, 2018 at 21:0 Comment(4)
A true savior! I don't know why the SHA-1 key was different when generated from command prompt and android studio.Naamana
it shows sha1 for debug, is this same for release variant also ?Cauchy
@SanketPatel are u got the release SHA1?Microphone
nope, actually i resolved my issue so stopped searching for it @OliverCauchy
H
30

Using Google Play app signing feature & Google APIs integration in your app?

  1. If you are using Google Play App Signing, don't forget that release signing-certificate fingerprint needed for Google API credentials is not the regular upload signing keys (SHA-1) you obtain from your app by this method:

Upload signing certificate

  1. You can obtain your release SHA-1 only from App signing page of your Google Play console as shown below:-

If you use Google Play app signing, Google re-signs your app. Thats how your signing-certificate fingerprint is given by Google Play App Signing as shown below:

App Signing page - Google Play Console

Read more How to get Release SHA-1 (Signing-certificate fingerprint) if using 'Google Play app signing'

Hushaby answered 2/2, 2018 at 17:8 Comment(0)
E
27

For Android Studio 4.2 and newer version ,follows these steps to generate SHA Key . Steps are given in these pictures.

Steps:-

1) Click on the gradle. Top right on the Android Studio. As you can see in this picture.

Step1

2) Now click on icon as seen in below picture. A new searchable windows/screen will open.

SHA2

3) Now type,gradle signingreport and press Enter to start generating SHA KEY as seen in below picture.

sha3

4) Your SHA Key will generate as seen in this picture. Using these steps you can generate SHA KEY in Android Studio 4.2.

sha4

Europa answered 7/6, 2021 at 6:34 Comment(3)
got error missing keystorePhotograph
@Adnanhaider have you tried all steps carefully ? Its valid in latest version of android studio. If you are using old version then open gradle then app and then android and last click of signing reportEuropa
my bad i used release config that's why i got error. now its work fine thanksPhotograph
A
20

from a Debug Keystore we can get the SHA1 value in Eclipse. Accessing from the menu: Window -> Preferences -> Android -> Build

but it doesn´t work for a production Keystore. enter image description here

So, to get the SHA1 value from a production Keystore go to: Android Tools -> Export Signed Application Package. Follow the process for signing your apk and the SHA1 will showed as a certificate.

enter image description here

Armure answered 12/11, 2014 at 19:51 Comment(0)
H
17

keytool is a key and certificate management utility. It allows users to administer their own public/private key pairs and associated certificates for use in self-authentication (where the user authenticates himself/herself to other users/services) or data integrity and authentication services, using digital signatures.

For Windows

keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

Other

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

Authorization on Android uses a SHA1 fingerprint and package name to identify your app instead of a client ID and client secret.

enter image description here

http://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html

Herriot answered 21/7, 2016 at 6:2 Comment(0)
Y
11

Best way ever with all steps:

For Release Keystore SHA1 Key:

  1. Open Command Prompt
  2. C:\Users\hiren.patel>cd..
  3. C:\Users>cd..
  4. C:\>cd "Program Files"
  5. C:\Program Files>cd Java
  6. C:\Program Files\Java>cd jdk_version_code
  7. C:\Program Files\Java\jdk_version_code>cd bin
  8. C:\Program Files\Java\jdk_version_code\bin>keytool -list -v -keystore "D:\Hiren Data\My Root Folder\My Project Folder\keystore_title.jks" -alias my_alias_name -storepass my_store_password -keypass my_key_password

Replace below thing:

  1. jdk_version_code
  2. D:\Hiren Data\My Root Folder\My Project Folder\keystore_title.jks
  3. my_alias_name
  4. my_store_password
  5. my_key_password

Done

Yawl answered 9/2, 2016 at 4:36 Comment(0)
S
11

In Gnu/Linux

First

You need key.jks, for example in my case this file it's in folder in /Desktop/Keys

/Desktop/Keys/key.jks

Second

cd /usr/lib/jvm/java-1.7.0-openjdk-amd64

Now you need excecute this command

keytool -list -v -keystore /PATH/file.jks -alias YourAlias -storepass *** -keypass ***

remplacing this fields

-keystore
-alias
-storepass
-keypass

For example

 keytool -list -v -keystore /home/david/Desktop/Keys/key.jks -alias MyAlias -storepass 456 -keypass 123

enter image description here

Good Luck!!

Scathe answered 29/2, 2016 at 19:7 Comment(0)
K
11

on the new update just go to Android folder and type ./gradlew signingReport

Kain answered 8/1, 2022 at 12:54 Comment(0)
R
9

Step 1 : First locate your JDK's bin folder in your windows pc. See the image below.

Mine is :

C:\Program Files\Java\jdk1.8.0_131\bin

enter image description here

Step 2 : Now search for Command Prompt by typing "cmd" in windows 10 search bar. Then open Command Prompt as Administrator mode. See the image below:

enter image description here

Step 3 : Now copy this path and type it into Command Prompt

 C:\Program Files\Java\jdk1.8.0_131\bin

enter image description here

In Command Prompt :

cd C:\Program Files\Java\jdk1.8.0_131\bin

enter image description here

After pressing Enter button you will go to the bin folder.

enter image description here

Your setup is done. Now generate your SHA1 key for Release mode.

Release SHA1 Key :

keytool -list -v -keystore C:\Users\Turzo\Desktop\earninglearning.keystore -alias turzo -storepass 12345678 -keypass 12345678

enter image description here

Reynoso answered 12/6, 2020 at 11:16 Comment(1)
Screenshots were quite helpfulBazemore
M
8

First there is same .jar file that in fb-sdk android-support-v4.jar.
Then generate SHA1 key using:

PackageInfo info;
try {

    info = getPackageManager().getPackageInfo(
        "com.example.worldmission", PackageManager.GET_SIGNATURES);

    for (Signature signature : info.signatures) {
        MessageDigest md;
        md = MessageDigest.getInstance("SHA");
        md.update(signature.toByteArray());
        String something = new String(Base64.encode(md.digest(), 0));
        Log.e("Hash key", something);
        System.out.println("Hash key" + something);
    }

} catch (NameNotFoundException e1) {
    Log.e("name not found", e1.toString());
} catch (NoSuchAlgorithmException e) {
    Log.e("no such an algorithm", e.toString());
} catch (Exception e) {
    Log.e("exception", e.toString());
}
Moores answered 28/1, 2014 at 12:35 Comment(1)
Nothing to do with certificates whatsoever.Stenson
D
8

If you are using Android Studio IDE then you can get SHA1 has value for your all build variants with one click.

Under Gradle Projects Window > Select Root Project > signingReport > double click

File Navigation

Next

Open Run Window

Go To Variant: release for release

Go To Variant: debug for debug

Darla answered 14/7, 2016 at 8:40 Comment(2)
I do it but i dont got the SHA for release !Microphone
Please make sure you have added sign in credential in the sign in configuration under release block in gradle. Otherwise it wont show release sha keyDarla
E
8

enter image description here

Right side Gradle --> signing project get all keys

Eternity answered 24/5, 2019 at 7:8 Comment(0)
B
7

Open Command Prompt in Windows and go to the following folder .

C:\Program Files\Java\jdk1.7.0_05\bin

Use commands cd <next directory name> to change directory to next. Use command cd .. to change directory to the Prev

Now type the following command as it is :

keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
Birdman answered 8/2, 2017 at 8:4 Comment(1)
After battling with this issue for SEVERAL hours, your answer saved my app's life. THANKS!!!!Wales
R
7

//the simplest way to get SHA1

//add following command to your terminal and hit enter

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android 
Rheumy answered 20/5, 2017 at 5:35 Comment(0)
R
6

You can get MD5 and SHA1 fingerprint for any workspace by going to Window>Preference>Android>Build in Eclipse.

Rennold answered 3/8, 2014 at 15:6 Comment(1)
this will do the job instead of going through the hassle of exporting and using CMDPfosi
E
6

In Addition to Lokesh Tiwar's answer

For release builds add the following in the gradle:

android {

defaultConfig{
//Goes here
}

    signingConfigs {
        release {
            storeFile file("PATH TO THE KEY_STORE FILE")
            storePassword "PASSWORD"
            keyAlias "ALIAS_NAME"
            keyPassword "KEY_PASSWORD"
        }
    }
buildTypes {
        release {
            zipAlignEnabled true
            minifyEnabled false
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

Now running the signingReport as in Lokesh's Answer would show the SHA 1 and MD5 keys for the release builds as well.

Sample

Exarch answered 30/12, 2017 at 7:25 Comment(1)
you are the boss!! :)Till
S
6

This solution is for android studio 3.5 version:

  1. Open your project into Android studio.
  2. Click on Gradle tab on right side.
  3. Will see two things one is our project(root) and just app.
  4. Select our project in your case it might be your app.
  5. Right click on the project and refresh it.
  6. Then click on the the project drop don button.
  7. Click on the Tasks where will see android folder.
  8. Double Click on signingReport and will see the details in Run console.
Shirley answered 28/3, 2020 at 7:50 Comment(0)
S
5

If you are using android studio use simple steps:

  • Run your project

  • Click on Gradle menu

  • Expand Gradle task tree

  • Click on android-> signingReport

enter image description here If there is nothing displayed(android studio 2.2) then

Click on Toggle tasks execution/text mode from Run bar

Sakti answered 15/11, 2016 at 11:33 Comment(1)
bro in the current version it will maybe not work.Revolutionist
P
5

As of Sept 2020, if you want to get the SHA-1 fingerprint of keystore certificate of Release. Simply open up your Google Play Developer Console and open the App Signing tab.

enter image description here

Primipara answered 21/9, 2020 at 5:50 Comment(0)
A
5

This is the solution for macOS Ventura 13.0 on MacBook Pro M2 2022

I needed SHA1 key for Google Cloud.

  1. Run this command in your terminal where your project is. I was working on a Flutter project.

keytool -keystore path-to-debug-or-production-keystore -list -v

If it doesn't work and you get this error, follow along.

enter image description here

  1. Go to https://www.java.com and download and install the latest version of Java. Run the above command again, if you get another error like this follow along.

enter image description here

  1. Run this command and this will give you SHA1, SHA256, MD5 for default debug key. And it can be used for developing and debugging with google play services.

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

enter image description here

Asthenopia answered 5/11, 2022 at 14:15 Comment(0)
J
4

I had a problem during opening with command

[keytool -list -v -keystore C:\Users\MG\Desktop\test.jks -alias test]

Therefore, i download https://sourceforge.net/projects/portecle/. Then just open .jks file from the jar program. it will show you all relevant information

snapshot of the program

Jubbah answered 20/2, 2019 at 16:47 Comment(0)
J
4

Easy method - with Keystore explorer

Follow the step

  1. Download keystore explorer Download link
  2. Install keystore explorer
  3. Open keystore via keystore explorer
  4. Enter password
  5. Click your keystore name
  6. then you will get the sha1 key
Judoka answered 24/1, 2021 at 9:28 Comment(0)
E
4

Many ways to get SHA1 and SHA-256 key . To generate the SHA-1 key for your Android app, there are a few alternative methods:

Using Keytool Command-Line Tool: You can use the keytool command-line tool that comes with the Java Development Kit (JDK) to generate the SHA-1 key. Open a terminal or command prompt and navigate to your JDK's bin directory. Then run the following command: bash

keytool -list -v -keystore your_keystore_file.jks -alias your_alias_name

Replace your_keystore_file.jks with the path to your keystore file and your_alias_name with the alias you used to sign your app.

Using Android Studio: Android Studio provides a straightforward way to get the SHA-1 key. Follow these steps: Click on the "Gradle" tab on the right side of the Android Studio window. Navigate to "Your Project" -> "Tasks" -> "Android" -> "signingReport". Double-click on "signingReport" to run the task, which will output the SHA-1 key and other signing information in the "Run" pane. Using Google Play Console: If you have already uploaded your app to the Google Play Console, you can find the SHA-1 key in the "Release management" -> "App signing" section.

Using Online Tools: There are some online tools available where you can upload your keystore file and get the SHA-1 key as a result. However, for security reasons, it's generally better to generate the SHA-1 key locally using trusted tools like the ones mentioned above.

Using Gradle Plugin: You can also use the Gradle Signing Report Plugin to get the SHA-1 key. Add the following to your app's build.gradle file:

apply plugin: 'signing-report'

signingReport {
    // You can configure signing configs here if needed
}

Then run the signingReport Gradle task. You will find the SHA-1 key printed in the console. All these methods will provide you with the SHA-1 key needed for various purposes, such as integrating Google services or configuring API access. Choose the one that fits your workflow and security requirements best.

Elspeth answered 5/7, 2023 at 5:44 Comment(0)
S
3

I am using Ubuntu 12.0.4 and I have get the Certificate fingerprints in this way for release key store on command prompt after generate keystore file , you can use this key for released app ,if you are using google map in your app ,so this can show the map properly inside app after release,, i got the result on command prompt below

administrator@user:~$ keytool -list -v -keystore /home/administrator/mykeystore/mykeystore.jks -alias myprojectalias

 
Enter keystore password:  ******

Alias name: myprojectalias

Creation date: 22 Apr, 2014

Entry type: PrivateKeyEntry

Certificate chain length: 1
Certificate[1]:
Owner: CN=xyz, OU= xyz, O= xyz, L= xyz, ST= xyz, C=91
Issuer: CN= xyz, OU= xyz, O= xyz, L= xyz, ST= xyz, C=91

Serial number: 7c4rwrfdff
Valid from: Fri Apr 22 11:59:55 IST 2014 until: Tue Apr 14 11:59:55 IST 2039

Certificate fingerprints:
     MD5:  95:A2:4B:3A:0D:40:23:FF:F1:F3:45:26:F5:1C:CE:86
     SHA1: DF:95:Y6:7B:D7:0C:CD:25:04:11:54:FA:40:A7:1F:C5:44:94:AB:90
     SHA276: 00:7E:B6:EC:55:2D:C6:C9:43:EE:8A:42:BB:5E:14:BB:33:FD:A4:A8:B8:5C:2A:DE:65:5C:A3:FE:C0:14:A8:02
     Signature algorithm name: SHA276withRSA
     Version: 2

Extensions: 

 ObjectId: 2.6.28.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 1E A1 57 F2 81 AR 57 D6   AC 54 65 89 E0 77 65 D9  ..W...Q..Tb..W6.
0010: 3B 38 9C E1             

On Windows Platform we can get the keystore for debug mode by using the below way

C:\Program Files\Java\jdk1.8.0_102\bin>keytool -l
.android\debug.keystore -alias androiddebugkey -s
id
Alias name: androiddebugkey
Creation date: Oct 21, 2016
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: C=US, O=Android, CN=Android Debug
Issuer: C=US, O=Android, CN=Android Debug
Serial number: 1
Valid from: Fri Oct 21 00:50:00 IST 2016 until: S
Certificate fingerprints:
         MD5:  86:E3:2E:D7:0E:22:D6:23:2E:D8:E7:E
         SHA1: B4:6F:BE:13:AA:FF:E5:AB:58:20:A9:B
         SHA256: 15:88:E2:1E:42:6F:61:72:02:44:68
56:49:4C:32:D6:17:34:A6:7B:A5:A6
         Signature algorithm name: SHA1withRSA
Sphenoid answered 1/12, 2016 at 5:30 Comment(1)
Another way you can get this certification detail for debug mode from (1)Right click on Gradle bar at android studio (2)then click on app -> Tasks -> android -> signingReports then on Gradle console you will get the reportsSphenoid
C
3

If you are using Google Play App Signing, instead of getting the SHA from the keystore, an easier way is to go to the Google Play Console > Your app > Release Management > App signing and look for your upload certificate.

Screenshot of the page where you get this info

Conglobate answered 11/12, 2017 at 19:54 Comment(2)
here showing 2 signin certificates appsignin and uploaded signincertificates.which one i need to use for releaseKurbash
For release you need to use the App signing certificateManrope
E
3

if you have not the Keystore and alias you can use this command :

keytool -list -printcert -jarfile app.apk
Ehtelehud answered 26/10, 2019 at 17:33 Comment(0)
G
3

If you're using React Native, debug.keystore is in android/app, but may not be in ~/.android.

Set debug.keystore path as the following:

keytool -list -v -keystore {PROJECT_ROOT}/android/app/debug.keystore -alias androiddebugkey -storepass android -keypass android

Console will print something like this:

Alias name: androiddebugkey
Creation date: Jan 1, 2014
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Android Debug, OU=Android, O=Unknown, L=Unknown, ST=Unknown, C=US
Issuer: CN=Android Debug, OU=Android, O=Unknown, L=Unknown, ST=Unknown, C=US
Serial number: 2==Serial Number==2
Valid from: Wed Jan 01 06:35:04 CST 2014 until: Wed May 01 06:35:04 CST 2052
Certificate fingerprints:
     SHA1: 5E:=========== SHA1 SIGNING KEY ===========:25
     SHA256: FA:============ SHA 256 ===================9C
Signature algorithm name: SHA1withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3
Gynecoid answered 8/7, 2020 at 12:35 Comment(0)
B
3

In the recent update of Android Studio 4.2, we are unable to get the file: signing report. So, we can get this again by following the following steps:

File -> Settings -> Experimental -> 
Now we need to uncheck the *do not build Gradle list during Gradle sync* ->
Click Ok -> now again go to File -> Click on *Sync Project with Gradle files*

Now you can follow, what other answers tell.

Thanks to @PapayaCoders Youtube channel to resolve this issue. Here is the link of the video concerning this problem.

Baumann answered 1/7, 2021 at 4:55 Comment(0)
L
3

A simpler method is to run ./gradlew signingReport in your project root directory Other methods are explained in this article

Looney answered 30/10, 2022 at 13:36 Comment(0)
S
3

In Flutter Project continue in vs code and paste this command

set your username

keytool -list -v -keystore "c:\users\your_pc_username\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android 
Silviasilviculture answered 25/1, 2023 at 12:45 Comment(0)
L
2

If you are using Android studio this very simple.

Create a new Google map activity and you can see sha1 fingerprint like below image.

New Google Map aCTIVITY

YOU CAN SEE SHA1 IN BELOW IMAGE

Longobard answered 1/12, 2015 at 10:0 Comment(0)
Y
2

use android studio embedded Java jre location, for windows user below screenshot may help to find SHA1

enter image description here

Yvoneyvonne answered 27/7, 2022 at 6:21 Comment(0)
G
1

First go to jar file copy the keytool path then add into system path then run.. i hope this one is worked..

Gove answered 24/6, 2015 at 10:53 Comment(0)
S
1

For local you get easily sha1 from android studio but for live please check below url :

Facebook Android Generate Key Hash

We mostly not done below steps so please check the link which is 100% correct.

8) If you see in openssl Bin folder, you will get a file with the name of debug.txt

9) Now either you can restart command prompt or work with existing command prompt

10) get back to C drive and give the path of openssl Bin folder

11) copy the following code and paste

openssl sha1 -binary debug.txt > debug_sha.txt

12) you will get debug_sha.txt in openssl bin folder

13) Again copy following code and paste

openssl base64 -in debug_sha.txt > debug_base64.txt

14) you will get debug_base64.txt in openssl bin folder

15) open debug_base64.txt file Here is your Key hash.

Soileau answered 4/7, 2016 at 10:17 Comment(0)
G
1

Try this with your user & pass

keytool -list -v -keystore {path of jks file} -alias {keyname} -storepass {keypassword} -keypass {aliaspassword}

Exe

keytool -list -v -keystore "E:\AndroidStudioProject\ParathaApp\key.jks" -alias key0 -storepass mks@1 -keypass golu@1

Guillemette answered 25/10, 2017 at 1:22 Comment(0)
U
1

[![Change the build variant then you can see the run the application which will lead to error

You have to find SHA1 code for Release Key & enter it on your Developer Console. ( for me developer console is firebase some people might use different services) To find SHA1 Code . easy way is

Go to Build --- Select Build Variant -- On the left Side Select "Release" as build variant -- now go to module settings ( or try to run project , android studio will tell you about a error and click fix error button) --- Select Signing tab --- add your release key and passwords -- now goto build types -- select release -- on signing config select your release key config -- now run your project -- now run your signing report --- you can find SHA1 under release build -- enter that sha1 code on your developer console

enter image description here

enter image description here

enter image description here

That's it

Ureide answered 26/10, 2020 at 12:31 Comment(0)
L
1

please try this

go to Gradle -> click no elephant icon and write signingReport and click enter done

Lumberjack answered 19/2, 2023 at 16:12 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Lor
V
0

At ANDROID STUDIO do the following steps:

  1. Click Gradle menu on the right side of your ANDROID STUDIO IDE
  2. Expand Tasks tree
  3. Clink on signingReport

You will be able to see the signature at the bottom of IDE

Voltz answered 14/8, 2016 at 6:51 Comment(1)
How is your answer different than those provided? https://mcmap.net/q/10289/-sha-1-fingerprint-of-keystore-certificateNappe
T
0

Android Studio Giraffe | 2022.3.1 onward - new IntelliJ UI:

  1. Open Execute Gradle Task enter image description here

  2. Run the command gradle signingReport enter image description here

  3. Inspect run enter image description here

Transpacific answered 19/2 at 15:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.