RA3 Native

RA3 Native is a port of Command & Conquer: Red Alert 3 to Android that runs the game natively without emulation.

README

RA3 Native icon

RA3 Native

Command & Conquer: Red Alert 3 running natively on Android
Static recompilation of the original x86 game into ARM64 — no Winlator, no Box64, no emulator at run time.

Download Nightly Downloads Android 10+ arm64 Experimental GPL-3.0

Important

No game files are included. This project contains only tools and a runtime. You need your own legally obtained copy of Red Alert 3: the retail / EA app game (patch 1.12) or the Steam release (1.13).


Contents

What works

🎮 GameplaySkirmish and campaign, all three factions, saving and loading
🖼️ GraphicsFull 3D world, water, shadows, explosions, fire and most weapon effects; all graphics presets selectable in the game's options
⚡ PerformanceStable 30 fps in large battles on a Snapdragon 8 Gen 2 (dedicated render thread, shader cache)
🎬 VideoIntro, briefings and campaign cutscenes at full speed
👆 Touch controlsTap, long press, drag-select, pan, pinch zoom, camera rotation
⌨️ KeyboardYour own on-screen hotkey buttons (any key, set up in the game), the Android keyboard for text; physical keyboards work too
🌐 NetworkWindows sockets on top of Android networking; the LAN menu opens — LAN play is being tested
📱 Wide screensBattles fill the whole screen of modern 20:9 / 21:9 phones and show more of the map
🚀 LauncherStart screen with language, HUD size, wide screen, cutscene and logging options, background file check
🟦 Steam releaseThe Steam game (1.13) runs in its own app, RA3 Native Steam — no Steam client needed

Requirements

  • Android 10 or newer, 64-bit (arm64) with OpenGL ES 3.2. Developed and tested on a Snapdragon 8 Gen 2; other recent Snapdragon devices should work.
  • Mali / PowerVR GPUs — experimental: these GPUs cannot read the game's DXT textures, so they are converted to ETC2 on the first load and kept in a cache (up to 1.5 GB), which makes the first start of each map noticeably slower. The Fast shaders launcher option can speed up the GPU at a small cost in image quality. Reports from Mali devices are very welcome.
  • Red Alert 3 — patch 1.12 (retail DVD, EA app / Origin) or the Steam release (1.13): the full game folder (about 8.7 GB) on the phone's internal storage, a memory card or a USB drive.
  • About 4 GB of free RAM recommended.

Which app: RA3 Native or RA3 Native Steam

The recompiled code runs exactly the game executable it was made from, so there are two apps, one per game build. Both install side by side, each with its own settings and saves.

Your gameGame file in Data/AppAPK
Retail DVD, EA app / Origin, patched to 1.12ra3_1.12.gameRA3 Nativera3-native-<version>.apk
Steam (also the Ultimate Collection on Steam)ra3_1.13.gameRA3 Native Steamra3-native-steam-<version>.apk

A Steam game folder also contains an old ra3_1.12.game, which can be a different build from the retail 1.12 — with Steam, always use RA3 Native Steam. The Steam app needs no Steam client and no internet connection; Steam Workshop items are not supported yet.

If the launcher reports UNKNOWN GAME BUILD, your game file is a build the apps were not made from (another edition, language or a modified copy). The game can still be started, and often runs — if it crashes, please open an issue with the SHA-256 the launcher shows and the log file.

Installation

  1. Download the APK for your game (see the table above) from the latest stable release and install it. Want the newest fixes before they are released? The nightly build is rebuilt after every change — it may be broken. A newer build always installs over an older one, whichever channel it comes from.
  2. Copy your game folder — the one that contains Data/ra3_1.12.game (Steam: Data/ra3_1.13.game) and the RA3_<language>_<version>.SkuDef files — to the phone's internal storage, a memory card or a USB drive (OTG), for example to /sdcard/Command and Conquer - Red Alert 3/. A Steam copy can be copied from a PC's steamapps/common/ folder, or downloaded on the phone with an Android Steam client app such as GameHub.
  3. Open RA3 Native (or RA3 Native Steam) and allow All files access when asked — the game reads its files directly from storage.
  4. The launcher looks for the game on the internal storage, memory cards and USB drives, checks the files and unlocks Play. If it does not find it, tap Game folder: the other storages are listed at the top of the folder list.

