Godot + Android dev

I have been playing with Gadot- game engine for a two weeks now. I am fancying its simple GUI and GDscript that closely resembles to python language.

Installing Godot was simple yet setting up for android and getting an android icon on the top right corner to run a game on an android device on one click almost took me half of my day.

So, This is me writing a comprehensive tutorial to setup Godot for Android Dev.

Install Godot

Install Android Studio and It’s SDK

Sure, you can only download SDK via terminal but, the android studio makes it a lot easier.

First install android studio.

Install Android SDK

First lunch android studio, open a terminal, go to the directory where you installed android. Then execute studio.h

cd android-studio/bin

./studio.sh

Now open SDK manger. Click the cube-like button at the top right corner of the android studio.

cube-like button at the top right corner is SDK manager

Select the latest android version. For me that was Android 10.0(Q), then click apply and rest will be done by android studio.

SDK manager

Setup in Godot

Click the Editor menu and go to Editor settings.

Click the Android menu inside the Export tab as shown in the figure.

you need to fill up Adb, jarsigner, Debug Keystore

You need three things to set up in godot.

The adb executable (adb.exe on Windows) The jarsigner executable (from JDK 6 or 8) The debug keystore

1. The adb executable (adb.exe on Windows)

Android Debug Bridge (adb) is the command-line tool used to communicate with Android devices. It’s installed with the SDK, but you may need to install one (any) of the Android API levels for it to be installed in the SDK directory.

Click folder icon of Adb and the choose adb file from, In the case of Linux it is at usr/bin/adb .

If you cannot find adb file inside usr/bin/ , install android-tools-adb and again repeat the above step.

sudo apt update sudo apt install android-tools-adb

2. The jarsigner executable (from JDK 6 or 8)

Click folder icon of Jarsigner and choose jarsigner file form usr/bin/jarsigner

3.The debug keystore

Enter this command to generate a Keystore. It will create debug.keystore file.

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

Again, choose a debug.keystore file from the folder icon of the Debug Keystore field.

Add Export template

So, lastly to make it work we have to export android template. To do so,

Go to Project menu

Click Export

If you don’t have template, Godot will tell you to download.

Now click Add button then select android

Fill up Unique Name and Name under Package.

Simply close the Export window

Setting up mobile

1. Enable Developer mode

Go to Software Information inside settings and click Build Number up to 7 times. It will enable developer mode.

2. Enable USB Debugging

In the developer options of your phone’s settings, You have to enable the USB debugging option under the Debugging section and accept all the permission requests that popup on your phone screen.

Run Game on Android on One Click

Connect your android device with your computer

Andriod icon will appear in Godot top right corner

Click the android button.