76

Someone I'm helping with an application needs to locate her debug.keystore - mine is in my .android folder, but when I navigate there on her computer it is not there.

Does something need to be done in order for it to appear? Where is it / how can it be generated again?

2
  • .android is a hidden folder; do you see it on her computer? or is it missing also? Commented Dec 20, 2011 at 14:15
  • No, it's there. It seems that instead of debug.keystore, there is a 'debug' Commented Dec 20, 2011 at 14:18

11 Answers 11

178

According to the documentation, performing a build in Eclipse or using ant debug should automatically generate ~/.android/debug.keystore.

But in case this doesn't work, you can create one manually by running:

keytool -genkey -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "CN=Android Debug,O=Android,C=US" 
Sign up to request clarification or add additional context in comments.

5 Comments

For windows 64 bit users: keytool -genkey -v -keystore "C:\Program Files (x86)\Android\android-sdk\.android\debug.keystore" -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"
That would be for windows 32 bit wouldn't it? For anyone using Xamarin mine was in C:\Users\<UserName>\AppData\Local\Xamarin
This specific keytool command didn't work for me, but it helped me find this question, stackoverflow.com/questions/36554463/… which resolved it
I must add that for Ws 64bits you can find keytool in C:\Program Files\Java\jdk1.8.0_25\bin (I suppose that for Ws 32bits is the same path)
Now it also requires the keyalg option to be specified. The below answer by @Aravin works well
23

You can create keystore using this command..

keytool -genkey -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "CN=Android Debug,O=Android,C=US"

1 Comment

The accepted answer is missing -keyalg parameter which keytool was complaining about. This one worked for me.
20

If she is using Eclipse then go to Windows -> Preferences

Select Android -> Build

There you will see Default debug keystore: "Path"

See if you can locate it there.

4 Comments

It's the same path as we thought - but it isn't there.
Try installing ADT plugin in your eclipse and check.
Generate the Key store with the help of this command $ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 Further details "developer.android.com/guide/publishing/app-signing.html"
@EnthuDeveloper this key will not work as debug key. Debug key has specific names and passwords pre-set. Take a look: developer.android.com/guide/publishing/…
4

The debug.keystore is created automatically on first build that uses it.

2 Comments

No sir, it isn't. Perform the following test: delete debug.keystore from your .android folder. In eclipse do project > clean, and launch your app. The debug.keystore is not generated.
It is in Android Studio 0.8.0.
2

try this....it will generate the file debug.keystore to

C:/

for all versions of Windows

keytool -genkey -v -keystore C:/debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -keysize 2048 -validity 999999 -dname "CN=Android Debug,O=Android,C=US" 

Comments

1

On Windows 7, I had to create the file manually using John's suggested command. Don't forget to enclose the path in a pair of double quotes (").

Comments

1

I don't know how it work magically! I deleted my debug.keystore, build my project again and look for debug.keystore in default location ~/.android/debug.keystore, din't find debug.keystore.

Again build project and look for debug.keystore, no luck!

Then I open eclipse go to Windows -> Preferences,Select Android -> Build See Default debug keystore: "Path".

Now again looked for debug.keystore in default location ~/.android/debug.keystore, found debug.keystore. Tried so many times, it worked.

Comments

0

Try this for Generating PKCS keys.

keytool -importkeystore -srckeystore C:\Users\xxx\.android\debug.keystore -destkeystore C:\Users\xxx\.android\debug.keystore -deststoretype pkcs12 

Note: RSA2048 is not a recommended industry standard and the above command can be used to migrate the existing debug.keystore in RSA2048 to PKCS format

The old debug.keystore which was in RSA2048 will be renamed to debug.keystore.old and saved automatically

Comments

0

To get the key you should first run the app on a device(real device or emulator). While debugging the file is automatically created.

Comments

0

debug.keystore automatically generate after the run of the app debugging

Comments

0

If you are looking for the debug.keystore file and are using react native for development. I found it inside of the android/app folder. No need to run it on Android Studio

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.