How to find Keytool for android app
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 inC:\Program
but try browsing to the Java folder and
Files\Java\jre1.8.0_91\bin
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
I can’t find the Android keytool
keytool
comes with the Java SDK. You should find it in the directory that contains javac
, etc.
How can I find and run the keytool
I found a solution by myself as below quote. It works fine.
"C:\Program Files\Java\jdk1.6.0_26\bin\keytool.exe" -exportcert -alias
> sociallisting -keystore "D:\keystore\SocialListing" |
> "C:\cygwin\bin\openssl.exe" sha1 -binary | "C:\cygwin\bin\openssl.exe"
> base64
not able to locate keytool on my mac to sign my apk file
Make sure you have cd
'd into the android-sdk/platform-tools directory (where the keytool will [most likely] reside). The command won't be found if you aren't in the keytool-containing directory.
Keystore file doesn't exist
You said you are running the command from...
/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/bin
Is your keystore file in that directory as well? If not then you need to specify the path to the keystore file, e.g.
keytool -list -v -keystore ~/somefolder/mystore.keystore
The keystore used should be the one used to sign the app. For Xamarin debug builds this will be the debug keystore located at /Users/[USERNAME]/.local/share/Xamarin/Mono\ for\ Android/debug.keystore
. The command on OSX for this would be...
keytool -list -v -keystore /Users/[USERNAME]/.local/share/Xamarin/Mono\ for\ Android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Or on Windows 7
keytool -list -v -keystore C:\Users\[USERNAME]\AppData\Local\Xamarin\Mono for Android\debug.keystore -alias androiddebugkey -storepass android -keypass android
ERROR:'keytool' is not recognized as an internal or external command, operable program or batch file
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)
cannot find keytool on a mac
If you are using Eclipse under Mac OS X you just need to
Select File
-> Export
-> select Android
-> Export Android Application
-> click next
-> select your project -> click next
-> here you just chose Create new keystore
Android - in which directory is the keytool tool
Use this to get your MD5 fingerprint :
change directory to : C:\Program Files(x86)\Java\JDK folder\bin
and then execute
keytool.exe -list -alias androiddebugkey -keystore "C:\Users\.android\debug.keystore" -storepass android -keypass android
Related Topics
How to Show Shadow Around the Linearlayout in Android
Android Camera Intent Saving Image Landscape When Taken Portrait
The Following Classes Could Not Be Found: Android.Support.V7.Internal.App.Windowdecoractionbar
Android Listview with Checkbox and All Clickable
Does Broadcastreceiver.Onreceive Always Run in the UI Thread
How to Detect System Information Like Os or Device Type
Android Recording Incoming and Outgoing Calls
Android - Startactivityforresult Immediately Triggering Onactivityresult
How to Check If Receiver Is Registered in Android
How to Add (Vertical) Divider to a Horizontal Linearlayout
Android: How to Detect When a Scroll Has Ended
How to Automatically Restart a Service Even If User Force Close It
What Is the Meaning of Addtobackstack with Null Parameter
How to Set the Initial Zoom/Width for a Webview
Android L's Ripple Effect - Touch Feedback for Buttons - Using Xml
Camera Preview Image Data Processing with Android L and Camera2 API
How to Add the Aidl File to Android Studio (From the In-App Billing Example)