plz: need help with adb, jarsigner and debugkeystore

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By nonomiyo

hello,

I tried to export to Android a few times before but it gave me a terrible headache. I just tried again and it doesn’t get any better so I really need help this time…
so, starting with the ADB executable :

I downloaded the Android SDK from http://developer.android.com/sdk/index.html
and this is what I have when I unzip “sdk-tools-windows-4333796.zip” :

screenshot link here

Where can I find this adb.exe file, please ? :confused:

:bust_in_silhouette: Reply From: Oen44

Sdk\platform-tools if you have Android SDK installed. What you have is totally different.

:bust_in_silhouette: Reply From: nonomiyo

Thank you so much Oen44, it works now ! I just solved the jarsigner too, so now it’s down to the debug.keystore.

I went into the command console, browsed to the Java bin folder, then entered :

   keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999

and I got this error message :

keytool error: java.io.FileNotFoundException: debug.keystore (Access denied)

console screenshot here

what can I do to solve this issue please ?

It’s likely you don’t have write permissions in the Java directory (regular users can’t write in %PROGRAMFILES%). Instead, you should change to a directory where you have write permissions, then specify the full path to keytool in the command line like this:

"C:\Program Files\Java\jdk-11\bin\keytool.exe" -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999

Calinou | 2018-09-27 14:31

thx for your help calinou, it worked !! Now, time to see if I can export the game to my tablet ^^/

nonomiyo | 2018-09-27 15:10

:bust_in_silhouette: Reply From: copiedright

I used the directories below. Obviously different to different install and usernames, but should hopefully point you in the direction that worked for me.

ADB - C:/Users/ username /appdata/Local/Android/Sdk/platform-tools/adb.exe
Jarsigner - C:/Program Files/Java/jdk-14.0.1/bin/jarsigner.exe
Debug Keystore - C:/Program Files/Java/jdk-14.0.1/bin/debug.keystore

Note that you have to create your keystore using command (like from the docs)
keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname “CN=Android Debug,O=Android,C=US” -validity 9999

Make sure you restart your computer (Win10) after installing Java. Also you need to run the CMD as administrator (right click, run as administrator)