HuntMemory (HMem) πβ‘¶
HuntMemory (HMem) is a high-performance process memory editor and scanner designed exclusively for Android 10+ (API 29+) on ARM64 (arm64-v8a / aarch64-linux-android).
The project pairs a modern Jetpack Compose floating overlay UI with an ultra-fast Rust 2024 scanning core accelerated by ARM NEON SIMD, interfacing directly with the Linux kernel via the HMKPM (KernelPatch Module).
π§ Documentation Navigation¶
-
:material-layers-triple:{ .lg .middle } System Architecture
Explore the multi-tier isolation model, Android
OverlayService,libsuRootService AIDL IPC, and the Rust JNI engine. -
:material-flash-outline:{ .lg .middle } Memory Scanning Engine
Understand the ARM64 NEON SIMD vectorization, 4MB β 64KB subdivision reader, ACTk obscured types, and memory region filtering.
-
:material-code-json:{ .lg .middle } Lua Scripting & Canvas
Automate scans with Lua 5.4, use the GameGuardian compatibility layer (
gg.*), create dynamic menus, and render hardware-accelerated Canvas ESP overlays. -
:material-shield-key-outline:{ .lg .middle } HMKPM Kernel Protocol
Deep-dive into the
SYS_GETRESUIDsyscall hook (148), C-ABI struct layouts, batch payload memory alignments, and MMUpgdresolution. -
:material-hammer-wrench:{ .lg .middle } Building & Setup
Prerequisites, Android NDK 29+ setup, Rust 2024
cargo-ndkcompilation, Gradle automation, and troubleshooting.
π± Target Device Requirements¶
To run HuntMemory on your device:
- Architecture: Physical 64-bit ARM device (
arm64-v8a/aarch64). - Android Version: Android 10.0+ (API level 29 or higher).
- Kernel Version: Kernel Linux 4.14+.
- Root Environment: Magisk 26+, KernelSU, or APatch with root granted.
- KernelPatch & HuntMemory-KPM (HMKPM):
- Device kernel patched with KernelPatch or KPM-Manager.
- HMKPM loaded to enable direct MMU memory manipulation via the
SYS_GETRESUIDsyscall hook.
- Overlay Permission:
- Grant "Display over other apps" (
SYSTEM_ALERT_WINDOW) when prompted on the initial launch.
- Grant "Display over other apps" (
ποΈ System Architecture Preview¶
HuntMemory isolates presentation, privileged operations, and native computation across distinct security domains:
graph TD
subgraph UI_Space ["Android App (Userspace - App Process)"]
UI["Overlay UI (Jetpack Compose)"]
VK["Virtual Keyboard (QWERTY / NUM / HEX)"]
Canvas_UI["LuaCanvasOverlay (GPU / DrawScope)"]
Tabs["Tabs (Process / Scan / Table / Lua / Settings)"]
Conn["HMemServiceConnection (IPC Client)"]
end
subgraph Root_Space ["Root Service (Userspace - UID 0 via libsu)"]
RS["HMemService (RootService AIDL)"]
NB["NativeBridge (JNI @FastNative)"]
subgraph Rust_Engine ["Rust Engine (libhmem_jni.so)"]
SCAN["Scanner (ARM NEON SIMD)"]
EDIT["Editor & FreezeEngine (Worker Thread)"]
SCRIPT["Lua 5.4 Engine (mlua + gg.* API)"]
MAPS["Maps & Pagemap Streaming Parser"]
KPMC["HMKPM Client (mlock + Syscall Hook)"]
end
end
subgraph Kernel_Space ["Kernel Space (KernelPatch Module)"]
KPM["HMKPM (KernelPatch Module)"]
PGD["MMU Page Table Walking (task->mm->pgd)"]
MEM["Target Process Physical RAM"]
end
UI --> Conn
VK --> UI
Tabs --> UI
Conn -- "AIDL / Binder IPC" --> RS
RS --> NB
NB --> Rust_Engine
SCRIPT -. "Canvas & UI Callbacks" .-> Canvas_UI
KPMC -- "Syscall getresuid (Magic 0x00484D4B504D)" --> KPM
KPM --> PGD
PGD --> MEM
β¨ Key Features¶
-
π― SIMD-Accelerated Memory Scanning:
- ARM NEON Intrinsics: Vectorized memory evaluation processing up to 16 bytes per cycle.
- Multi-Type & Auto Scan: Search across multiple integer and floating-point types simultaneously.
- Range & Group Scanning: Locate values within bounds or discover structured variables grouped closely in memory (
spec:distance). - Unknown & Differential Scans: Track dynamic values with Increased, Decreased, Changed, Unchanged, and delta filters.
-
π Lua 5.4 Scripting & GameGuardian Compatibility:
- Native
hmem.*&gg.*Support: Direct compatibility for running existing GameGuardian scripts. - Dynamic Overlay Menus & Dialogs: Create custom floating cheat menus, prompts, and choice selectors in Jetpack Compose directly from Lua.
- On-Screen Canvas Overlay (ESP/HUD): Hardware-accelerated 2D lines, bounding boxes, circles, and text rendering overlaying target games.
- Native
-
π Obscured & Scientific Number Support:
- XOR-Keypair Decryption: Native detection and editing for Anti-Cheat Toolkit (ACTk) obscured types (
ObscuredInt,ObscuredFloat,ObscuredDouble,ObscuredLong). - BigDouble / Scientific Structs: Parse and modify scientific mantissa/exponent structures used by incremental engines (
BreakInfinity/Decimal).
- XOR-Keypair Decryption: Native detection and editing for Anti-Cheat Toolkit (ACTk) obscured types (
-
πΊοΈ Comprehensive Memory Region Filtering:
- Automatically classifies memory mappings:
Anonymous [A],C++ Alloc [CA],C++ BSS [CB],C++ Data [CD],C++ Heap [CH],Java Heap [JH],Stack [S],Ashmem [AS], andLibraries [XA]. - Pagemap residency verification and zram swap awareness.
- Automatically classifies memory mappings:
-
βοΈ Real-Time Memory Editing & Freeze Engine:
- Single and batch memory writing.
- Low-overhead native background thread maintaining locked values at configurable intervals.
-
π± Modern Floating Overlay UI:
- Fully resizable and movable overlay built with Jetpack Compose Material 3.
- Integrated Contextual Virtual Keyboard: Custom QWERTY, Numeric, and Hexadecimal input without triggering system IME displacements.
π οΈ Quick Build¶
# Clone repository
git clone https://github.com/Yervant7/HuntMemory.git
cd HuntMemory
# Add ARM64 Rust target & cargo-ndk
rustup target add aarch64-linux-android
cargo install cargo-ndk
# Compile Debug APK (Rust native library compiles automatically)
.\gradlew assembleDebug
For complete compilation guidelines, refer to the Building Guide.