Ekyso/StS2-Launcher: Performing Runtime Surgery on Slay the Spire 2
How a custom Godot engine, memory hot-patching, and C-stubs trick a desktop game into running natively on Android without emulation or piracy.
- StS2-Launcher bypasses emulation entirely by using C-stubs to trick the Android linker into accepting desktop-only binaries.
- The system uses Harmony to hot-patch the game's UI and input logic in memory, preserving the integrity of the original Steam files.
- A Bring Your Own Game architecture leverages SteamKit2 and the Android Keystore to download legal assets directly from Valve.
- Custom Godot engine patches ensure Vulkan pipeline cache persistence, eliminating the shader stutter common in mobile ports.
Unofficial mobile ports usually rely on heavy translation layers or outright piracy. The StS2-Launcher takes a different path. It forces a desktop PC game to run natively on Android. It perfectly mimics the desktop environment using C-stubs, downloads legal depots from Valve, and hot-patches the game's memory at runtime. This is a masterclass in hostile environment engineering.
Faking the Desktop with Phantom Libraries
The hardest problem in native porting is the missing library dependency. The desktop game expects libraries like steam_api64.dll. On Android, these do not exist. The launcher solves this with C-based no-op stubs. These phantom libraries export the exact same function signatures but do nothing.
This tricks the Android linker into letting the game boot without crashing. The game believes it is running in a standard desktop environment.
Hot-Patching the Touchscreen
Modifying the core game files on disk would break Steam integrity checks. Instead, the launcher intercepts method calls in memory using Harmony. It translates mouse clicks to touch coordinates and scales the UI for mobile displays dynamically.
The Bring Your Own Game Architecture
Distribution is the downfall of most fan ports. This project requires a valid Steam login. It uses a programmatic Godot UI acting as a mini Steam client. It leverages SteamKit2 for depot downloading directly from Valve.
To protect user credentials, it encrypts refresh tokens using the hardware-backed Android Keystore with AES-256-GCM. Unofficial software does not have to mean insecure software.
I built a launcher that runs StS2 natively on Android - no emulation. It does require you to verify you own a copy of the game by logging in with Steam. All credentials are encrypted using AES-256-GCM and stored in the Android Keystore. It also supports cloud syncing and multiplayer.
Why Native Beats Translation
Running the game through a translation layer like Winlator introduces massive thermal overhead. Native execution avoids this entirely. The launcher even includes a custom Godot engine patch for Vulkan pipeline cache persistence.
This eliminates the mobile shader stutter that plagues standard ports. Background process kills no longer wipe the GPU shader cache.
| Feature | StS2-Launcher (Native) | Box64Droid / Winlator (Emulation) |
|---|---|---|
| Execution | Direct Godot Android runtime | x86 to ARM instruction translation |
| Performance | Native frame rates, Vulkan cache persistence | High thermal overhead, shader stutters |
| File Integrity | Verifies and patches in memory | Requires pre-installed or modified folders |
| Legality | Requires Steam login via SteamKit2 | Often relies on sideloading pirated copies |