android-reverse-engineering-skill Documentation

Claude Code skill to support Android app's reverse engineering

8,227 stars Shell Shell 1 file ยท ~2,159 tokens
RAW Doc

Technical Documentation: SimoneAvogadro/android-reverse-engineering-skill

โ„น๏ธ Provenance: Multi-Tier Ingestion ยท CodeWiki Reference

Overview (`README.md`)

Android Reverse Engineering & API Extraction โ€” Claude Code skill

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:

  • Java JDK 17+
  • jadx (CLI)

Optional (recommended):

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

Installation

Inside Claude Code, run:

text
/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

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

Then in Claude Code:

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

Usage

Slash command

text
/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:

  • "Decompile this APK"
  • "Reverse engineer this Android app"
  • "Extract API endpoints from this app"
  • "Follow the call flow from LoginActivity"
  • "Analyze this AAR library"

Manual scripts

The scripts can also be used standalone:

text
/* Detailed source-code truncated for AI context efficiency. */

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.

bash
# 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

text
/* Detailed source-code truncated for AI context efficiency. */

References

Acknowledgments

Thanks to the contributors who have shaped this skill:

  • @tajchert โ€” Phase 0 fingerprinting, R8-resistant Kotlin name recovery (recover-kotlin-names.sh, lookup-name.sh), and Ktor / Apollo / Koin / HMAC extraction patterns (#16)
  • @philjn โ€” Native Windows / PowerShell support (check-deps.ps1, install-dep.ps1, decompile.ps1, find-api-calls.ps1) and split/bundled APK detection in decompile.sh (#8)
  • @txhno โ€” Migration to the maintained ThexXTURBOXx/dex2jar fork (#12)
  • @muqiao215 โ€” Decompile partial-success handling, Fernflower timeout safeguard, intermediate-artifact directory (#10)
  • @kevinaimonster โ€” Chinese localization (SKILL.md discovery keywords) (#4)

Disclaimer

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

  • Security research and authorized penetration testing
  • Interoperability analysis permitted under applicable law (e.g., EU Directive 2009/24/EC, US DMCA ยง1201(f))
  • Malware analysis and incident response
  • Educational use and CTF competitions

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.

The decompilers and other tools this plugin drives (jadx, Vineflower/Fernflower, dex2jar, Apktool, adb, Java) are third-party software, not bundled with the plugin and distributed under their own licenses โ€” see THIRD_PARTY_NOTICES.md. Privacy: PRIVACY.md.


--- METRICS ---