I'm currently trying the new feature of firebase, and it asks me to provide 'Debug signing certificate SHA-1', I've read the document of how to get the code but I don't know where to find "keytool". By the way, what is the function of this code, will it make differences if I don't provide one in firebase?
5 Answers
In windows:
- Navigate to you JRE folder in Windows File Explorer - to the directory
with the keytool.exe in the JDK -> bin folder. Mine is in
C:\Program Files\Java\jre1.8.0_91\bin
but try browsing to the Java folder and see what version you have and change the path accordingly. - Right click on the mouse while pressing shift key on your keyboard.
- Click on Open command window here.
To get the debug certificate fingerprint enter in the command window this:
keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
The keytool utility prompts you to enter a password for the keystore. The default password for the debug keystore is android (or no password, just hit enter). The keytool then prints the fingerprint to the terminal. For example:
Certificate fingerprint: SHA1: DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09

- 722
- 7
- 22
-
Add ./keytool for powershell – Dživo Jelić May 12 '22 at 23:12
Another place is inside of Android Studio, incase you have already have install it:
C:\Program Files\Android\Android Studio\jre\bin\keytool.exe

- 309
- 3
- 5
-
If you are creating a signing key then you need to use this Android version of keytool. The Android sdk requires a key where the keystore and the key have passwords. The java version only creates keystores with a password on the store not the key. – darrenp Jun 15 '22 at 22:25
From this thread
keytool comes with the Java SDK. You should find it in the directory that contains javac, etc.

- 1
- 1

- 2,222
- 2
- 18
- 30
(For Windows)
ERRORS I was getting:
keytool : The term 'keytool' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
keytool error: java.lang.Exception: Keystore file does not exist: %USERPROFILE%\.android\debug.keystore
java.lang.Exception: Keystore file does not exist: %USERPROFILE%\.android\debug.keystore
SOLUTION:
Repeat the first steps that @amitai-fensterheim answers to the current question. Steps:
- Navigate to you JRE folder in Windows File Explorer - to the directory with the keytool.exe in the JDK -> bin folder. Mine is in C:\ProgramFiles\Java\jre1.8.0_91\bin but try browsing to the Java folder and see what version you have and change the path accordingly.
- Right click on the mouse while pressing shift key on your keyboard.
- Click on Open command window here.
Then write this on your terminal:
.\keytool.exe -list -v -alias androiddebugkey -keystore $env:USERPROFILE\.android\debug.keystore
Finally, press ENTER
to get the SHA1 certificate.

- 1,199
- 13
- 16
Follow these simple steps :
- Check the JRE-> bin folder or bin folder where keytool.exe is present. copy the folder path and change directory of terminal with these path.
keytool -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
Type above command and take your sha-256 or sha-1 fingerprints.