CLI 目录 横向对比 FCRS-1.0 标准 /llms.txt
← 返回 CLI 目录

JADX

$ jadx 官方出品 低风险
skylot · 安全扫描与密钥管理 · Apache-2.0 · macos / linux / windows

JADX(jadx)可将 Android APK、DEX、AAB、AAR 与 JAR 文件反编译为可读的 Java 源码与解码后的 AndroidManifest.xml 资源。支持 --deobf、-r/-s 选择性跳过、-j <threads> 多线程、--single-class 以及 --output-format json,适合自动化移动安全审计。

FCRS-1.0 综合评分
81 /100
良好 (Good)
高置信度 (实测)
零摩擦安装命令
brew install jadx
CLI vs MCP 选型建议 仅 CLI 可用

jadx 将大型 APK 压缩包直接反编译到本地磁盘目录树,便于随后使用 rg 或 AST 检索,适合本地 CLI。

Agent 友好度体检单

本地探针实测证据
✓ 原生 JSON 输出
— 字段裁剪
✓ 无头非交互
— 支持 Dry-Run
— 只读模式开关
— 支持 NO_COLOR
✓ 自省/Schema 发现
— 官方 SKILL.md
实测版本
1.5.6
冷启动耗时
551 ms
退出码 (help / 非法参数)
0 / 1
NO_COLOR 无色码污染 / 无 TTY 不挂起
Yes / Safe
抓取的 --help 摘要
jadx - dex to java decompiler, version: 1.5.6

usage: jadx [command] [options] <input files> (.apk, .dex, .jar, .class, .smali, .zip, .aar, .arsc, .aab, .xapk, .apkm, .jadx.kts)
commands (use '<command> --help' for command options):
  plugins	  - manage jadx plugins

options:
  -d, --output-dir                              - output directory
  -ds, --output-dir-src                         - output directory for sources
  -dr, --output-dir-res                         - output directory for resources
  -r, --no-res                                  - do not decode resources
  -s, --no-src                                  - do not decompile source code
  -j, --threads-count                           - processing threads count, default: 5
  --single-class                                - decompile a single class, full name, raw or alias
  --single-class-output                         - file or dir for write if decompile a single class
  --output-format                               - can be 'java' or 'json', default: java
  -e, --export-gradle                           - save as gradle project (set '--export-gradle-type' to 'auto')
  --export-gradle-type                          - Gradle project template for export:
                                                   'auto' - detect automatically
                                                   'android-app' - Android Application (apk)
                                                   'android-library' - Android Library (aar)
                                                   'simple-java' - simple Java
  -m, --decompilation-mode                      - code output mode:
                                                   'auto' - trying best options (default)
                                                   'restructure' - restore code structure (normal java code)
                                                   'simple' - simplified instructions (linear, with goto's)
                                                   'fallback' - raw instructions without modifications
  --show-bad-code                               - show inconsistent code (incorrectly decompiled)
  --no-xml-pretty-print                         - do not prettify XML
  --no-imports                                  - disable use of imports, always write entire package name
  --no-debug-info                               - disable debug info parsing and processing
  --add-debug-lines                             - add comments with debug line

FCRS-1.0 六维评分拆解

Agent 友好度 20 / 25

完全非交互,支持 --output-format json、--single-class、-r/-s 跳过及 -j 线程控制,但结果写入磁盘目录而非标准输出。

  • Supports --output-format json, --single-class, -r, and -s
  • Non-interactive execution; writes output to -d directory
安全与权限边界 21 / 25

仅做离线静态反编译,将生成的 .java/.json 文件安全输出至指定的 -d 目录。

  • Offline static analysis with explicit -d output dir
安装与运行摩擦 12 / 15

可通过 brew 与 GitHub Releases 在 macOS、Linux、Windows 安装,运行需依赖 Java(JRE/JDK)环境。

  • Cross-platform CLI requiring Java runtime
能力覆盖与边际价值 13 / 15

一条命令即可将不透明的 APK 还原为可检索的 Java 源码与清单文件。

  • Decompiles DEX, AAB, AAR, and resources together
维护与来源背书 8 / 10

由 skylot/jadx 以 Apache-2.0 协议活跃维护并高频发版。

  • Active skylot/jadx upstream
文档与可验证性 7 / 10

--help 选项说明详尽(已在 jadx 1.5.6 验证)并配有 GitHub Wiki。

  • Clear --help output verified on jadx 1.5.6

安全边界、鉴权与放权指南

鉴权方式
无需鉴权
凭证存储位置

无需认证凭据,完全离线处理本地 APK/DEX 文件。

潜在副作用
本地写入
费用与配额提示

Apache-2.0 开源 CLI,免费且离线运行。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# JADX (jadx) Agent Rules
- Always specify `-d <out>` pointing to `/tmp` or a gitignored scratch directory so decompiled files do not pollute the repo.
- Use `-r` (skip resources) or `-s` (skip sources) and `--single-class` to keep runtime and disk usage small.

Agent 高频安全命令配方

只读查询(安全推荐)

仅解码资源与 AndroidManifest.xml
jadx -s -d /tmp/apk-res app.apk

使用 -s 跳过 Java 源码反编译,快速将解码后的资源文件与 AndroidManifest.xml 导出至 /tmp/apk-res。

受控写入与预演

将 APK 类反编译为 JSON AST 输出
jadx -r -j 4 --output-format json -d /tmp/apk-json app.apk

使用 -r 跳过资源解码、-j 4 开启 4 线程,并通过 --output-format json 输出 JSON 格式的反编译结果。

核心优势

  • + --output-format json 与 --single-class 支持精细化、结构化的 APK 代码审查。
  • + -r 与 -s 可按需跳过无关阶段,大幅缩短反编译耗时。

注意事项与踩坑点

  • ! 结果始终写入 -d 磁盘目录而非流式打印到标准输出,大型 APK 可能生成数千个文件。
  • ! 存在 JVM 启动开销,超大 Multi-DEX APK 可能需要通过 JAVA_OPTS 调大堆内存。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI