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).
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 Device kernel patched with 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.
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
For complete technical specifications, see the System Architecture Documentation.
-
π― 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.
Deep-dive documentation for all core subsystems is available online at yervant7.github.io/HuntMemory or in the docs/ directory:
- ποΈ System Architecture β Architectural layers, lifecycle management, and IPC mechanics.
- β‘ Memory Scanning Engine β SIMD vectorization, chunked reading pipelines, and scan modes.
- π Lua Scripting & Canvas β Lua 5.4 runtime,
gg.*compatibility, and real-time Canvas ESP overlay. - π‘οΈ HMKPM Kernel Protocol β KernelPatch module specifications, struct layouts, and syscall definitions.
- π οΈ Building & Setup Guide β Toolchain requirements, Gradle build tasks, and debugging tips.
HuntMemory/
βββ AGENTS.md # Project rules and architectural guidelines
βββ LICENSE # GNU General Public License v3.0
βββ README.md # Project overview and quick start
βββ docs/ # In-depth technical documentation
β βββ architecture.md # System architecture and multi-tier design
β βββ building.md # Toolchain prerequisites and build guide
β βββ index.md # Documentation homepage & portal
β βββ kernel-protocol.md # HMKPM kernel communication protocol
β βββ lua-scripting.md # Lua 5.4 scripting & Canvas overlay API
β βββ memory-scanning.md # SIMD scanning engine and data types
β βββ requirements.txt # MkDocs documentation build requirements
βββ app/
β βββ build.gradle.kts # Android build script & cargo-ndk automation
β βββ src/main/
β β βββ AndroidManifest.xml # App manifest & permissions
β β βββ aidl/com/yervant/huntmem/
β β β βββ IHMemService.aidl # RootService AIDL IPC contract
β β βββ hmem/ # Rust core workspace
β β β βββ Cargo.toml # Workspace configuration
β β β βββ hmem_jni/
β β β βββ Cargo.toml # Native dependencies
β β β βββ src/
β β β βββ lib.rs # JNI boundary & session manager
β β β βββ kpm.rs # HMKPM kernel client (syscall 148)
β β β βββ scanner.rs # NEON SIMD memory scanner
β β β βββ editor.rs # Memory editor & freeze engine
β β β βββ script.rs # Lua 5.4 engine & GameGuardian bridge
β β β βββ maps.rs # /proc/[pid]/maps parser & classifier
β β β βββ pagemap.rs # /proc/[pid]/pagemap resident page reader
β β β βββ types.rs # C-ABI structs and supported data types
β β β βββ logger.rs # Android logcat bridge
β β βββ kotlin/com/yervant/huntmem/
β β βββ HuntMemApp.kt # Application entry point
β β βββ backend/ # Root service, IPC & native bridge
β β β βββ NativeBridge.kt # @FastNative JNI wrappers
β β β βββ HMemService.kt # libsu RootService implementation
β β β βββ HMemServiceConnection.kt # Service lifecycle manager
β β β βββ MemoryEngine.kt # High-level memory scan orchestrator
β β β βββ MemoryScanManager.kt # Scan session manager
β β β βββ ShellProcessProvider.kt # Process discovery & enumeration
β β βββ ui/ # Jetpack Compose UI
β β βββ MainActivity.kt # Setup & permission verification
β β βββ OverlayService.kt # Floating overlay lifecycle service
β β βββ OverlayUI.kt # Main Compose overlay container
β β βββ keyboard/ # Integrated virtual keyboard
β β βββ overlay/
β β β βββ LuaCanvasOverlay.kt # Real-time GPU Canvas overlay renderer
β β β βββ tabs/ # UI tabs (Process, Scan, Table, Lua, Settings)
β β β βββ AddressTableTab.kt # Frozen & saved address manager
β β β βββ LuaScriptTab.kt # Lua script editor & console
β β β βββ LuaUiBridge.kt # Dynamic UI & Canvas dispatcher
β β β βββ MemoryScanTab.kt # Memory scanner & filter UI
β β β βββ ProcessSelectionTab.kt # Process selector
β β βββ theme/ # Material 3 styling & typography
- Android SDK:
compileSdk = 37,minSdk = 29, NDK29.0.14206865 - JDK: Java 21 LTS
- Rust: Rust 2024 Edition (
rustup target add aarch64-linux-android) - cargo-ndk:
cargo install cargo-ndk
Gradle automatically builds the Rust native shared library (libhmem_jni.so) during the build lifecycle:
# Debug build
.\gradlew assembleDebug
# Release build
.\gradlew assembleReleaseFor detailed instructions, refer to the Building Guide.
HuntMemory is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.