dex-android-unpack
This MCP server enables Android app unpacking, decompilation, and smali analysis via ADB, BlackDex, and Frida.
List connected ADB devices.
List installed packages (optionally filtered by keyword).
Detect APK packers (360, Tencent, Bangcle, etc.).
Pull installed APKs (including splits) from a device.
Statically unpack APKs to extract
classes*.dexfiles.Prepare BlackDex for no-root memory dumping and pull its dumps.
Prepare Frida (root) and use
frida-dexdumpto dump decrypted dex.Convert dex files/directories to smali.
List, read, and regex-search smali classes/content.
Provides tools for interacting with Android devices and APKs, including listing connected ADB devices and installed packages, detecting Android packers, pulling installed APKs, static and dynamic unpacking (BlackDex/Frida), converting DEX files to smali, and listing/reading/searching smali classes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dex-android-unpack Unpack com.example.app with Frida, convert to smali, and find login APIs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DexAndroid---Android Decompile MCP
English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Español · Français · Deutsch · Português · Русский · العربية · हिन्दी · Bahasa Indonesia · Tiếng Việt · ไทย · Italiano · Türkçe
⚠️ For learning and teaching purposes only. Do not use this project for any illegal activity, unauthorized cracking, copyright infringement, or bypassing third-party protections. You must follow local laws and the target app’s terms. You are solely responsible for misuse.
Android unpacking + smali analysis MCP Server. Use from Cursor / Codex / Claude Code to manage devices, detect packers, unpack (static / BlackDex / Frida), convert dex→smali, and search API strings.
Repo: https://github.com/TimeCyber/DexAndroid · npm: android-decompile-mcp
Quick start (npm + MCP)
1. No clone — download & run from npm:
npx -y android-decompile-mcp2. Load into Cursor / Claude / Codex — paste into .cursor/mcp.json (or global MCP config):
{
"mcpServers": {
"android-decompile-mcp": {
"command": "npx",
"args": ["-y", "android-decompile-mcp"],
"env": {
"ADB_PATH": "adb",
"DEX_OUT_DIR": "./unpack-output"
}
}
}
}Save → restart the client / reload MCP. Done.
Optional global install: npm i -g android-decompile-mcp then run android-decompile-mcp.
Related MCP server: JADX-MCP-SERVER
Features
Capability | MCP tool | Notes |
Devices |
| Connected ADB devices |
Packages |
| Optional keyword filter |
Packer detect |
| 360 / Tencent / Bangcle / ijiami / Alibaba, etc. |
Pull APK |
| Installed app (+ splits) |
Static unpack |
| Extract |
No-Root unpack |
| BlackDex memory dump |
Root unpack |
| frida-server + frida-dexdump |
Decompile |
| baksmali → smali |
Analyze |
| List / read / regex |
Entry locate |
| MAIN/LAUNCHER + smali onCreate (read-only) |
Decode / rebuild |
| apktool decode + rebuild/sign |
Unpacking methods
Method | Root? | Use when |
Static | No | Unpacked apps or shell/resources only |
BlackDex | No | Most protected apps |
Frida | Yes | Strong packers / fuller dumps |
Requirements
Windows / macOS / Linux (docs use Windows examples)
Node.js ≥ 18
ADB on PATH, or set
ADB_PATHJava 8+ (for baksmali via
dex_to_smali)Optional: BlackDex; rooted device +
frida-server;pip install frida-tools frida-dexdump
Place baksmali fat jar / frida-server / BlackDex under local tools/ (large binaries are gitignored).
Local development build
git clone https://github.com/TimeCyber/DexAndroid.git
cd DexAndroid
npm install
npm run build
npm startEnvironment variables
Variable | Meaning | Default |
| adb executable |
|
| Default output dir |
|
| baksmali jar | auto-discover under |
Typical workflows
1. Static unpack (fastest)
list_devicesor prepare localapkPath.detect_packer.static_unpack→classes*.dex.dex_to_smali→ smali folder.smali_search/smali_read_class.
Note: Protected apps often yield only the shell via static unpack—use BlackDex / Frida for business code.
2. No-Root (BlackDex)
list_devices.blackdex_preparewithblackdexApkPath.Unpack the target app in BlackDex UI.
blackdex_pullwithtargetPkg.dex_to_smalithensmali_*.
3. Root (Frida)
Rooted device (e.g. Magisk),
adbready.frida_prepareto push/starttools/frida-server.Matching
frida/frida-dexdumplocally (prefer 16.x).frida_unpackwithpkg, preferspawn: true,deepSearch: true.dex_to_smalion output, then analyze.
If Frida 17 attach fails, align tools to 16.x; some devices need temporary setenforce 0.
4. smali analysis examples
smali_list_classes smaliDir=.../smali keyword=login
smali_search smaliDir=.../smali pattern=https?://|/api/|publicClient/
smali_read_class smaliDir=.../smali className=com.example.api.ApiServiceLayout
DexAndroid/
├── src/ # MCP server (TypeScript)
│ ├── index.ts
│ ├── adb.ts
│ ├── detect.ts
│ ├── smali.ts
│ └── unpack/
├── dist/
├── examples/ # Damai / Huaxi sample smali.zip + docs
├── skills/ # Canonical agent skills (edit here, then sync)
├── .cursor/skills/ # Cursor copy
├── .agents/skills/ # Codex copy
├── .claude/skills/ # Claude Code copy
├── tools/ # baksmali / frida-server / BlackDex (local)
├── unpack-output/ # local dumps (gitignored)
├── package.json
└── README.mdAgent skills (Cursor / Codex / Claude Code)
After unpacking, use android-api-smali-analysis so the agent recovers headers, body, encrypt/decrypt methods, and keys (smali / .so / server-delivered), not path-only notes.
Client | Skill path |
Canonical | |
Cursor | |
Codex | |
Claude Code |
|
Edit the canonical file, then sync copies:
node tools/sync-skills.mjsSee skills/README.md.
Decompile examples
See examples/ (smali shipped as zip):
Sample | Path | Contents |
Damai | Frida smali.zip + API docs | |
Huaxi Maternity | Static smali.zip ( |
After unzip, run smali_list_classes / smali_search / smali_read_class.
MCP tool cheatsheet
Tool | Params |
|
|
|
|
|
|
|
|
|
|
| optional |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FAQ
Q: Empty list_devices?
Check USB debugging, adb devices, pass serial if multiple.
Q: No business classes after static unpack?
Likely packed—use BlackDex or Frida.
Q: dex_to_smali failed?
Install Java; put baksmali jar in tools/ or set BAKSMALI_JAR.
Q: Frida jailed / version mismatch?
Keep frida-server and host frida major versions aligned; try 16.x.
Q: Where is output?
Default unpack-output/ (or DEX_OUT_DIR). Do not commit dumps.
Legal & disclaimer
This project is only for learning, teaching, and authorized security research. It is strictly forbidden to use it for any criminal or illegal activity, including unauthorized access, cracking, piracy, attacking systems, or IP infringement. Authors and contributors are not liable for misuse. By using this software you agree to these terms.
⚠️ For learning and teaching purposes only. Do not use this project for any illegal activity, unauthorized cracking, copyright infringement, or bypassing third-party protections. You must follow local laws and the target app’s terms. You are solely responsible for misuse.
License
MIT — see LICENSE.
Available Tools
13 toolsblackdex_prepareB
免 root 方案第一步:在设备安装并启动 BlackDex(需提供其 APK 路径)。随后在设备上选目标应用脱壳。
Inputs: serial, blackdexApkPath.
blackdex_pullB
免 root 方案第二步:把 BlackDex 脱壳 dump 出的 dex 从设备拉回本机。
Inputs: outDir, serial, targetPkg.
detect_packerA
识别 APK 是否被加固及加固厂商(360/腾讯/梆梆/爱加密等)。可传本地 apkPath,或传 pkg 自动从设备拉取后检测。
Inputs: pkg, serial, apkPath.
dex_to_smaliC
把 dex 反编译为 smali。dexInput 可为单个 .dex 文件或包含多个 dex 的目录(如脱壳输出目录)。
Inputs: dexInput (required), outDir.
frida_prepareB
root 方案准备:推送并启动 frida-server(默认 tools/frida-server,需 Magisk/su)。
Inputs: serial, serverLocalPath.
frida_unpackB
root 方案:用 frida-dexdump 从内存 dump 已解密 dex。需设备已 root + frida-server 运行 + 本机安装 frida-dexdump。
Inputs: pkg (required), spawn, outDir, serial, +1 more.
list_devicesA
列出当前通过 ADB 连接的安卓设备及其状态。
Inputs: no named parameters.
list_packagesB
列出设备上已安装的应用包名,可用关键字过滤。
Inputs: serial, keyword.
pull_apkC
从设备拉取已安装应用的 APK(含 split)到本机。
Inputs: pkg (required), outDir, serial.
smali_list_classesC
列出 smali 目录下所有类名,可用关键字过滤。
Inputs: smaliDir (required), keyword.
smali_read_classC
读取指定类的 smali 源码。className 支持 com.foo.Bar 或 com/foo/Bar。
Inputs: smaliDir (required), className (required).
smali_searchA
在 smali 目录中按正则搜索内容(用于分析 API 调用、字符串、加解密、权限等)。返回 文件:行号 命中。
Inputs: pattern (required), smaliDir (required), flags, maxResults.
static_unpackB
静态解包:解压 APK 提取所有 classes*.dex。可传 apkPath 或 pkg(自动拉取)。加固 APK 得到的是壳 dex。
Inputs: pkg, outDir, serial, apkPath.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool has a distinct, clearly bounded purpose: device/package listing, packer detection, APK pulling, and three separate unpacking pipelines (static, root-frida, no-root BlackDex) plus smali analysis. The prepare/action pairs (frida_prepare/frida_unpack, blackdex_prepare/blackdex_pull) are explicitly differentiated and cannot be easily confused.
Mostly consistent snake_case verb_noun with descriptive prefixes (frida_*, blackdex_*, smali_*). Minor deviation: some tools prefix the domain (smali_list_classes) while others use the plain action (list_packages, list_devices), and dex_to_smali mixes a to_ connector, but the pattern remains readable and predictable.
13 tools is well within the ideal range and each tool earns its place by covering a distinct workflow step. No redundant or filler tools; the count precisely matches the multi-method unpacking domain.
Strong lifecycle coverage: enumerate devices/packages, detect packers, pull APKs, run all three unpacking methods, and analyze results via smali listing/reading/searching. Minor gaps exist (e.g. no Java decompilation or output cleanup), but core end-to-end workflows are fully covered.
Maintenance
Related MCP Connectors
Cloud Android devices for AI agents: install an APK, read the screen, tap, type, read logcat.
Let Claude, ChatGPT and other agents use your Android phone: see the screen, tap, type, open apps.
Cloud Android phones for AI agents: create a phone, read the screen, tap, type, install APKs, park.
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides AI agents with a unified MCP interface for Android APK reverse engineering, metadata analysis, Smali/resource editing, rebuilding, signing, verification, and ADB device testing.MIT
- AlicenseBqualityCmaintenanceEnables LLMs to query live decompiled Android app context through a JADX plugin, supporting class, method, and field inspection; source and smali retrieval; manifest parsing; vulnerability discovery; and reverse engineering.34Apache 2.0
- AlicenseCqualityBmaintenanceEnables AI agents to inspect APKs and resources, analyze native libraries, trace runtime behavior with Frida, and connect app screen actions to code through ADB.891MIT
- AlicenseBqualityCmaintenanceEnables an AI runtime to perform authorized static analysis of Android APKs over local MCP stdio, inspecting inventories, DEX/ELF headers and manifest details while decompiling with verified, checksum-pinned JADX and Apktool engines it can bootstrap itself. Reports results as evidence-backed observations, with literal text search, two-APK comparison and Markdown summaries, without ever executing the target APK.12MIT