Skip to content

Compiling on Android

SkullzOTS edited this page Nov 9, 2025 · 3 revisions

Android Studio with vcpkg

1. Download/install the required software

To compile on Android, you will need to download and install:

2. Set up vcpkg

Make sure to follow full installation of vcpkg, per Official Quickstart execute the following in Powershell:

git clone https://github.com/Microsoft/vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg integrate install

3. Download the source code and install vcpkg dependencies

git clone --recursive https://github.com/mehah/otclient.git
vcpkg install

4. Copy the Android Libraries

Extract the android libraries inside android/app/libs folder.

5. Copy data.zip to Android assets

Create a data.zip file containing the init.lua, mods, modules, data and add it to android/app/src/main/assets.

6. Create Environment Variables:

  • ANDROID_NDK_HOME pointing to the Android NDK root folder (Ex.: C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\29.0.13599879).
  • VCPKG_ROOT pointing to the vcpkg folder.

7. Build

Open Android Studio, click to open project and select the otclient/android folder.

Wait Android Studio synchronize the project and download dependencies.

Navigate through the menu, find "Build" and then "Generate Signed App Bundle or APK..."

Select "APK" and proceed, create a new key, select it and proceed again.

Select "Release" and proceed (Create).

Now, just wait for the compilation to complete and you will have the .apk file in otclient-main/android/app/release, ready to play.

8. Video-Tutorial (step by step)

https://youtu.be/1HjtL_sF0GE

Clone this wiki locally