An open-source native mod menu for Magic Chess: Go Go, built with C++26 and the Android NDK. It injects a floating in-game overlay that exposes gameplay utilities through a Dear ImGui interface, with hooks powered by Dobby and IL2CPP symbol resolution via XDL.
- Overview
- Preview
- Technical Stack
- Project Structure
- Getting Started
- Building
- CI/CD & Releases
- Available Features
- FAQ
- Logging & Debugging
- Contributing
- License
This project is an advanced Android game modding example that compiles to a native shared library (.so) and is injected into the Magic Chess: Go Go game process at runtime. It serves as a comprehensive C++ mod menu example for those interested in Unity IL2CPP hooking and native Android development.
Once loaded, it intercepts internal game functions, resolves symbols from in-memory libraries, and renders a floating mod menu overlay using Dear ImGui — all without modifying the game's APK.
How it works:
The library entry point (Main.cpp) is executed as a background thread upon injection. It uses Dobby to hook into key game functions at runtime — including eglSwapBuffers for rendering the ImGui overlay and Unity's Input.GetTouch for capturing touch input within the mod menu. IL2CPP symbols are resolved dynamically using XDL, with support for nested class hierarchies, enabling reliable access to game internals across updates.
| Component | Technology | Purpose |
|---|---|---|
| Language | C++26 | Core mod logic and hook implementation (with optimized IL2CPP reflection caching) |
| Build System | Android NDK (ndk-build) |
Native compilation for ARM targets |
| Hooking | Dobby | Runtime function interception |
| Symbol Resolution | XDL | Dynamic library introspection |
| UI Rendering | Dear ImGui | In-game floating menu overlay |
| Networking | OpenSSL | HTTPS communication |
| Architecture | arm64-v8a |
Primary target ABI |
.
├── jni/ # Native source and NDK build configuration
│ ├── Main.cpp # Library entry point and core mod logic
│ ├── Android.mk # NDK module definitions and linker flags
│ ├── Application.mk # ABI, platform, and STL settings
│ ├── DOBBY/ # Dobby hook framework (prebuilts + headers)
│ ├── XDL/ # XDL symbol resolver (source + headers)
│ ├── IMGUI/ # Dear ImGui (source + headers)
│ ├── CURL/ # libcurl prebuilts
│ └── OPENSSL/ # OpenSSL prebuilts
├── dump/ # IL2CPP metadata dump (used for symbol offsets)
├── libs/ # Output directory for compiled .so files
│ └── arm64-v8a/
│ └── libmain.so
├── obj/ # Intermediate build objects (generated)
└── .github/
└── workflows/
└── release.yml # Automated build and release pipeline
Before building, ensure the following tools are available on your system:
| Requirement | Notes |
|---|---|
| Android NDK r29+ | Must be on your system PATH |
ndk-build |
Included with the NDK installation |
adb (optional) |
Required only for log inspection on a connected device |
Verify your NDK installation before proceeding:
ndk-build --versionClone the repository and run ndk-build from the project root:
git clone https://github.com/Yan-0001/MagicChessGoGo.git
cd MagicChessGoGo
ndk-build -C jniOn a successful build, the compiled shared library will be placed at:
libs/arm64-v8a/libmain.so
Automated builds are handled by GitHub Actions. Every push of a version tag triggers the pipeline, which compiles the library and publishes a new GitHub Release with the .so file attached as a downloadable asset.
Create and push a version tag prefixed with v:
git tag v1.0.0
git push origin v1.0.0The pipeline will then build libmain.so for all configured architectures, create a GitHub Release entry, and attach the compiled artifacts. The workflow definition is located at .github/workflows/release.yml.
The following mod features are currently implemented:
| Feature | Description |
|---|---|
| Player Info Table | Displays a dynamic list of all active players in the battle, including their names, current opponents, and bot status |
| Invisible Scouting | Allows watching other players without triggering the spectator notification, making the scouting invisible to the target |
Additional features are planned. Community contributions for new features are welcomed — please review the Contributing section before submitting.
How does the mod menu work?
The mod menu uses Dobby to hook into the eglSwapBuffers function of the Android graphics system, allowing it to render a Dear ImGui overlay on top of the game. It captures touch input by hooking Unity's native input methods.
What is IL2CPP resolution? IL2CPP (Intermediate Language To C++) is Unity's technology for converting C# code into C++ for better performance. This project uses XDL to dynamically find the memory addresses of these C++ functions at runtime, allowing the mod to interact with game logic without needing a static offset for every update.
Is this an Android game modding tutorial?
While this is a functional project, the clean code structure and comprehensive README.md make it an excellent reference for anyone looking for a native Android modding guide.
The project uses Android's native logging subsystem (__android_log_print). All log output is tagged MagicChessGoGo and can be filtered with adb logcat.
adb logcat -s MagicChessGoGoVerbose logging is controlled by the IS_DEBUG macro in jni/Main.cpp:
#define IS_DEBUG 1 // Enable verbose logging (development)
#define IS_DEBUG 0 // Disable logging (production)Set IS_DEBUG to 0 before building release artifacts to eliminate logging overhead.
Contributions are welcome. For minor fixes or improvements, feel free to open a pull request directly. For significant changes or new feature proposals, please open an issue first to allow for discussion before implementation begins.
# 1. Fork the repository and clone your fork
git clone https://github.com/YOUR_USERNAME/MagicChessGoGo.git
# 2. Create a feature branch
git checkout -b feature/your-feature-name
# 3. Commit your changes with a descriptive message
git commit -m "feat: add your feature description"
# 4. Push to your fork and open a Pull Request
git push origin feature/your-feature-namePlease follow existing code style and include relevant comments where the logic is non-obvious.
This project is intended for educational and research purposes only. Use of this mod in online or competitive game modes may violate the Magic Chess: Go Go Terms of Service and could result in account penalties. The authors assume no responsibility for misuse.
Distributed under the MIT License. See LICENSE for full details.
