When i use the command
C:\>keytool -list -alias androiddebugkey -keystore .android\debug.keystore -storepass android -keypass android
I get this error:
‘keytool’ is not recognized as an internal or external command, operable program or batch file.
I’m not able to get the certificate fingerprint(MD5) on my computer.
i have ensured that the keystore file is present in the appropriate location.
Check that the directory the keytool executable is in is on your
%PATH% environment variable.
For example, on my Windows 7 machine, it is in
C:\Program Files (x86)\Java\jre6\bin, and my
%PATH% variable looks like
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Java\jre6\bin;C:\WINDOWS\System32\WindowsPowerShell\v1.0\ (and many other entries)
This worked for me !! :
Go to this path or where ever you have your keytool.exe file
shift and right click -> then press
Open command window here
terminal will pop up, paste this in:
keytool -list -v -keystore "C:\Users\"Your-User-Name(no quotes)"\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
gives you both MD5 and SHA1
my computer->rightClick->properties->Advanced system settings->environment variables->find path in system variables->dbl click-> paste the "C:\Program Files\Java\jdk1.6.0_16\bin"->OK
cmd -> keytool -list -alias androiddebugkey -keystore "C:\Users\meee\.android\debug.keystore" -storepass android -keypass android
On windows 8, go to C:\Program Files\Java\jre7\bin and in the address bar, type “cmd” without the quotes. This will launch the terminal. Then type in string as describe here.
So if you have the following structure now:
C:\Program Files\Java\jre6\bin\ keytool.exe debug.keystore
C:\Program Files\Java\jre6\bin>keytool -list -alias androiddebugkey -keystore debug.keystore -storepass android -keypass android
Go to My computer -> right click -> system properties -> environmental variables -> Path ->
add you jdk/bin to this path
*if this not work then
In cmd set the path by using the below command
set PATH=C:\Program Files\Java\jdk1.8.0_211\bin
now the path is set now you can use the keytool
Make sure JAVA_HOME is set and the path in environment variables reflects the bin directory of JAVA_HOME.
Basically, the PATH should be able to find the keytools.exe file in your jdk location.
all you can do is to navigate to your jre destination in your computer via command line and then once you reach bin, you type the keytool command and it would work.
C:\Program Files (x86)\Java\jre7\bin> C:\Program Files (x86)\Java\jre7\bin>keytool -list -v -keystore"%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android Alias name: androiddebugkey Creation date: 23 Feb, 2014 Entry type: PrivateKeyEntry Certificate chain length: 1 Certificate: Owner: CN=Android Debug, O=Android, C=US Issuer: CN=Android Debug, O=Android, C=US Serial number: 479d4fe7 Valid from: Sun Feb 23 06:19:02 IST 2014 until: Tue Feb 16 06:19:02 IST 2044 Certificate fingerprints: MD5: DB:6A:8E:48:22:5B:37:73:B1:91:EF:43:3F:26:F0:EC SHA1: B4:6B:2E:5F:5A:30:C5:E4:E7:12:BB:F0:74:FC:2B:43:64:3A:FC:15 SHA256: CB:59:F3:20:7D:5B:87:99:6C:0D:32:79:79:CF:4E:8C:16:C2:37:81:7B: B0:AF:D2:EC:3C:11:21:53:58:62:F6 Signature algorithm name: SHA256withRSA Version: 3 Extensions: #1: ObjectId: 126.96.36.199 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: FA 96 17 9E 94 73 C3 42 F0 4B 55 5B C7 5B EE BB .....s.B.KU[.[.. 0010: C3 E5 D3 61 ...a ] ]
if you want to run keytool from any location of terminal
you need to add the system variables
1) create: JAVA_HOME C:\Program Files\Java\jdk1.7.0_45 2) add to Path %JAVA_HOME%\bin;
Easy, just find the location where keytool executable is, normally is in
java/jre(Version)/bin forexample in my computer is in
C:\Program Files\Java\jre7\bin. all you have to do is go to environment variables, click PATH to make it active, then click edit, then add complete path where your keytool is, for me i will add
C:\Program Files\Java\jre7\bin this will allow you to execute keytool commands without going to the directory where keytool is installed.
This means, that your shell couldn’t find the tool on your harddisk.
- Change the working directory to
keytool -list -alias androiddebugkey keystore <full directory name make sure that you use enclosing in quotes> -storepass android -keypass android
C:\Program Files\Java\jre6\bin\to your
keytool -list -keystore ~/.android/debug.keystore
Also in your line there is a space in keystore. Please check it.
Open “Environment Variables” (you can get to it from your start menu search in Win10)
double check the path that the jdk is in, to make sure it exists.
For me, it said “…jdk1.8/bin”
But when I copied that into Windows Explorer or command prompt, it said that it didn’t exist.
I checked where it should have been, and it said “jdk1.8.0_77”
A simple rename of the setting in Android Studio and keytool was working!
In my case problem was in using PowerShell instead of CMD 🙂
I suffered alot trying to find a solution to it and finally I found the solution by first setting the jre path to system variables by navigating to::
control panel > System and Security > System > Advanced system settings
Under System variables click on new
Variable name: KEY_PATH Variable value: C:\Program Files (x86)\Java\jre1.8.0_171\bin
Where Variable value should be the path to your JDK’s bin folder.
Then open command prompt and Change directory to the same JDK’s bin folder like this
C:\Program Files (x86)\Java\jre1.8.0_171\bin
then copy and paste the code below in cmd
keytool -list -v -keystore "C:\Users\user\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
The Works for fine
Go to Path
C:\Program Files\Java\jre7\bin> keytool -exportcert -alias androiddebugkey -keystore "C:\Users\Developer\.android\debug.keystore"
Then enter Ketsore Password and job done!!
Open Command prompt
“c:\Program Files(x86)\Java\jdk1.7.0\bin\keytool.exe” -list -v -alias androiddebugkey -keystore “C:\Users\EIS.android\debug.keystore” -storepass android -keypass android
Then Hit Enter MD5 and SHA1 key will get
I know there are already several answers but none of them worked for me, so i am posting one that worked for me, may be helpful for someone.
First of all directory to keytool.exe must be on path
and if instead of directory being on path it is giving error then Try starting command line as a normal user instead of as a administrator or changing the directory to home directory
For windows 10 you need to path
restart command and open
Locate where your keytool.exe inside java installation folder
C:\Program Files\Java\jre1.8.0_181\bin open cmd anywhere and run
SET PATH=%PATH%;C:\Program Files\Java\jre1.8.0_181\bin;
change the path to the path you located your keytool.exe
My case is, it doesn’t work wherever I call it, no matter I path the file or not, if I open it with powershell.
but it works if I open it with cmd.