Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to obtain Signing certificate fingerprint (SHA1) for OAuth 2.0 on Android?

People also ask

How do I get SHA1 signing certificate Android?

If you've published your app using Play App Signing, a requirement when using Android App Bundle, you can get your SHA-1 from the Google Play Console on the Release > Setup > App Integrity page.

How do I get a SHA1 certificate fingerprint?

Click on Your Project (Your Project Name form List (root)) Click on Tasks. Click on Android. Double Click on signingReport (You will get SHA1 and MD5 in Run Bar(Sometimes it will be in Gradle Console))


Start an export process to create an apk for your app and use your production key. The very last page displays both your SHA1 and MD5 certificate fingerprints enter image description here


I know this question has been answered but this is how I found my signature for the default keystore. In Eclipse, if you go to Windows -> Preferences -> Android -> Build

enter image description here


I think this will work perfectly. I used the same:

For Android Studio:

  1. Click on Build > Generate Signed APK.
  2. You will get a message box, just click OK.
  3. Now there will be another window just copy Key Store Path.
  4. Now open a command prompt and go to C:\Program Files\Java\jdk1.6.0_39\bin> (or any installed jdk version).
  5. Type keytool -list -v -keystore and then paste your Key Store Path (Eg. C:\Program Files\Java\jdk1.6.0_39\bin>keytool -list -v -keystore "E:\My Projects \Android\android studio\signed apks\Hello World\HelloWorld.jks").
  6. Now it will Ask Key Store Password, provide yours and press Enter to get your SHA1 and MD5 Certificate keys.

If you are using Mac or even Linux, just copy and paste this onto the Terminal application and you will get the SHA1 key immediately. No need to change anything.

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

Example output:

Alias name: androiddebugkey
Creation date: 17 Feb 12
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Android Debug, O=Android, C=US
Issuer: CN=Android Debug, O=Android, C=US
Serial number: 4f3dfc69
Valid from: Fri Feb 17 15:06:17 SGT 2012 until: Sun Feb 09 15:06:17 SGT 2042
Certificate fingerprints:
     MD5:  11:10:11:11:11:11:11:11:11:11:11:11:11:11:11:11
     SHA1: 11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:01:11
     Signature algorithm name: SHA1withRSA
     Version: 3

use this in the command line

c:\Program Files\Java\jdk1.6.25\bin>keytool -list -v -keystore c:\you_key_here.key

Open terminal (in Unix, in MAC), (cmd in Windows) and cd to this (your java) path:

C:\Program Files\Java\jdk1.6.0_43\bin>

Run this command:

keytool -list -v -keystore C:\Users\leon\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android

Just change the path to debug.keystore and you will get both MD5 and SHA-1 fingerprints.