0 votes

I have built my game and I want to upload it on Play Store but I have heard that we have to sign the game to upload it on Play Store. Someone please explain the process of signing from start to end. I have heard about creating a keystore file but i do not understand that what do we need to do with the keystore file after creating the keystore file. Please explain the process and not just give the link to the documents of google which explains how to sign your game (all the people i have asked to just do this and not explains). I am trying to sign my godot game from a long time. Someone please explain me about how to sign my godot game.

in Engine by (42 points)

Oh, it is not only described in the android docs.

There's also a specific help in the Godot docs for that:
https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_android.html

I assume that you created already a debug key and tested your app on an Android device?
Testing and direct apk distribution w/o play store doesn't require a release

Naturally you'll also have to fill out the mandatory information in the play store until they'll accept a (signed) apk. Also you need to meet the requirement (mentioned at the end of the linked doc above) to provide a 64bit version.

if that doesn't get you further then be more specific about your problem.

That documentation in godot docs is about exporting to android but not about signing. Can you please explain how to sign and what to do with the keystore file generated for signing. Thanks for your precious time and reply!

1 Answer

0 votes

Ok, there's some info in the godot doc. I am not sure where your progress actually stops or where the problems begin. It seems you've already generated an release/upload key and don't know how to proceed?

Generally:
You already created a debug key? Then creating the release/upload key is very similar.

Usually you use two keys. I'll just roughly tell which one is for what.

The debug key is used for local tests and you you can install apks signed with a debug key on (roughly) any android device when it's configured to allow the install of "untrusted" apps.

"Untrusted" because the debug key (as well as the upload/release key) are both so called "self-signed" certificates. This means that you create the keys just on yourself and there's no trusted party that acknowledges that these keys/certificates are from your very person.

Then there's the release key. That is actually very similar to the debug key because you create this key also yourself. But in another keystore.

So in the godot docs is mentioned the basic command line which you use to create the release/upload key:

Uploading an APK to Google’s Play Store requires you to sign using a non-debug keystore file; such file can be generated like this:

keytool -v -genkey -v -keystore mygame.keystore -alias mygame -keyalg RSA -validity 10000

This keystore and key are used to verify your developer identity, remember the password and keep it in a safe place!

This keystore/key is used to sign the app before you upload it to the google play store. Usually, it is just used for upload. Google will sign that app later (automatically) with its own "trusted" key.

So, you created your own release key with the command line mentioned above (replace "mygame" with the title of your own game to be later able to identify what that key is for.)

Then you enter the key data in the "release" key section of the godot android export dialogue. Just as you did previously with the debug key data.

Then export the apk (uncheck the export with debug information).
Until here it is all detailed in the godot docs:
https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_android.html

The next step would be to upload the app to google play.
If you let Google handle the signing then google play will learn your upload key the first time when you upload the app to Google Play.

Here's the section in the google docs about it:

(...)
2. Sign in to your Play Console.
3. Follow the steps to prepare & roll out your release to create a new release.
4. After you choose a release track, configure app signing under the Let Google create and manage my app signing key section as follows:
* To have Google Play generate an app signing key for you and use it to sign your app, select Continue. The key you use to sign your first release becomes your upload key, and you should use it to sign future releases.

https://developer.android.com/studio/publish/app-signing#generate-key

Summary:
Creating and using the "release" key is very similar to creating the debug key. You create both on your computer.

The "release"-key is basically just used to sign the app before uploading it to Google Play. It is only used between you and Google Play. Therefore it could also be called upload-key.

Finally:
If you run into any problems in the play store then first make sure that you completed all mandatory sections of your game listing. I read often of people that though that a warning message (after upload) stopped the release of their app but then they noticed that they forgot to fill/complete other required data in the store listing (like Content Rating, GDPR / Data Privacy, etc...).

by (3,252 points)

First i created a release.keystore with that command you mentioned and then signed my app(in the keystore section of export to android by mentioning where is the release,release user,release password) and then clicked on export project,turned off the export with debug option and clicked on save. Then i uploaded this apk to the google console and got this error:https://drive.google.com/file/d/1ggbDslxq7kANhEfjNUIZihGZlt254M-V/view?usp=drivesdk.
How can i fix the error. Please help. And again thank you for your precious time and reply.

Ok, it seems that the app signing failed.

Check the Godot output window for any error messages concerning the jarsigner.
If you're on windows you might want to increase the number of rows in the output window (Upper left corner -> Settings -> layout -> Window buffer size -> height -> 8000) to make sure that messages will still be visible.

EXTREMELY THANKYOU!!! I AM DONE!! I WAS SEARCHING FOR THIS FOR MONTHS AND NOW THIS IS FINALLY DONE. YOU ARE THE BOSS. ONCE AGAIN THANKYOU AND ALSO THANKYOU FOR YOUR PRECIOUS TIME AND REPLY!!

Thank you for the feedback!

Could you tell me/us what/why your signing failed previously?

I didnt turned on the "signed" option when exporting to android. Thank you again!

After successfully uploading to google developer console, i tried to run that apk on an android device, but it is not opening. Whenever i click, it just flips the screen(because my game is landscape) and then the game closes. In short, it is not opening. Why isint it opening and whats the problem? Please help.

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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.