[Android] Compiling OTClient Redemption Sources

1. Download/install the required software:

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

2. VCPKG:

If you don't have vcpkg installed

Use Powershell in directory C:

  • cd C:\

• To complete vcpkg installation, run the commands below in Powershell:

  • git clone https://github.com/microsoft/vcpkg

  • cd vcpkg

  • .\bootstrap-vcpkg.bat

  • .\vcpkg integrate install

If you already have vcpkg installed

Use Powershell in directory C:

  • cd C:\vcpkg

• To update vcpkg installation, run the commands below in Powershell:

  • git pull

  • .\vcpkg upgrade

  • .\bootstrap-vcpkg.bat

  • .\vcpkg upgrade --no-dry-run

3. Download the source code:

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

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, 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\25.1.8937393).

  • 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.

Create an new emulator to run the project or plugin your own android device.

Click on Play Button or just Shift+F10 to run the project.

Last updated