finds.dev← search

// the find

asLody/SandHook

★ 2,222 · Java · NOASSERTION · updated Jan 2023

Android ART Hook/Native Inline Hook/Single Instruction Hook - support 4.4 - 11.0 32/64 bit - Xposed API Compat

SandHook is an ART method hook library for Android 4.4–11, letting you intercept Java methods at runtime without root by patching the ART interpreter's method entry points. It ships both a Java-side annotation API and a native inline hook for C/C++ code, plus a compatibility shim for the Xposed API so existing Xposed modules can run without Xposed Framework. The target audience is Android reverse engineers, security researchers, and people building virtual app containers like VirtualApp.

The annotation-based API is clean — you declare your hooks as static methods with matching signatures and SandHook handles the ART internals, which is much less error-prone than manual offset patching. The native hook component includes a proper instruction relocator for ARM32/Thumb2/ARM64, so it handles PC-relative instructions rather than naively copying bytes and crashing. It explicitly handles the JIT inline and dex2oat inline cases, which most competing libraries ignore until you hit a mysterious crash in production. The Xposed API shim means it can be a drop-in backend for existing Xposed module codebases without code changes.

The project is effectively abandoned — no commits since January 2023 and Android 12+ (API 31+) is not supported at all, which means it misses the last three major Android releases and the ongoing ART changes that shipped with them. ARM32 is listed as 'no tested', which is not great for a library whose core value is cross-device correctness. Documentation is sparse and primarily in Chinese, the English README is a thin skim over the surface, and there are zero unit or integration tests in the repo. The Bintray distribution links are dead (Bintray shut down in 2021), so you cannot actually depend on this via Gradle without self-hosting the artifacts.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →