aimardcr

aimardcr / ArtHook

Public

Self-contained, dependency-free ART method hooking for Android 8–15. ArtMethod-level, lock-free.

19
6
69% credibility
Found May 26, 2026 at 19 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
C++
AI Summary

ArtHook is a C++ programming library for Android that lets developers intercept and replace Java methods at the system runtime level. It works by finding the internal structures that Android uses to store method information, then redirecting calls so your custom code runs instead of the original. The library can work across many different Android versions automatically, handles multiple threads safely, and provides a way to still call the original method if needed. An example use case shown is bypassing SSL certificate security checks in apps.

How It Works

1
🔍 You need to change how an app works

You have an Android app and want to modify or observe how certain Java methods behave without rewriting the app itself.

2
📦 You find ArtHook

You discover this library that can intercept any Java method and run your own code instead, while still letting you call the original.

3
🔧 You add it to your project

You include this library in your Android project build, like adding any other code library to your app.

4
🎯 You choose which method to intercept

You pick any Java method in the app—maybe one that checks security certificates or handles data—and tell ArtHook to run your code instead.

5
Two paths emerge
Replace the method entirely

Your code runs instead of the original, giving you full control over what happens.

👀
Watch and then call the original

Your code runs first, then you can still call the original method whenever you want.

6
🚀 Everything works together

ArtHook automatically handles the tricky parts—figuring out how the app's internal structures work, keeping things thread-safe, and making sure your replacement code gets called correctly.

Your modification is live

The app now runs your custom code when those methods are called, while the rest of the app continues normally.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 19 to 19 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is ArtHook?

ArtHook is a self-contained C++ library that hooks Java methods directly inside Android's runtime. Instead of relying on Frida, Xposed, or SandHook, it manipulates ArtMethod structures by discovering their memory layout at runtime. You get a replacement function that receives the original method's JNI signature, plus a callable backup to invoke the unmodified original. Hook installation takes a mutex, but hooked method calls are lock-free. It supports Android 8 through 15 across arm64, arm32, x86_64, and x86.

Why is it gaining traction?

The dependency-free design is the main draw. You drop in a static library and link it—no runtime agents, no external daemons. The runtime layout discovery means no per-version offset tables to maintain; if a new Android version ships, the library probes the live runtime instead of breaking. The RAII wrapper handles GlobalRef management and provides a typed invoke() that works uniformly across native and non-native targets. For SSL pinning bypass and similar security research tasks, this is a clean primitive that integrates into zygisk or ptrace-based injection without pulling in a full instrumentation framework.

Who should use this?

Security researchers and reverse engineers who need to intercept Java method calls inside Android apps. Malware analysts replacing certificate validation. Developers buildingMagisk modules or similar system modifications who want a lightweight hooking primitive without Frida's overhead. Not for app developers—ArtHook assumes you already have code execution inside the target process.

Verdict

ArtHook is a well-engineered, focused tool with a clever runtime discovery approach that should survive future Android updates. The 19 stars and limited community footprint mean you're adopting early-stage software with minimal external validation. The documentation is solid and the test suite is comprehensive, but the low credibility score reflects the project's niche audience and short track record. Worth evaluating for security research projects; wait for broader adoption before using in production systems.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.