alibaba/dexposed
dexposed enable 'god' mode for single android application.
Stale and unlicensed — last commit 9y ago
weakest axisno license — legally unclear; last commit was 9y ago…
no license — can't legally use code; no tests detected…
Documented and popular — useful reference codebase to read through.
no license — can't legally use code; last commit was 9y ago…
- ✓8 active contributors
- ⚠Stale — last commit 9y ago
- ⚠Concentrated ownership — top contributor handles 52% of recent commits
Show all 6 evidence items →Show less
- ⚠No license — legally unclear to depend on
- ⚠No CI workflows detected
- ⚠No test directory detected
What would change the summary?
- →Use as dependency Concerns → Mixed if: publish a permissive license (MIT, Apache-2.0, etc.)
- →Fork & modify Concerns → Mixed if: add a LICENSE file
- →Deploy as-is Concerns → Mixed if: add a LICENSE file
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Great to learn from" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/alibaba/dexposed)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/alibaba/dexposed on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: alibaba/dexposed
Generated by RepoPilot · 2026-05-09 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/alibaba/dexposed shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
AVOID — Stale and unlicensed — last commit 9y ago
- 8 active contributors
- ⚠ Stale — last commit 9y ago
- ⚠ Concentrated ownership — top contributor handles 52% of recent commits
- ⚠ No license — legally unclear to depend on
- ⚠ No CI workflows detected
- ⚠ No test directory detected
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live alibaba/dexposed
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/alibaba/dexposed.
What it runs against: a local clone of alibaba/dexposed — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in alibaba/dexposed | Confirms the artifact applies here, not a fork |
| 2 | Default branch master exists | Catches branch renames |
| 3 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 4 | Last commit ≤ 3357 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of alibaba/dexposed. If you don't
# have one yet, run these first:
#
# git clone https://github.com/alibaba/dexposed.git
# cd dexposed
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of alibaba/dexposed and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "alibaba/dexposed(\\.git)?\\b" \\
&& ok "origin remote is alibaba/dexposed" \\
|| miss "origin remote is not alibaba/dexposed (artifact may be from a fork)"
# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
&& ok "default branch master exists" \\
|| miss "default branch master no longer exists"
# 4. Critical files exist
test -f "dexposed/src/main/java/com/taobao/android/dexposed/DexposedBridge.java" \\
&& ok "dexposed/src/main/java/com/taobao/android/dexposed/DexposedBridge.java" \\
|| miss "missing critical file: dexposed/src/main/java/com/taobao/android/dexposed/DexposedBridge.java"
test -f "dexposed/src/main/java/com/taobao/android/dexposed/XC_MethodHook.java" \\
&& ok "dexposed/src/main/java/com/taobao/android/dexposed/XC_MethodHook.java" \\
|| miss "missing critical file: dexposed/src/main/java/com/taobao/android/dexposed/XC_MethodHook.java"
test -f "dexposed/src/main/java/com/taobao/android/dexposed/XposedHelpers.java" \\
&& ok "dexposed/src/main/java/com/taobao/android/dexposed/XposedHelpers.java" \\
|| miss "missing critical file: dexposed/src/main/java/com/taobao/android/dexposed/XposedHelpers.java"
test -f "dexposed/src/main/jniLibs/armeabi/libdexposed.so" \\
&& ok "dexposed/src/main/jniLibs/armeabi/libdexposed.so" \\
|| miss "missing critical file: dexposed/src/main/jniLibs/armeabi/libdexposed.so"
test -f "dexposed_so/dexposed_dalvik/dexposed.cpp" \\
&& ok "dexposed_so/dexposed_dalvik/dexposed.cpp" \\
|| miss "missing critical file: dexposed_so/dexposed_dalvik/dexposed.cpp"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 3357 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~3327d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/alibaba/dexposed"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
Dexposed is a non-invasive Android AOP (Aspect-Oriented Programming) framework that enables runtime method hooking for any code running in an app's process—including Android framework classes. It works by loading a tiny JNI library (libdexposed.so) at app startup, allowing you to inject code before, after, or replace method execution without bytecode weaving or annotation processing. Two-part structure: dexposed/ is a Gradle Android library containing the Java API (DexposedBridge.java, XC_MethodHook.java, XposedHelpers.java) and pre-built native libraries for armeabi; dexposed_so/ contains C++ source for both Dalvik (dexposed_dalvik/) and ART (dexposed_art/) runtime implementations, built separately via Android.mk. The native layer patches method execution trampolines; the Java layer provides the hook registration API.
👥Who it's for
Android app developers and security researchers who need to intercept and modify method behavior at runtime for instrumentation, hot-patching critical bugs, SDK hooking, or performance monitoring—without modifying the original app code or rebuilding the Android framework.
🌱Maturity & risk
Moderately mature but aging: last significant activity appears to be around 2015–2016 (Gradle config references old Android tooling: buildToolsVersion 21.1.2, gradle:1.2.3). The code is production-capable (used at Alibaba), but there's no evidence of recent commits, CI/CD pipeline, or active test suite visible in the file structure. Treat as stable but not actively maintained.
High risk for modern Android: the project targets very old Android versions (Dalvik and early ART) with pre-built .so files dated to Android 4.x–5.1; modern Android versions (6+, definitely 12+) have stricter runtime protections that may break hooking. Single maintainer (hwjump at Alibaba), zero visible dependency management, and no recent security updates. Integrating into production apps requires thorough testing on target API levels.
Active areas of work
No active development is visible. This is a historical snapshot of a framework that was cutting-edge circa 2015. There are no recent PRs, issues, or commits mentioned in the repository data. The pre-built .so files in dexposed/src/main/jniLibs/armeabi/ are frozen artifacts.
🚀Get running
git clone https://github.com/alibaba/dexposed.git
cd dexposed
./gradlew build
To integrate into your Android app, add the dependency to your build.gradle: dependencies { compile 'com.taobao.android:dexposed:0.1.8@aar' } and call DexposedBridge.canDexposed(context) in your Application.onCreate() to initialize.
Daily commands:
This is a library, not an executable app. Build with ./gradlew build to generate the AAR. To use it: create an Android app, add the dependency, and call DexposedBridge.canDexposed(context) early in Application.onCreate(), then use DexposedBridge.findAndHookMethod() or XposedHelpers.findAndHookMethod() to attach hooks.
🗺️Map of the codebase
dexposed/src/main/java/com/taobao/android/dexposed/DexposedBridge.java— Core entry point and main API for hooking methods; every integration starts heredexposed/src/main/java/com/taobao/android/dexposed/XC_MethodHook.java— Abstract hook callback class that defines beforeHookedMethod and afterHookedMethod contractdexposed/src/main/java/com/taobao/android/dexposed/XposedHelpers.java— Utility methods for reflective method/field lookup and invocation; essential for hooking resolutiondexposed/src/main/jniLibs/armeabi/libdexposed.so— Native library implementing runtime method instrumentation on Dalvik VMdexposed_so/dexposed_dalvik/dexposed.cpp— C++ implementation of Dalvik-level method hooking and offset-based method patchingdexposed_so/dexposed_art/dexposed.cpp— C++ implementation of ART runtime hooking for Android 5.0+ Lollipop supportdexposed/src/main/java/com/taobao/android/dexposed/DeviceCheck.java— Runtime device/OS version detection to load correct native library variant
🛠️How to make changes
Hook an Android Framework Method
- In your Application.onCreate(), call DexposedBridge to initialize the framework with the native library (
sample/dexposedexamples/app/src/main/java/com/taobao/dexposed/DexposedSampleApplication.java) - Create a hook by subclassing XC_MethodHook or use XC_MethodReplacement (
dexposed/src/main/java/com/taobao/android/dexposed/XC_MethodHook.java) - Call DexposedBridge.findAndHookMethod() with the target class, method name, parameter types, and your hook instance (
dexposed/src/main/java/com/taobao/android/dexposed/DexposedBridge.java) - Implement beforeHookedMethod() to intercept before execution, and afterHookedMethod() to intercept after (
sample/dexposedexamples/app/src/main/java/com/taobao/dexposed/ChoreographerHook.java)
Add Support for a New Android Version/Runtime
- Update DeviceCheck.java to detect the new OS version and runtime type (
dexposed/src/main/java/com/taobao/android/dexposed/DeviceCheck.java) - If Dalvik-based, update dexposed_offsets.h with correct VM struct offsets for the new OS version (
dexposed_so/dexposed_dalvik/dexposed_offsets.h) - If ART-based, update dexposed.cpp to match ART runtime changes in that version (
dexposed_so/dexposed_art/dexposed.cpp) - Rebuild the native library via ndk-build and place compiled .so in jniLibs/armeabi/ (
dexposed_so/how_to_build_libdexposed.so.md) - Test with the sample app to ensure hooks work on the new version (
sample/dexposedexamples/app/src/main/java/com/taobao/dexposed/MainActivity.java)
Hook a Custom Application Method
- Use XposedHelpers.findMethodExact() or findMethodBestMatch() to locate your target method (
dexposed/src/main/java/com/taobao/android/dexposed/XposedHelpers.java) - Pass the Method object to DexposedBridge.hookMethod() along with your XC_MethodHook implementation (
dexposed/src/main/java/com/taobao/android/dexposed/DexposedBridge.java) - Access method parameters via MethodHookParam.args and modify return values via MethodHookParam.setResult() (
dexposed/src/main/java/com/taobao/android/dexposed/XC_MethodHook.java)
Unhook a Previously Installed Hook
- Store the return value from DexposedBridge.findAndHookMethod() or hookMethod() (
dexposed/src/main/java/com/taobao/android/dexposed/DexposedBridge.java) - Call the unhook() method on the returned IXUnhook object to remove the hook (
dexposed/src/main/java/com/taobao/android/dexposed/callbacks/IXUnhook.java)
🔧Why these technologies
- JNI + Native C++ — Direct runtime method patching requires VM-level instrumentation; no pure-Java alternative can intercept method calls before Dalvik/ART executes them
- Dalvik & ART dual support — Android OS versions prior to 5.0 use Dalvik; 5.0+ uses ART; each has different internal structures and method invocation mechanisms
- ARM assembly (art_quick_d — undefined
🪤Traps & gotchas
- API level mismatch: The pre-built
.sofiles are for Android 4.x–5.1 armeabi only; no modern 64-bit (arm64-v8a, x86) binaries. Modern devices won't load these. 2. SELinux & runtime hardening: Android 6+ (Marshmallow) and later enforce strict runtime verification; direct memory patching (which Dexposed does) will fail or crash on enforcing SELinux policies. 3. No API docs:XC_MethodHook.MethodHookParamis underdocumented; you must read source or the Xposed framework docs to understand the callback context. 4. Gradle version ancient: The project uses Gradle 1.2.3 (from ~2013); modern toolchains may reject it; ensure you use a compatible wrapper or update manually. 5. No test data: No test suite or example app in the repo; integration must be validated manually.
🏗️Architecture
💡Concepts to learn
- Method hooking / trampolining — Dexposed intercepts method calls by replacing function pointers with trampolines that redirect to Java callbacks; understanding how method dispatch works at the VM level is critical to using this framework safely
- ART vs Dalvik runtime — Dexposed maintains separate native implementations for Dalvik (pre-Android 5.0) and ART (5.0+) because their method invocation mechanisms differ drastically; knowing which runtime you target affects hook compatibility
- Aspect-Oriented Programming (AOP) — Dexposed is fundamentally an AOP framework; it lets you inject cross-cutting concerns (logging, performance monitoring, security checks) without modifying method source code
- Java Native Interface (JNI) — Dexposed's hooking power comes from JNI; the native C++ layer patches runtime structures that Java alone cannot access
- SELinux enforcing policies — Modern Android (6+) enforces strict SELinux policies that prevent the direct memory patching Dexposed relies on; understanding SELinux is essential to diagnosing why hooks fail on newer devices
- Reflection and ClassLoader — Dexposed uses reflection (
Class.forName(),Method.getMethod()) to locate target classes and methods at runtime;XposedHelperswraps this to handle version differences across Android API levels - Hot patching / live code replacement — Dexposed enables hot-patching of running apps without restart, allowing emergency bug fixes to be deployed dynamically; this is a powerful but risky capability requiring careful state management
🔗Related repos
rovo89/Xposed— The original Xposed framework for Android (Dexposed is a port of Xposed Bridge to work without Xposed system module); foundational predecessorrovo89/XposedBridge— The Java API that Dexposed is based on; defines the hook callback interfaces and bridge designtiann/LSPosed— Modern successor to Xposed for Android 8.1+; uses a different approach (LSP injection) to bypass SELinux but serves the same hooking use casegoogle/android-art-runtime— The official Android Runtime (ART) source; Dexposed's native layer patches ART internals, so understanding ART method dispatch is essential
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add unit tests for XC_MethodHook and XC_MethodReplacement hook lifecycle
The core hooking mechanism in dexposed/src/main/java/com/taobao/android/dexposed/ lacks test coverage. XC_MethodHook.java and XC_MethodReplacement.java are critical for the AOP framework but have no corresponding test files in the repo. Adding unit tests would validate hook execution, callback ordering, and exception handling, which is essential for a runtime instrumentation framework.
- [ ] Create dexposed/src/test/java/com/taobao/android/dexposed/XC_MethodHookTest.java with tests for beforeHookedMethod() and afterHookedMethod() callbacks
- [ ] Create dexposed/src/test/java/com/taobao/android/dexposed/XC_MethodReplacementTest.java testing replacement logic and return value handling
- [ ] Add instrumented tests in dexposed/src/androidTest/ to verify hook behavior against real Android methods
Document DeviceCheck.java compatibility matrix and add version-specific tests
DeviceCheck.java appears to handle device/API level compatibility but lacks documentation on which Android versions and architectures are supported. The repo has separate native libraries for Dalvik (libdexposed.so) and ART (libdexposed_l.so, libdexposed_l51.so) but no clear documentation linking DeviceCheck logic to these different implementations. This creates maintainability issues and makes it hard for contributors to understand version support.
- [ ] Create dexposed/COMPATIBILITY.md documenting supported Android versions (API levels), architectures (armeabi, etc.), and which native library is used per version
- [ ] Add comments in DeviceCheck.java explaining the logic for detecting runtime and API level thresholds
- [ ] Add parameterized tests in dexposed/src/androidTest/ that verify correct native library selection for different API levels (testing against API 16, 19, 21, 23 minimum)
Create integration tests for the sample dexposedexamples app demonstrating real-world hook scenarios
The sample/dexposedexamples/app/ contains examples like ChoreographerHook.java but lacks automated integration tests that verify these hooks work end-to-end. This makes it difficult for new contributors to validate their changes against realistic use cases and for maintainers to catch regressions. Adding integration tests would serve as both validation and documentation.
- [ ] Create sample/dexposedexamples/app/src/androidTest/java/com/taobao/dexposed/ChoreographerHookTest.java with instrumented tests verifying frame callback interception
- [ ] Add sample/dexposedexamples/app/src/androidTest/java/com/taobao/dexposed/DexposedBridgeIntegrationTest.java testing XposedHelpers.findAndHookMethod() against Android framework classes
- [ ] Document test execution in sample/dexposedexamples/README.md with instructions for running integration tests and expected behavior
🌿Good first issues
- Build and document pre-built
.sofiles for arm64-v8a and x86 architectures, or update the build system to support modern ABIs; currently only armeabi is provided, blocking modern device support. - Add a minimal example Android app (
examples/directory) demonstratingDexposedBridge.findAndHookMethod()on a real framework class (e.g.,Activity.onCreate()) with before/after/replace hooks; the README snippet is incomplete. - Create a test suite validating hook behavior on Dalvik vs ART; write unit tests for
XposedHelpers.findClassIfExists(),findMethodExact(), and callback invocation order across API levels.
⭐Top contributors
Click to expand
Top contributors
- @baiyi.hwj — 40 commits
- @lianzhong.wlz@taobao.com — 26 commits
- @lzwang3d — 5 commits
- @无锋 — 2 commits
- @VEINHORN — 1 commits
📝Recent commits
Click to expand
Recent commits
d108256— Fix : 5.0 compile (baiyi.hwj)aac8086— 0.1.8 (baiyi.hwj)8704455— Update : dexposed so (baiyi.hwj)1f24a72— Change : getShorty from java, for #40 issue (baiyi.hwj)dd0f151— Change : sample code dependency (baiyi.hwj)3255a2f— Change : Bump version (baiyi.hwj)4e79b09— Change : for android5.1 (baiyi.hwj)20e7f24— Format : readme (baiyi.hwj)ecdcf7a— Tidy : the sample code, Using jcenter aar (baiyi.hwj)988b6eb— REMOVE : unnecessary call java main() when jni_Onload (baiyi.hwj)
🔒Security observations
- Critical · Runtime Method Interception Capability —
dexposed/src/main/java/com/taobao/android/dexposed/DexposedBridge.java, XC_MethodHook.java, XC_MethodReplacement.java. Dexposed is a powerful AOP framework that enables runtime method interception and hooking of Android methods through JNI. This capability can be abused to intercept sensitive operations, bypass security checks, modify app behavior maliciously, or facilitate unauthorized access to system functions. The framework allows arbitrary method replacement and callback injection. Fix: 1. Implement strict application integrity checks to detect runtime hooking. 2. Use SafetyNet/Play Integrity API to detect compromised devices. 3. Add runtime tamper detection for critical security functions. 4. Consider restricting usage to development builds only. - High · Native Code Injection via JNI —
dexposed/src/main/jniLibs/armeabi/, dexposed_so/dexposed_dalvik/, dexposed_so/dexposed_art/. The library uses native libraries (libdexposed.so, libdexposed_l.so, libdexposed_l51.so) that directly manipulate runtime behavior at the native level. This includes interaction with Dalvik/ART runtime internals. Native code vulnerabilities or malicious modifications to these libraries could lead to complete system compromise. Fix: 1. Verify cryptographic signatures of native libraries at runtime. 2. Implement additional bounds checking in native code. 3. Use code obfuscation and anti-tampering measures. 4. Regularly audit native code for buffer overflows and memory safety issues. - High · Outdated Build Dependencies —
dexposed/build.gradle. The build.gradle specifies very old dependency versions: gradle:1.2.3 (from 2015), Android SDK version 21 (Android 5.0), and outdated bintray plugins. These older versions may contain known security vulnerabilities and lack security patches. Fix: 1. Update Android compileSdkVersion to API 33+ (Android 13+). 2. Update Gradle plugin to latest stable version (8.x). 3. Update buildToolsVersion to recent stable release. 4. Review and update all gradle plugins to latest versions with security patches. - High · Deprecated Android API Level Target —
dexposed/build.gradle. The library targets Android API 21 (Lollipop, released 2014) as its compile SDK. This is significantly below current standards and misses numerous security improvements in the Android framework implemented over the past 9+ years. Fix: Update compileSdkVersion to minimum API 31 (Android 12) or higher, preferably API 34 (Android 14). Ensure compatibility testing across supported API levels. - Medium · Lack of Input Validation in ClassUtils and XposedHelpers —
dexposed/src/main/java/com/taobao/android/dexposed/ClassUtils.java, XposedHelpers.java. ClassUtils.java and XposedHelpers.java perform reflection-based operations and method lookups based on user-supplied class names and method signatures. Without proper validation, this could allow loading unintended classes or methods, leading to unexpected behavior or security bypass. Fix: 1. Implement whitelist validation for class names and method signatures that can be hooked. 2. Add logging and monitoring for hook requests. 3. Validate method accessibility and permissions before allowing interception. 4. Sanitize all user-supplied inputs used in reflection operations. - Medium · Missing Device Compatibility Verification —
dexposed/src/main/java/com/taobao/android/dexposed/DeviceCheck.java. DeviceCheck.java exists to verify device compatibility, but there's no evidence of comprehensive device integrity verification or detection of tampered/rooted devices. Dexposed can be used on rooted devices to bypass app security controls. Fix: 1. Enhance DeviceCheck with comprehensive root detection. 2. Verify SELinux enforcement status. 3. Check for suspicious system modifications. 4. Implement SafetyNet/Play Integrity API integration. 5. Log suspicious device states for security review. - Medium · Callback Execution Without Sandboxing —
undefined. The XCallback mechanism allows Fix: undefined
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.