$npx -y skills add incogbyte/android-reverse-engineering-claude-skill --skill android-reverse-engineeringDecompile Android APK, XAPK, AAB, DEX, JAR, and AAR files using jadx or Fernflower/Vineflower. Reverse engineer Android apps, extract HTTP API endpoints (Retrofit, OkHttp, Volley, GraphQL, WebSocket), trace call flows from UI to network layer, analyze security patterns (cert pinn
| 1 | # Android Reverse Engineering |
| 2 | |
| 3 | Decompile Android APK, XAPK, AAB, DEX, JAR, and AAR files using jadx and Fernflower/Vineflower, trace call flows through application code and libraries, analyze security patterns, produce structured documentation of extracted APIs, and perform adaptive dynamic analysis with Frida — generating custom bypass scripts based on what the static analysis finds, iterating through crash logs to refine hooks until protections are bypassed. Two decompiler engines are supported — jadx for broad Android coverage and Fernflower for higher-quality output on complex Java code — and can be used together for comparison. |
| 4 | |
| 5 | ## Prerequisites |
| 6 | |
| 7 | This skill requires **Java JDK 17+** and **jadx** to be installed. **Fernflower/Vineflower** and **dex2jar** are optional but recommended for better decompilation quality. **bundletool** is required for AAB (App Bundle) files. For dynamic analysis (Phase 7), **Python 3.8+**, **adb**, and a device/emulator with **frida-server** are needed — the `setup-frida.sh` script handles the full setup. Run the dependency checker to verify: |
| 8 | |
| 9 | ```bash |
| 10 | bash ${CLAUDE_PLUGIN_ROOT}/skills/android-reverse-engineering/scripts/check-deps.sh |
| 11 | ``` |
| 12 | |
| 13 | If anything is missing, follow the installation instructions in `${CLAUDE_PLUGIN_ROOT}/skills/android-reverse-engineering/references/setup-guide.md`. |
| 14 | |
| 15 | ## Workflow |
| 16 | |
| 17 | ### Phase 1: Verify and Install Dependencies |
| 18 | |
| 19 | Before decompiling, confirm that the required tools are available — and install any that are missing. |
| 20 | |
| 21 | **Action**: Run the dependency check script. |
| 22 | |
| 23 | ```bash |
| 24 | bash ${CLAUDE_PLUGIN_ROOT}/skills/android-reverse-engineering/scripts/check-deps.sh |
| 25 | ``` |
| 26 | |
| 27 | The output contains machine-readable lines: |
| 28 | - `INSTALL_REQUIRED:<dep>` — must be installed before proceeding |
| 29 | - `INSTALL_OPTIONAL:<dep>` — recommended but not blocking |
| 30 | |
| 31 | **If required dependencies are missing** (exit code 1), install them automatically: |
| 32 | |
| 33 | ```bash |
| 34 | bash ${CLAUDE_PLUGIN_ROOT}/skills/android-reverse-engineering/scripts/install-dep.sh <dep> |
| 35 | ``` |
| 36 | |
| 37 | The install script detects the OS and package manager, then: |
| 38 | - Installs without sudo when possible (downloads to `~/.local/share/`, symlinks in `~/.local/bin/`) |
| 39 | - Uses sudo and the system package manager when necessary (apt, dnf, pacman) |
| 40 | - If sudo is needed but unavailable or the user declines, it prints the exact manual command and exits with code 2 — show these instructions to the user |
| 41 | |
| 42 | **For optional dependencies**, ask the user if they want to install them. Vineflower and dex2jar are recommended for best results. |
| 43 | |
| 44 | After installation, re-run `check-deps.sh` to confirm everything is in place. Do not proceed to Phase 2 until all required dependencies are OK. |
| 45 | |
| 46 | ### Phase 2: Decompile |
| 47 | |
| 48 | Use the decompile wrapper script to process the target file. The script supports three engines: `jadx`, `fernflower`, and `both`. |
| 49 | |
| 50 | **Action**: Choose the engine and run the decompile script. The script handles APK, XAPK, AAB, DEX, JAR, and AAR files. |
| 51 | |
| 52 | ```bash |
| 53 | bash ${CLAUDE_PLUGIN_ROOT}/skills/android-reverse-engineering/scripts/decompile.sh [OPTIONS] <file> |
| 54 | ``` |
| 55 | |
| 56 | For **XAPK** files (ZIP bundles containing multiple APKs, used by APKPure and similar stores): the script automatically extracts the archive, identifies all APK files inside (base + split APKs), and decompiles each one into a separate subdirectory. The XAPK manifest is copied to the output for reference. |
| 57 | |
| 58 | For **AAB** files (Android App Bundles): the script uses bundletool to generate a universal APK from the bundle, then decompiles it. bundletool must be installed (run `install-dep.sh bundletool`). |
| 59 | |
| 60 | For **DEX** files: jadx handles them natively. For Fernflower, dex2jar is used as an intermediate step (same as APK files). |
| 61 | |
| 62 | Options: |
| 63 | - `-o <dir>` — Custom output directory (default: `<filename>-decompiled`) |
| 64 | - `--deobf` — Enable deobfuscation (recommended for obfuscated apps) |
| 65 | - `--no-res` — Skip resources, decompile code only (faster) |
| 66 | - `--engine ENGINE` — `jadx` (default), `fernflower`, or `both` |
| 67 | |
| 68 | **Engine selection strategy**: |
| 69 | |
| 70 | | Situation | Engine | |
| 71 | |---| |