android-reverse-engineering-skill README

The project's README from github.com/SimoneAvogadro/android-reverse-engineering-skill. As one markdown file: README.md.

Android Reverse Engineering & API Extraction — Claude Code skill

License: Apache-2.0 GitHub stars GitHub last commit

A Claude Code skill that decompiles Android APK/XAPK/JAR/AAR files and extracts the HTTP APIs used by the app — Retrofit endpoints, OkHttp calls, hardcoded URLs, authentication patterns — so you can document and reproduce them without the original source code.

First-class Kotlin support: modern Android apps are Kotlin/KMP, heavily obfuscated with R8. This skill recovers the original Kotlin class names from metadata R8 cannot strip, and extracts APIs from Ktor, Apollo (GraphQL) and Koin — not just the classic Retrofit/OkHttp stack. See Kotlin name recovery below.

Windows / PowerShell support (experimental): The *.ps1 scripts alongside the bash ones are a recent community contribution, still being stabilised. For any issues please open an issue on this repository (not on the contributors' upstream forks): the PowerShell scripts are maintained here by @SimoneAvogadro.

Table of Contents

What it does

Capability Description
Fingerprint first (Phase 0) Triage an APK/XAPK in seconds — detect the framework (Flutter / React Native / Cordova / Xamarin / native-Kotlin), HTTP stack, obfuscation level and native libs before spending time on a full decompile
Decompile APK, XAPK, JAR, and AAR files using jadx and Fernflower/Vineflower (single engine or side-by-side comparison)
Recover Kotlin names Rebuild original *Repository / *ViewModel / *UseCase class names from R8-obfuscated binaries using Kotlin metadata that R8 cannot strip
Extract APIs Retrofit, OkHttp, Volley and modern Kotlin/KMP stacks: Ktor, Apollo (GraphQL), Koin DI — endpoints, hardcoded URLs, auth headers, tokens and HMAC request-signing schemes
Trace call flows From Activities/Fragments through ViewModels and repositories down to HTTP calls
Analyze structure Manifest, packages, architecture patterns
Handle obfuscation R8-resistant path/URL extraction plus strategies for navigating ProGuard/R8 output

Requirements

Required:

Optional (recommended):

See plugins/android-reverse-engineering/skills/android-reverse-engineering/references/setup-guide.md for detailed installation instructions.

Installation

Inside Claude Code, run:

/plugin marketplace add SimoneAvogadro/android-reverse-engineering-skill
/plugin install android-reverse-engineering@android-reverse-engineering-skill

The skill will be permanently available in all future sessions.

From a local clone

git clone https://github.com/SimoneAvogadro/android-reverse-engineering-skill.git

Then in Claude Code:

/plugin marketplace add /path/to/android-reverse-engineering-skill
/plugin install android-reverse-engineering@android-reverse-engineering-skill

Usage

Slash command

/decompile path/to/app.apk

This runs the full workflow: dependency check, decompilation, and initial structure analysis.

Natural language

The skill activates on phrases like:

Manual scripts

The scripts can also be used standalone:

# Check dependencies
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/check-deps.sh

# Install a missing dependency (auto-detects OS and package manager)
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/install-dep.sh jadx
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/install-dep.sh vineflower

# Fingerprint an APK/XAPK BEFORE decompiling (Phase 0 triage):
# framework, HTTP stack, obfuscation level, native libs, notable SDKs
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/fingerprint.sh app.apk

# Decompile APK with jadx (default)
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/decompile.sh app.apk

# Decompile XAPK (auto-extracts and decompiles each APK inside)
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/decompile.sh app-bundle.xapk

# Decompile with Fernflower
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/decompile.sh --engine fernflower library.jar

# Run both engines and compare
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/decompile.sh --engine both --deobf app.apk

# Find API calls — defaults to a full scan across every supported stack
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/find-api-calls.sh output/sources/
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/find-api-calls.sh output/sources/ --retrofit
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/find-api-calls.sh output/sources/ --urls

# Modern Kotlin/KMP stacks and obfuscation-resistant extraction
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/find-api-calls.sh output/sources/ --ktor    # Ktor client
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/find-api-calls.sh output/sources/ --apollo  # Apollo / GraphQL
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/find-api-calls.sh output/sources/ --paths   # quoted path literals that survive R8 inlining

Kotlin name recovery (R8 deobfuscation)

Most real-world Kotlin/KMP apps ship through R8, so the decompiled classes come out as a.b.c. R8 renames the JVM symbols but cannot strip the Kotlin metadata strings — the Kotlin runtime (reflection, coroutines) needs the original fully-qualified names at runtime. This skill mines those @DebugMetadata / @Metadata annotations to rebuild an obfuscated → real class-name map. On a typical app it recovers ~100 % of the *Repository / *ViewModel / *UseCase / *Impl classes you actually want to read.

# 1. Build the mapping from the decompiled sources
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/recover-kotlin-names.sh output/sources/ output/names/
#    → output/names/mapping.tsv, mapping.json, by_package/

# 2. Query it: resolve an obfuscated name, search by real name, or grep
#    the sources with each hit annotated with its recovered class name
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/lookup-name.sh output/names/ LoginRepository
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/lookup-name.sh output/names/ -o a.b.c
bash plugins/android-reverse-engineering/skills/android-reverse-engineering/scripts/lookup-name.sh output/names/ --grep 'login' output/sources/

Repository Structure

android-reverse-engineering-skill/
├── .claude-plugin/
│   └── marketplace.json                    # Marketplace catalog
├── plugins/
│   └── android-reverse-engineering/
│       ├── .claude-plugin/
│       │   └── plugin.json                 # Plugin manifest
│       ├── skills/
│       │   └── android-reverse-engineering/
│       │       ├── SKILL.md                # Core workflow (Phase 0–5)
│       │       ├── references/
│       │       │   ├── setup-guide.md
│       │       │   ├── jadx-usage.md
│       │       │   ├── fernflower-usage.md
│       │       │   ├── api-extraction-patterns.md
│       │       │   ├── kotlin-name-recovery.md
│       │       │   ├── third_party_hosts.txt   # denylist for first/third-party bucketing
│       │       │   └── call-flow-analysis.md
│       │       └── scripts/
│       │           ├── check-deps.sh       # Bash
│       │           ├── check-deps.ps1      # PowerShell
│       │           ├── install-dep.sh
│       │           ├── install-dep.ps1
│       │           ├── decompile.sh
│       │           ├── decompile.ps1
│       │           ├── fingerprint.sh          # Phase 0 — pre-decompile triage
│       │           ├── recover-kotlin-names.sh # R8 → real Kotlin class names
│       │           ├── lookup-name.sh          # query the recovered name map
│       │           ├── find-api-calls.sh
│       │           └── find-api-calls.ps1
│       └── commands/
│           └── decompile.md                # /decompile slash command
├── LICENSE
└── README.md

References

Acknowledgments

Thanks to the contributors who have shaped this skill:

Disclaimer

This plugin is provided strictly for lawful purposes, including but not limited to:

You are solely responsible for ensuring that your use of this tool complies with all applicable laws, regulations, and terms of service. Unauthorized reverse engineering of software you do not own or do not have permission to analyze may violate intellectual property laws and computer fraud statutes in your jurisdiction.

The authors disclaim any liability for misuse of this tool.

License

Apache 2.0 — see LICENSE

android-reverse-engineering-skill (SimoneAvogadro/android-reverse-engineering-skill)

Searching Database…

这是什么?一个 Claude Code 技能,用来反编译 Android APK/XAPK/JAR/AAR 文件并提取应用使用的 HTTP API——Retrofit 端点、OkHttp 调用、硬编码的 URL 和认证方式——让你在没有原始源码的情况下也能记录并复现它们。
这是独立应用,还是别的什么东西的插件?它是一个 Claude Code 技能/插件:一组 shell(外加实验性的 PowerShell)脚本和一个 SKILL.md,由 Claude Code 加载并调用,用来驱动外部的反编译工具。
怎么安装和运行它?在 Claude Code 内从 GitHub 安装(推荐)或从本地克隆安装,之后该技能在以后所有会话中都永久可用。然后用斜杠命令或“反编译这个 APK”之类的自然语言说法触发它。
使用之前需要装哪些工具?必须有 Java JDK 17+ 和 jadx 命令行反编译器;Vineflower/Fernflower 和 dex2jar 是可选的,但推荐安装,以便在复杂 Java 代码上获得更好的输出。
Windows 支持现在能直接用了吗?Windows/PowerShell 支持被明确标记为实验性——这是社区新近贡献的功能,仍在稳定化过程中,macOS/Linux 上的 bash 脚本才是更成熟的路线。
谁会用它?安全研究人员、渗透测试人员、恶意软件分析师,以及对 Android 应用做授权互操作性分析或参加 CTF 的开发者。
除了 Windows,它也能在 macOS 和 Linux 上运行吗?可以——核心流程是面向 macOS/Linux 的 bash 脚本,另有一套实验性的 PowerShell 脚本对应 Windows。
Kotlin 应用即使被 R8 混淆过,它也能用吗?可以——它拥有一流的 Kotlin 支持,会挖掘 R8 无法剥离的 @DebugMetadata/@Metadata 注解来还原原始的 Repository/ViewModel/UseCase 类名,在典型应用上的还原率接近 100%。
它能从哪些 HTTP/网络库中提取 API?它涵盖经典的 Retrofit/OkHttp/Volley 组合,以及现代的 Kotlin/KMP 工具:Ktor、Apollo(GraphQL)和 Koin 依赖注入,包括认证头、令牌和 HMAC 签名方案。
阶段 0 的指纹识别步骤是干什么的?在完整反编译之前,它会快速给 APK/XAPK 分诊,检测应用框架(Flutter、React Native、Cordova、Xamarin、原生 Kotlin)、HTTP 库、混淆程度和原生库,免得你把时间浪费在分析错误的东西上。
它能追踪一个界面的代码如何一步步引发网络请求吗?可以——它会追踪从 Activity/Fragment 经由 ViewModel 和 repository 再到实际 HTTP 调用的完整调用链。
Size
1.5 MB
Stars
8.2K
Age
8mo
Commits · 90 Days