Android-Mem-Kit
The Modern Standard Stack for Android Memory Instrumentation in Rust.
android-mem-kit is a robust, type-safe wrapper around the battle-tested C/C++ libraries used in Android game modding and security research. It bridges the gap between low-level memory manipulation and Rust's safety, allowing you to write high-performance tools for rooted devices.
Features
| Feature | Powered By | Description |
|---|---|---|
| Hooking | Dobby | Near-branch trampoline hooking support for ARM64/ARM. |
| Patching | KittyMemory | Runtime memory patching with hex string support & restore capability. |
| Bypass | xdl | Bypasses Android 7+ linker restrictions (dlopen/dlsym restrictions). |
| Il2Cpp | Built-in | Helper macros to resolve Il2Cpp exports dynamically without header files. |
| Security | obfstr | Compile-time string obfuscation included by default. |
Prerequisites
Since this crate compiles C++ code natively for Android, you need the Android NDK.
-
Install Android NDK (r25b or newer recommended).
-
Set Environment Variable before compiling:
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
= "0.2" # Recommended for library initialization
= "0.4"
= "0.13"
Quick Start
Here is a complete example of a mod menu backend or instrumentation tool.
use ;
use ctor;
use c_void;
// 1. Setup Entry Point
// Custom Hook Handler
unsafe extern "C"
Building
Use cargo-ndk or standard cargo with target specification:
Note: Ensure your build.rs can find the NDK toolchain.
Credits & Acknowledgements
This project wouldn't be possible without the open-source community. Huge thanks to the authors of the underlying C/C++ libraries:
- Dobby by jmpews - Lightweight, multi-platform hooking framework.
- KittyMemory by MJx0 - Memory manipulation library for Android/iOS.
- xdl by hexhacking - The ultimate solution for Android linker restrictions.
License
This project is licensed under the MIT License - see the LICENSE file for details.