A game on a USB drive must stay connected while you play, and maps load more slowly from slow drives.

Tip

Files the game never uses can be moved out to save space: Launcher/, Support/, Trailers/, the installer files in the root folder and the older Data/ra3_1.*.game files (keep ra3_1.12.game, and ra3_1.13.game for Steam). Keep every .big archive and every .SkuDef file.

Mods (experimental)
  1. Put each mod in a folder named Mods inside the game folder, one folder per mod, as on PC: for example RA3/Mods/MyMod/MyMod_1.0.skudef next to the mod's .big files. A mod installed on a PC can be copied from Documents/Red Alert 3/Mods.
  2. Choose it under Mod in the launcher (the newest version of each mod is listed) and tap Play. None starts the game without a mod.

Most mods are made for patch 1.12 (RA3 Native); whether one also runs in RA3 Native Steam depends on the mod. Steam Workshop items are not listed yet; a Workshop mod can be used by copying its folder into Mods.

Controls

GestureAction
TapLeft click — select, give orders, press buttons
Long press (0.6 s)Right click
Hold, then dragSelection box
Quick swipeScroll the map (see Drag the map in the launcher options)
Two-finger tapRight click (cancel / deselect)
PinchZoom
Two-finger dragRotate the camera
Minimap: tap / dragMove the camera there / along the finger
Minimap: long pressSend the selected units there
⌨ buttonShow or hide the Android keyboard (player names, chat, save names)
D ENT ESC SPCDefault hotkey buttons: special ability, chat, menu, jump to event
EDITSet up the hotkey buttons: add any key (numbers, F1–F12, Ctrl groups C1…C0 = Ctrl+1…0, Shift / Ctrl / Alt, LMB / RMB mouse modes, number pad N0…N9 — the game's camera keys: N4 / N6 turn, N8 / N2 tilt, N5 resets the camera), remove one with its ✕, drag any button (also ⌨ and EDIT) to another place, RESET puts them all back, choose the left or right side for new ones; DONE saves

The buttons are see-through so the map shows behind them. With Wide screen on they sit in one row at the top centre. Shift, Ctrl and Alt buttons toggle: tap once to hold the key (the button lights up), tap again to release it. RMB lit: a tap is a right click (a long press a left click). LMB lit: a drag draws a selection box at once, without holding first.

The phone's volume keys keep working, and the screen stays on while the game runs.

Launcher options

OptionDefault
Interface languagedetectedEvery language installed in your game folder (RA3_<language>_1.12.SkuDef, Steam: _1.13)
ModNoneA mod from the Mods folder of the game folder (see Mods)
CutscenesOnIntro, briefings and campaign videos
Log fileOff in releases, on in nightly buildsWrites /sdcard/ra3_native.log (ra3_native_steam.log in RA3 Native Steam) — turn it on and attach the file to bug reports
HUD size110%Enlarges the minimap, build menu and other corner panels (100–200% in 10% steps)
Button size100%Size of the on-screen hotkey buttons (80–200%)
Button opacity100%How solid the on-screen buttons are; lower values show more of the map (30–100%)
Camera rotation300%How fast a two-finger drag turns the camera (100–1000%)
Drag the mapoffThe spot you touch stays under your finger, like a map app or a mobile strategy game (a quick swipe is finished after you let go); off: the camera moves the way you swipe, like the mouse in the game
Wide screenoffBattles fill the whole screen instead of 16:9 and show more of the map; the on-screen buttons move to one row at the top centre. Menus stay 16:9 with blurred sides. The game's resolution list offers sizes in your screen's shape
Fast shadersoffLower precision in pixel shaders: faster on Mali and weaker GPUs, occasional visual glitches

Performance

Measured on a Snapdragon 8 Gen 2 at 1920×1080:

SettingsTypical battleLarge battle
Medium30 fps30 fps
High30 fps28–30 fps

The game logic itself is capped at 30 fps, like on PC. Rendering runs on its own thread, and compiled shaders are cached (well under 1 MB), so new effects no longer stutter on later runs.

Known issues

  • Online play — the original GameSpy servers were shut down in 2014. Support for the community C&C:Online servers is planned.
  • LAN play is new and largely untested.
  • Mods are experimental and have been tried with few mods so far. Steam Workshop and Uprising are not supported yet. Uprising is a separate game with its own executable, which would need its own recompiled app.
  • The game runs at 30 fps, as on PC. An experimental 60 fps mode (/sdcard/ra3_fps60) exists but is not usable yet: the game's engine ties its logic and effects to the frame rate.

Found something else? Please open an issue with your device model and the ra3_native.log file (ra3_native_steam.log for the Steam app).

How it works

Red Alert 3 is a 32-bit Windows program. Instead of emulating an x86 CPU while you play, every function of the game is translated ahead of time into C++ and compiled for ARM64:

ra3_1.12.game ──► analyser + lifter (tools/) ──► C++ per function ──► clang ──► libra3native.so     (RA3 Native)
ra3_1.13.game ──►            〃                                              ──► libra3native113.so  (RA3 Native Steam)
                                                                                     │
                     Android runtime (runtime/): Win32 · D3D9 → OpenGL ES · audio · input · sockets
  • tools/ — a static analyser and lifter built on Capstone. It finds every function in the executable and emits C++ (f_XXXXXXXX(CPU*)) with the x86 registers held as host locals.
  • runtime/ — what the translated code runs against:
    • PE loader and a 4 GB guest address space
    • Win32, MSVCRT, DirectSound, XInput and WinSock import layers
    • a stand-in steam_api.dll for the Steam build: Steam reports as running and signed in, its interfaces follow the Steamworks SDK 1.60 the game was built with
    • Direct3D 9 → OpenGL ES 3 renderer: shader translation from D3D bytecode to GLSL, the D3DX effect framework (FX9) including preshaders, a dedicated render thread and a program binary cache
    • NEON versions of the MMX routines used by the VP6 video decoder
    • Touch input mapped to the RTS mouse and keyboard controls
  • android/ — the APK: launcher, native activity and the build scripts.

GitHub Actions builds everything: it fetches the game executable from a private location, runs the lifter, compiles the generated code and packages the APK. Generated code and game files are never committed.

Troubleshooting and diagnostics

Empty files with these names in /sdcard change the runtime's behaviour:

FileEffect
ra3_stRender on the game thread instead of the render thread
ra3_nocacheRe-send all graphics state for every draw (rules out state-cache bugs)
ra3_verboseMuch more detailed log
ra3_profCPU sampling profiler and GPU time per render pass, report in the log every 30 s
ra3_fxstatPer-effect draw statistics
ra3_frameFull trace of two frames (and render-target dumps into /sdcard/ra3_dump/ if that folder exists)
ra3_fps60Experimental 60 fps cap (effects and game speed are still wrong)
ra3_noetcMali / PowerVR: decode textures on the CPU instead of converting them to ETC2 (large textures then load at half resolution; ra3_fulltex keeps them full size)
ra3_nos3tcTest the Mali texture path (ETC2 conversion) on a GPU that supports DXT
ra3_nobatchDraw every mesh separately (turns off draw merging)

Remove them again for normal play — some of them slow the game down.

Building

The APK is built by .github/workflows/android.yml. To build it in your own fork you need the game executable available to the workflow (see the workflow for the expected secret and release).

The analyser alone:

g++ -O2 -std=c++17 -I<capstone>/include tools/analyze.cpp <capstone>/libcapstone.a -o analyze
./analyze ra3_1.12.game out

License

The code in this repository is licensed under the GNU General Public License v3.0. Forks and modified builds are welcome under its terms, which means the source of distributed changes stays open under the same license. Please credit RA3 Native with a link to this repository, and never bundle game files. Pull requests — especially for device compatibility — are appreciated.

Legal

This is an unofficial, non-commercial fan and research project. It is not affiliated with, endorsed or sponsored by Electronic Arts. Command & Conquer and Red Alert are trademarks of Electronic Arts Inc. No game code or assets are distributed — you must own the game. The app icon is an original design.