I am using Android Studio on Mac El Capitan. How do I get the release Certificate Fingerprints? I need it for Firebase. I am not sure exactly how to get it.
4 Answers
Just to test it (with the debug fingerprint), run the following command in any directory with the terminal.
$ keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v
Then copy the SHA1 value and paste it into your Firebase console.
Be careful, the above will work for the debug environment, if you want to set up the release fingerprint you will have to create a keystore, check out this post to see how to do it, and then run the same command but instead of ~/.android/debug.keystore
you should put ~/YOUR/PATH/TO/KEYSTORE
$ keytool -exportcert -alias androiddebugkey -keystore ~/YOUR/PATH/TO/KEYSTORE -list -v
-
2Thanks, one correction: the alias should be the actual alias, not androidebugkey. At least that's how I got mine to work. Thanks. – Katedral Pillon Jul 11 '16 at 00:55
-
That generates a SHA-256 RSA key. I want SHA-1 to support O-Auth signing. – Vijay Kumar Kanta Jan 02 '19 at 03:57
-
if you're using Android Studio v3.6.2 and want to get the info for the `keytool` command, from the menu go to: "Build" > "Generate Signed Bundle / APK" click Next – lasec0203 Apr 12 '20 at 09:58
As this question is to get RELEASE certificate fingerprint, easy way to get RELEASE fingerprint is,
Open terminal
Go to directory where project's .jks file located
Finally get it by,
keytool -exportcert -alias ALIAS_NAME -keystore KEYSTORE_NAME_WITH_EXTENSION -list -v

- 2,161
- 3
- 22
- 42
-
1ALIAS_NAME can be found in build.gradle (app) under `release` in `signingConfigs`. `keyAlies "myreleasekey"` – amira Mar 27 '19 at 08:59
-
-
`-alias` doesn't seem to matter. I tried the command with and without it and got the same output – lasec0203 Apr 12 '20 at 09:47
-
Example :
ALIAS_NAME_HERE : kakha
KEY_FULL_PATH : C:\Users\kakha\key.jks
keytool -exportcert -alias "ALIAS_NAME_HERE"-keystore "KEY_FULL_PATH" -list -v

- 305
- 1
- 3
- 14
as @lasec0203 said, you dont need to use alias...
Just use this code;
keytool -list -v -keystore "/fullpath/upload-keystore.jks"
and after that, enter your keystore than you will get the your certificate fingerprint.

- 687
- 7
- 15