0

Good day, I'm having a hard time getting my key. I followed some of the suggested answer in this link ERROR: Keytool, but none of them work.

These are the steps that i made:

CMD-> cd .android (I changed directory) -> dir (show list in .android folder)

cd . android

After that I locate my keytool path directory and paste it in cmd

"C:\Program Files\Java\jdk1.7.0_79\bin\keytool"

path directory

The problem is in this next step: keytool -list -v keystore debug.keystore

It will produce error: keytool is not recognized as an internal/external command, operable program or batch file.

Community
  • 1
  • 1
RoCkDevstack
  • 3,517
  • 7
  • 34
  • 56

1 Answers1

3

Instead of

keytool -list -v keystore debug.keystore

cd into .android

"C:\Program Files\Java\jdk1.7.0_79\bin\keytool" -list -v -keystore -alias androiddebugkey -storepass android -keypass androiddebug.keystore

Generally (without cd-ing);

"C:\Program Files\Java\jdk1.7.0_79\bin\keytool" -list -v -keystore "C:\Users\username\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

Or

If your aim is to generate a new key do;

"C:\Program Files\Java\jdk1.7.0_79\bin\keytool" -genkey -v -keystore mykey.keystore

You will find the key at "C:\Users\username\mykey.keystore"

Be sure to replace username above with your username on your computer

Elvis Chweya
  • 1,532
  • 11
  • 19
  • Many Thank you, I tried that without cd-ing and it works. If it is ok with you can you explain to me the mykey.keystore thing? I tried that and open the file, but there is no key. – RoCkDevstack Feb 19 '16 at 03:58
  • "mykey.keystore" is just a name for the keystore file. – Elvis Chweya Feb 19 '16 at 04:03
  • 1
    But if you are asking about the keystore, its purpose is to provide secure system level credential storage. In other words it stores keys used this to encrypt application secrets before saving it in the private storage folders. more info http://developer.android.com/training/articles/keystore.html – Elvis Chweya Feb 19 '16 at 04:07
  • Thanks a lot. :) I've been somehow enlighten by these facts. – RoCkDevstack Feb 19 '16 at 04:10