npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@timecyber/android-mcp

v1.0.0

Published

Android reverse-engineering MCP Server — unpack hardened apps, decompile to smali, analyze APIs (Cursor / Claude / Codex)

Readme

DexAndroid

English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Español · Français · Deutsch · Português · Русский · العربية · हिन्दी · Bahasa Indonesia · Tiếng Việt · ไทย · Italiano · Türkçe

⚠️ 僅供學習與教學用途。 禁止用於任何違法犯罪、未授權破解、侵權或規避他人防護之行為。使用者須遵守當地法律與目標應用服務條款;濫用後果自負。

安卓脫殼 + smali 分析 MCP Server。可在 Cursor / Claude 等客戶端透過工具呼叫完成:裝置管理、加固偵測、靜態/免 Root/Root 脫殼、dex→smali、介面字串檢索。

Repo: https://github.com/TimeCyber/DexAndroid


功能概覽

| 能力 | MCP 工具 | 說明 | | --- | --- | --- | | 设备列表 | list_devices | ADB 已连接设备 | | 包名列表 | list_packages | 可按关键字过滤 | | 加固识别 | detect_packer | 360 / 腾讯 / 梆梆 / 爱加密 / 阿里聚安全等 | | 拉 APK | pull_apk | 从设备拉取已安装应用(含 split) | | 静态解包 | static_unpack | 解压 APK 提取 classes*.dex | | 免 Root 脱壳 | blackdex_prepare / blackdex_pull | BlackDex 内存 dump 后拉取 | | Root 脱壳 | frida_prepare / frida_unpack | 推送 frida-server + frida-dexdump | | 反编译 | dex_to_smali | baksmali 转 smali | | 分析 | smali_list_classes / smali_read_class / smali_search | 列类、读类、正则搜索 |

三種脫殼方案比較

| 方案 | 是否需要 Root | 適用場景 | | --- | --- | --- | | 静态解包 | 否 | 未加固,或只要壳/资源 | | BlackDex | 否 | 多数加固 App | | Frida | 是 | 强加固 / 壳对抗,内存 dump 更完整 |


環境需求

  • Windows / macOS / Linux(文件以 Windows 為例)
  • Node.js ≥ 18
  • ADB:加入 PATH,或設定 ADB_PATH
  • Java 8+(dex_to_smali 呼叫 baksmali)
  • 可選:BlackDex;裝置 Root + frida-server;本機 pip install frida-tools frida-dexdump

請將 baksmali fat jar / frida-server / BlackDex 放於本機 tools/(大型檔案預設不進 Git)。


安裝與建置

git clone https://github.com/TimeCyber/DexAndroid.git
cd DexAndroid
npm install
npm run build

啟動 MCP(stdio):

npm start
# node dist/index.js

開發模式:

npm run dev

接入 Cursor(MCP)

於 .cursor/mcp.json 或全域 MCP 設定新增(路徑請改為本機):

{
  "mcpServers": {
    "dex-android-unpack": {
      "command": "node",
      "args": ["E:/DexAndroid/dist/index.js"],
      "env": {
        "ADB_PATH": "E:/Android/Sdk/platform-tools/adb.exe",
        "DEX_OUT_DIR": "E:/DexAndroid/unpack-output"
      }
    }
  }
}

儲存後重啟 Cursor / 重載 MCP。


環境變數

| 變數 | 說明 | 預設 | | --- | --- | --- | | ADB_PATH | adb 可执行文件 | adb | | DEX_OUT_DIR | 脱壳/拉取默认输出目录 | <cwd>/unpack-output | | BAKSMALI_JAR | baksmali 可执行 jar | 自动在 tools/ 下查找 |


使用說明(典型流程)

1. 靜態解包(最快)

  1. list_devices 或準備本機 apkPath。
  2. detect_packer。
  3. static_unpack → classes*.dex。
  4. dex_to_smali → smali 目錄。
  5. smali_search / smali_read_class。

注意: 加固 App 靜態 dex 常只有殼,業務程式碼需 BlackDex / Frida。

2. 免 Root(BlackDex)

  1. list_devices。
  2. blackdex_prepare(blackdexApkPath)。
  3. 於手機 BlackDex 介面選擇目標 App 並脫殼。
  4. blackdex_pull(targetPkg)。
  5. dex_to_smali 後再 smali_*。

3. Root(Frida)

  1. 裝置已 Root,adb 可用。
  2. frida_prepare 推送並啟動 frida-server。
  3. 本機安裝相符版本 frida / frida-dexdump(建議 16.x)。
  4. frida_unpack(建議 spawn: true、deepSearch: true)。
  5. dex_to_smali 後分析。

若 Frida 17 附加失敗,可對齊至 16.x;部分機型需暫時 setenforce 0。

4. smali 分析範例

smali_list_classes  smaliDir=.../smali  keyword=login
smali_search        smaliDir=.../smali  pattern=https?://|/api/|publicClient/
smali_read_class    smaliDir=.../smali  className=com.example.api.ApiService

目錄結構

DexAndroid/
├── src/                 # MCP server (TypeScript)
│   ├── index.ts
│   ├── adb.ts
│   ├── detect.ts
│   ├── smali.ts
│   └── unpack/
├── dist/
├── examples/            # Damai / Huaxi sample smali.zip + docs
├── tools/               # baksmali / frida-server / BlackDex (local)
├── unpack-output/       # local dumps (gitignored)
├── package.json
└── README.md

反編譯範例

見 examples/(smali 以 zip 提供):

| 範例 | 路徑 | 內容 | | --- | --- | --- | | 大麥 | examples/damai/ | Frida smali 壓縮包 + API 文件 | | 華西婦幼 | examples/huaxi/ | 靜態解包 smali 壓縮包(info.cd120.two) |

解壓後即可執行 smali_* 工具。


MCP 工具參數速查

| Tool | Params | | --- | --- | | detect_packer | apkPath or pkg, optional serial | | pull_apk | pkg, optional outDir / serial | | static_unpack | apkPath or pkg, optional outDir | | blackdex_prepare | blackdexApkPath, optional serial | | blackdex_pull | targetPkg, optional outDir / serial | | frida_prepare | optional serial / serverLocalPath | | frida_unpack | pkg, optional spawn / deepSearch / outDir | | dex_to_smali | dexInput, optional outDir | | smali_list_classes | smaliDir, optional keyword | | smali_read_class | smaliDir, className | | smali_search | smaliDir, pattern, optional flags / maxResults |


常見問題

Q: list_devices 為空?
檢查 USB 偵錯、adb devices,多裝置時傳 serial。

Q: 靜態解包後找不到業務類?
多半是加固殼,請改用 BlackDex 或 Frida。

Q: dex_to_smali 失敗?
確認已安裝 Java,並放置 baksmali jar 或設定 BAKSMALI_JAR。

Q: Frida jailed / 版本不符?
保持 frida-server 與本機 frida 主版本一致;必要時用 16.x。

Q: 輸出目錄在哪?
預設 unpack-output/。請勿提交至 Git。


合規與免責聲明

本專案僅供學習、教學與已授權安全研究。嚴禁用於任何違法犯罪行為,包括未授權存取、破解、盜版、攻擊系統或侵害智慧財產權。作者與貢獻者不對濫用負責。使用即表示同意上述條款。

⚠️ 僅供學習與教學用途。 禁止用於任何違法犯罪、未授權破解、侵權或規避他人防護之行為。使用者須遵守當地法律與目標應用服務條款;濫用後果自負。


License

MIT,見倉庫根目錄 LICENSE。