OXCE for Android is, as the name suggests, a port of OXCE to the Android platform. In order to achieve this, it uses SDL2 set of libraries, and a portion of Java code for some convenient features like auto-updating files after installing new version.
Uses afiledialog library.
In order to build OXCE for Android, you'll need:
- Android Studio (latest stable recommended)
- Android SDK with compileSdk 35 and targetSdk 36
- Android NDK r30 (30.0.14904198)
- Gradle 9.3.1 / Android Gradle Plugin 9.1.1 (handled automatically by the wrapper)
This project uses git submodules, so in order to get the code, you'll have to do the following:
-
Clone this project:
git clone https://github.com/MeridianOXC/openxcom-android.git cd openxcom-android git checkout oxce-plus-proto -
Get submodules:
git submodule init git submodule update -
The SDK and NDK paths are detected automatically by Android Studio. If building from the command line, create a
local.propertiesfile in the project root:sdk.dir=/path/to/Android/sdkThe NDK version is pinned in
app/build.gradle(ndkVersion) and will be downloaded automatically by the SDK manager if not already installed.
Run the Gradle wrapper with the assembleDebug or assembleRelease task:
$ ./gradlew assembleRelease
The resulting .apk will be in app/build/outputs/apk/ folder.
You might also include additional data in the apk itself. Everything you put in
app/src/main/jni/OpenXcom/bin subdirectories will be packed as assets and automatically
installed on first launch. Note that redistribution of such builds may be illegal in some
countries and should only be used for debugging purposes.
The following NDK-level compatibility shims are in place (see commit history for details):
- NDK r28+ —
-Wincompatible-function-pointer-typesis now an error; suppressed for the SDL2 target where the GL ES2 function table has a benign const-qualifier mismatch. - NDK r30 —
ALooper_pollAllwas removed; replaced withALooper_pollOnce(identical signature, same semantics for a zero-timeout non-blocking poll).
The app writes game data to external storage (/sdcard/openxcom/). On Android 11 and later
(API 30+), WRITE_EXTERNAL_STORAGE has no effect. The app requests the
MANAGE_EXTERNAL_STORAGE ("All files access") permission at first launch via a system
settings screen. This permission must be granted for the preloader to extract bundled assets.
This is a fork of sfalexrog's repository of OpenXcom for Android and most of the actual work has been done by him.
I (Meridian) have only copied and customized his work on this build system.
Many thanks also to Stoddard for helping with all aspects of the project (2019).
Many thanks also to robmat for modernising the build system (2026).