0 votes

Hi people!
I was trying to export a simple little project to android to see test some things, but I have problems exporting, related (apparently) to the jarsigner.
I have tried searching on the web for solutions before coming here, but nothing seems to fix this situation.

The situation is this: according to other people that had the same problem, changing some parameters while generating the keystore seemed to fix the issue.
but I've tried all ways to generate the keystore and nothing works.

Here's what I've tried.

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

...and...

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

... I've tried both keystores, in the android section on editor setting, and when the export window asks me for a release keystore (I guess I can use the same keystore both for debug and release), but also I've tried with different keystores for those two, and nothing seems to fix the problem.

So... anyone has any idea whats the issue here?

SIde Note 1: The APK file seems to be exported anyway but, whan trying to install the app on the phone, after enabling unknown sources, the installation fails.

Side Note 2: I haven't tried running the project directly from the editor while conecting the android phone to the PC, because the only android phone I have acces to is not mine (D:), so I don't want to mess up with the developer mode on a phone that's not mine.

Thanks in advance!!!!

asked Apr 12, 2016 in Engine by Santiago (40 points)
edited May 23, 2016 by Calinou

Oh I forgot to mention that i'm using godot 2.0.2 on Ubuntu 15.04 with openJDK 6, as recommended in the "exporting for android" tutorial on the godot docs

Did you solve this? I have an Android app and there are many issues/gotchas with doing this in Godot. Posting the error messages might help. Your first key won't work because you've specified RSA and Godot is hard coded for MD5withRSA. I haven't tried an MD5withRSA key but strangely, one created with Sha1WithRSA seems to work ok. Although, I'm on Windows so there might be differences there :/

Hi duke, I still have this problem on ubuntu, the only workaround I've found is to use the editor on windows, I have no problems there, but I'd like to fix this problem on ubuntu.

As for the error messages, the only one I got while exporting is the "'jarsigner' returned with error #1" but nothing more.

I'll try and use a key without the RSA specified, I thought that following the tutorial on the godot wiki for generating a keystore would work.

Thanks for the help!
I'll comment on this if I solve this!

Which keystore creation command that you posted works for you? I'm hoping the second one with -sigalg MD5withRSA just for some sanity (because the first one shouldn't work IMO). I've spent the last 3 days solid (and many more before that over the weeks) trying to work out how to reliably deploy to Android from Godot. Just when I think I've got a handle on it, something else pops up. BTW you have -keyalg RSA twice in your second command line above.

By the way you can jarsign manually, which might get around the problem for you in Linux.

Sorry for replying late :(
Honestly, I haven't tried anything with the jarsigner on ubuntu, for now anytime I need to export I go to Windows hehe, but I'll try soon enough and tell you my findings.
Thank you for the help!

Hi again! I've been trying again to compile and use de deploy function, and now I don't get the error any more (using the kaystore generated from the code on the godot docs, and the jarsigner from jdk1.8.0101), but when I try to use deploy on my android device, connected via usb and with developer functions enabled, godot seems to build the apk to deploy without problems, but after the process is done, the device don't load the apk, and even if I export the apk normally and try to install it via "adb install my-game.apk" I get the [INSTALLPARSEFAILEDNO_CERTIFICATES] error, so I don't know what to do any more.

All of this was tested on Ubuntu; on windows I have no problems deploying small games, but for some "big" games like 3d platformer sample, the device will freeze or don't load the game at all.

So I'm stuck again but at least is a new error :D

Hey, I thought I'd share what solved in my case: I mistakenly selected the "apksigner" executable in the Android sdk instead of the "jarsigner" in the Godot Editor settings (I know this was a stupid mistake... lol). Choosing the jarsigner instead solved this problem for me. :P

1 Answer

+1 vote

This problem happen when you give to GODOT engine wrong keystore password.
solve:
Fist goto jdk directory to regenerate new keystore:
1: keytool -genkey -v -keystore debug.keystore -alias debug -keyalg RSA -keysize 2048 -validity 10000
2: goto Editor-> Editor Settings > Export > Android.
3:Debug keystore field: Point to keystore file in JDK folder.
4: replace field Debug keystore user: to name that keysore.
5: replace field Debug keystore password: password when you generate keystore.

It should work.

answered Apr 26, 2019 by undeton (18 points)
edited May 2, 2019 by undeton
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.