ShovelKnight-PC

ShovelKnight-PC is a native port of Shovel Knight: Treasure Trove to Android and Linux, recompiled from x86 to C with an on-screen gamepad and Station-Z cloud saves.

README

ShovelKnight-PC icon

ShovelKnight-PC

Shovel Knight: Treasure Trove running natively on Android and Linux, from your own PC copy.

The GOG build recompiled ahead of time from x86 to C: no emulator, no Wine, no browser.
Native GLES, SDL3, FMOD audio, an on-screen gamepad and Station-Z cloud saves.

Android 11+ ARM64 Linux x86-64 x86 to C recompilation GLES | SDL3 MIT

Download the APK How it works Build from source Projeto Belmante on YouTube


Important

No game files are included. This project doesn't contain Shovel Knight or any of its assets. You need a legally owned copy of Shovel Knight: Treasure Trove for PC, the GOG build 4.1a. The app imports it from your device (the game folder or a .zip of it).

📸 Screenshots

Experimental ultrawide (520×240)Title screen on the Galaxy S23
Ultrawide, the PlainsTitle on the S23
Playing on a tabletA feat unlocked

✨ Features

🚀 NativeShovelKnight.exe and its FMOD DLLs are lifted from x86 to C and compiled for ARM64 (and x86-64 on Linux). A small runtime answers the Windows calls the game makes.
🖥️ Original framingThe game's own 400×240 picture, scaled sharp, with side bars on wide screens. An experimental ultrawide (SK_WIDE=1) widens the view to the screen's shape.
🎮 On-screen gamepadRound pixel-art buttons with Lucide icons and an 8-way d-pad, drawn over the game. Works alongside a controller.
📦 Simple launcherIn the game's own title-screen look: pick your game folder or .zip once, then the app opens straight into the game.
🔊 Full audioThe game's FMOD Ex / FMOD Event, recompiled too, through DirectSound → SDL3.
🏆 Feats in Station-ZThe game's 105 feats (achievements) exported with their titles, descriptions and icons, taken from your copy.
☁️ Cloud savesWith the Station-Z app and a plan, the save goes to the cloud and comes back on another phone.

📋 Requirements

DeviceAndroid 11+ (API 30), ARM64
Storage~450 MB free for the game files
GameShovel Knight: Treasure Trove, GOG build 4.1a (ShovelKnight.exe, fmodex.dll, fmod_event.dll, data/)
InputThe on-screen gamepad, or a controller (Bluetooth/USB), or a keyboard

The port is that exact executable recompiled, so the importer checks the SHA-256 of ShovelKnight.exe; other builds (Steam, older GOG versions) won't match.

📲 Installing

  1. Install the APK.
  2. Copy your game folder (or a .zip of it) to your phone, for example to Download/.
  3. Open Shovel Knight, choose IMPORTAR ARQUIVOS, then the folder or the .zip.
  4. Wait for the copy and choose JOGAR. From then on the app opens straight into the game.

Note

Your saves live in the app's private storage, and uninstalling the app deletes them. With Station-Z they are kept in the cloud.

⚙️ How it works

ShovelKnight.exe ─┐  discover.py   lift.py          clang / NDK
fmodex.dll       ─┼─► functions ─► C (one function ─► libmain.so ─► runtime: kernel32/msvcr100 HLE,
fmod_event.dll   ─┘   + call sites  per x86 func)                    SDL2→SDL3 bridge, EGL/GLES,
                                                                     DirectSound → SDL3 audio
  • Analysis (tools/funcs): every function of the executable and the FMOD DLLs is found and its indirect calls measured.
  • Lifting (tools/lift): each x86 function becomes a C function over a CPU struct and the guest memory; x87, SSE and MMX included.
  • Runtime (runtime/src): the Windows API the game uses (files, threads, timing, the CRT), SDL2 answered by SDL3, the game's GLES calls passed to the device, the optional ultrawide width, the on-screen gamepad and the feats export.
  • Android (android/, tools/android): built without Gradle (aapt2, javac, d8, apksigner); the launcher is plain Java drawing at the game's pixel size.

The full story, with screenshots of each step, is in docs/PROGRESS.md; the plan is in docs/PLAN.md.

🛠️ Building from source

python3 -m venv .venv && .venv/bin/pip install capstone==5.0.7 pefile pillow
# your GOG install in game/ (innoextract setup_shovel_knight_treasure_trove_*.exe -d game)
.venv/bin/python -I tools/funcs/discover.py      # functions -> private/analysis/functions.json
.venv/bin/python -I tools/funcs/callsites.py     # indirect call argument sizes
.venv/bin/python -I tools/lift/lift.py           # C -> private/lifted/
bash runtime/build.sh                            # Linux: private/build/shovelknight
bash tools/android/build_native.sh               # Android: libmain.so (NDK r28, SDL 3.4)
bash tools/android/build_apk.sh                  # -> private/android/shovel-knight-pc.apk
ScriptWhat it does
tools/funcs/discover.py, callsites.pyFinds the functions and the indirect call sizes
tools/lift/lift.pyLifts the executable (and, with --natives /dev/null, the FMOD DLLs) to C
runtime/build.shThe native Linux build
tools/android/build_native.sh / build_apk.shThe Android library and APK. SK_PUBLIC=1 leaves out the launcher art taken from your copy
tools/android/push_game.shDevelopment: pushes the game files over adb
play-native.shRuns the Linux build

Everything derived from the game (analysis, lifted C, objects, APKs) stays in private/, which git ignores.

📊 Status

✅Linux build: title, levels, sound, about 60 FPS
✅Android ARM64 on the Galaxy S23 and a Galaxy Tab S6 Lite, landscape only
✅On-screen gamepad, menus by the pad
✅Launcher: import from a folder or .zip
✅Feats exported for Station-Z (texts and icons from your copy); the game's own toast; feats kept in the save
✅Station-Z: cloud saves and feats (texts, dates and the feat icons) in the official Station-Z, verified on the Galaxy S23 (2026-11-29)
🚧Ultrawide (off by default, SK_WIDE=1): the HUD band stays 400 wide; a strip on the left at a level's start
🚧Touch-control and save options inside the game's own Options menu

⚖️ Legal

  • Shovel Knight © Yacht Club Games. This project is not affiliated with or endorsed by Yacht Club Games or Firelight Technologies.
  • This repository contains no game code or assets. The game is read from the user's own copy.
  • FMOD is proprietary and is not covered by this project's MIT license. See THIRD_PARTY_NOTICES.md.

💜 Credits

  • SDL, Capstone, Lucide and Press Start 2P
  • Prior work of Projeto Belmante: the Ultra Street Fighter IV, Rayman Origins and Celeste ports
  • And of course, Shovel Knight by Yacht Club Games. Go buy it if you haven't.

Made by Projeto Belmante · MIT License · Third-party components keep their own licenses (THIRD_PARTY_NOTICES.md)