Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
06/08/13 08:16 AM (10 years ago)

cant get keytool command to work in windows

Trying to get hash keys for Facebook login to work with scringo but kind of stuck on the key tool command part. Not quite understanding exactly what I should be changing to get the release hash. Thanks for any help.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
06/08/13 08:26 AM (10 years ago)
You should be able to find an online hash tool.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
06/08/13 08:28 AM (10 years ago)
This looks like a good one in fact. http://www.fileformat.info/tool/hash.htm
 
Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
like
06/08/13 09:17 AM (10 years ago)
hey i also had got stuck on release key hash the one mentioned in ians tutorial dint work for me i emailed sandeep he got me through here is what he replied $ keytool -exportcert -alias androiddebugkey -keystore "C:\Documents and Settings\Administrator.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary |"C:\OpenSSL\bin\openssl" base64 Now here the words in red font are imp. the first word androiddebugkey is the alias name of android debug key. and the second word in red font is the path of the android debug key on your pc. first put this code and when prompted for password type- android. Then you will get hash key for your debug key. Copy it coz you will need this too. Similarly you have to get hash key for your release keystore. Just in place of androiddebugkey replace your keystore alias name and in place of path of debug keystore put the path of your release keystore. for ex if your release keystore is on D:\ drive in a folder named akshay and its name is release.keystore, then put D:\akshay\release.keystore. I think before doing that you will have to change directory with cd prompt or something like that... I use mac so i have forgot most things about windows so sorry for incomplete info... Do tell me if you succeed.
 
Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
like
06/08/13 09:18 AM (10 years ago)
words in red were "androiddebugkey" and "C:\Documents and Settings\Administrator.android\debug.keystore"
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/08/13 03:47 PM (10 years ago)
I did a video on installing the keytool plugin for Eclipse...that should help you a bit! http://www.youtube.com/watch?v=IaXE2FUENFI Mark
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
06/09/13 01:33 AM (10 years ago)
Thanks guys! I will get onto this today and let you know how it goes. One last thing. In Ian's video he said to create a new key store. Do I have to create a new key store for each app I want to use scringo in? Or does each app generate a different key hash if I use the same key store?
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
06/09/13 03:03 AM (10 years ago)
@chris1, i tried that tool but unsure which hash is correct one as none look like the one in ians video.
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
06/09/13 03:22 AM (10 years ago)
i read elsewhere that using sha1 hash and inputting it here http://tomeko.net/online_tools/hex_to_base64.php?lang=en gives the base 64 code required. hope someone can confirm this is ok. thanks
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
06/09/13 01:30 PM (10 years ago)
It worked, wow
 
nelaye
Android Fan
Profile
Posts: 95
Reg: Jan 29, 2013
Kuantan
2,500
like
06/15/13 10:30 AM (10 years ago)
hi Mr stuck, I'm having the same as yours. do you mind to share your solution? I use this cmd but now it not recognise openssl. keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64
 
nelaye
Android Fan
Profile
Posts: 95
Reg: Jan 29, 2013
Kuantan
2,500
like
06/15/13 10:44 AM (10 years ago)
Hi Mr Stuck Ignore my post above. found the solution at http://www.buzztouch.com/forum/thread.php?tid=4E71B3A0EB93E5413B47FA2&currentPage=1
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
06/15/13 01:16 PM (10 years ago)
Hi. Glad you figured it out. I never did get the command working but found a workaround for it. In eclipse click on keytool-> open key store then browse to the folder you have key store in your PC, open it in eclipse and copy the sha1 code and paste it into the online tool I linked to in above post and it gives the hash. Very simple
 
Imagenparaweb
Aspiring developer
Profile
Posts: 121
Reg: Dec 13, 2011
Cordoba
1,210
like
06/17/13 08:16 AM (10 years ago)
Hi, which is the keystore I have to browse to? thanks.
 
Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
like
06/17/13 08:31 AM (10 years ago)
I don't know which method you are using I used command prompt method for release hash key : the path of the keystore used for signing the apk is required in this case
 
Imagenparaweb
Aspiring developer
Profile
Posts: 121
Reg: Dec 13, 2011
Cordoba
1,210
like
06/17/13 08:41 AM (10 years ago)
Hi Akshay, thanks for replyin.. I want to use the same method as you. But I copy this: keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64 into CMD but it does not work.. check the image please. Can u help me? http://s22.postimg.org/kdow028dd/cmd_error.jpg THANKS!
 
Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
like
06/17/13 08:48 AM (10 years ago)
in command prompt first you need to go in this directory c\progrmafiles\java\jre7\bin then enter the command post what happens
 
Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
like
06/17/13 08:51 AM (10 years ago)
hey but what are you trying for : debug key or release key? from the code that you have put it appears you have not got your debug key
 
nelaye
Android Fan
Profile
Posts: 95
Reg: Jan 29, 2013
Kuantan
2,500
like
06/17/13 09:12 AM (10 years ago)
hi, use this keytool -exportcert -alias androiddebugkey -keystore "C:\Users\XXXX\.android\debug.keystore" | "C:\OpenSSL-Win32\bin\openssl" sha1 -binary |"C:\OpenSSL-Win32\bin\openssl" base64 XXX = your user name. I assume you install exclipse using default setting note: you must install OpenSSL if your machine does not have it.
 
Akshay
I hate code!
Profile
Posts: 193
Reg: Mar 07, 2013
Pune ,India
1,930
like
06/17/13 09:13 AM (10 years ago)
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/17/13 09:16 AM (10 years ago)
If you guys install the Keytool plugin, you won't have to issue a single command! It's all GUI based! Mark
 
Imagenparaweb
Aspiring developer
Profile
Posts: 121
Reg: Dec 13, 2011
Cordoba
1,210
like
06/17/13 09:35 AM (10 years ago)
Hey nelaye, you solution worked like a charms! :) Thanks all of you guys!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.