Skip to content
Back to search

android-reverse-engineering-claude-skill

Claude Code skill that automates Android application reverse engineering

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/incogbyte--android-reverse-engineering-claude-skill/badge.svg)](/listings/incogbyte--android-reverse-engineering-claude-skill)

HTML

<a href="/listings/incogbyte--android-reverse-engineering-claude-skill"><img src="/api/listings/incogbyte--android-reverse-engineering-claude-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

The skill includes a script that automatically detects the OS and package manager:

# Check what is installed and what is missing
bash scripts/check-deps.sh

# Install dependencies individually (detects brew/apt/dnf/pacman)
bash scripts/install-dep.sh java
bash scripts/install-dep.sh jadx
bash scripts/install-dep.sh vineflower
bash scripts/install-dep.sh dex2jar
bash scripts/install-dep.sh bundletool

The script installs without sudo when possible (local download to `~/.local/`). When sudo is needed, it asks for confirmation. If it cannot install, it prints manual instructions.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 36 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "android-reverse-engineering-claude-skill",
  3. "owner": {
  4. "name": "incogbyte",
  5. "url": "https://github.com/incogbyte"
  6. },
  7. "metadata": {
  8. "description": "Marketplace for the Android Reverse Engineering Claude Code plugin.",
  9. "version": "1.0.0"
  10. },
  11. "plugins": [
  12. {
  13. "name": "android-reverse-engineering",
  14. "source": "./plugins/android-reverse-engineering",
  15. "description": "Decompile Android APK/XAPK/AAB/DEX/JAR/AAR with jadx or Vineflower, extract HTTP APIs, trace call flows, audit security, and run adaptive Frida dynamic analysis.",
  16. "version": "1.0.0",
  17. "author": {
  18. "name": "incogbyte",
  19. "url": "https://github.com/incogbyte"
  20. },
  21. "homepage": "https://github.com/incogbyte/android-reverse-engineering-claude-skill",
  22. "repository": "https://github.com/incogbyte/android-reverse-engineering-claude-skill",
  23. "license": "Apache-2.0",
  24. "keywords": [
  25. "android",
  26. "reverse-engineering",
  27. "apk",
  28. "jadx",
  29. "decompile",
  30. "api-extraction",
  31. "frida",
  32. "security"
  33. ]
  34. }
  35. ]
  36. }
README.md · README · 478 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Android Reverse Engineering - Claude Code Skill
  2. **Author:** [incogbyte](https://github.com/incogbyte)
  3. Claude Code skill that automates Android application reverse engineering. Decompiles APK, XAPK, AAB, DEX, JAR, and AAR files, extracts HTTP endpoints (Retrofit, OkHttp, Volley, GraphQL, WebSocket), traces call flows, analyzes security patterns, documents discovered APIs, and performs adaptive dynamic analysis with Frida — generating custom bypass scripts based on static analysis findings and iterating through crash logs to defeat runtime protections (RASP, root detection, SSL pinning, anti-tamper).
  4. ## What this skill does
  5. - **Decompiles** APK, XAPK, AAB, DEX, JAR, and AAR using jadx or Fernflower/Vineflower (individually or side by side for comparison)
  6. - **Extracts HTTP APIs**: Retrofit endpoints, OkHttp calls, Volley, GraphQL queries/mutations, WebSocket connections, hardcoded URLs, authentication headers
  7. - **Traces call flows** from Activities/Fragments to network calls, through ViewModels, Repositories, coroutines/Flow, and RxJava chains
  8. - **Analyzes app structure**: AndroidManifest, packages, architectural pattern (MVP, MVVM, Clean Architecture)
  9. - **Audits security**: certificate pinning, disabled SSL verification, exposed secrets, debug flags, weak crypto, and Android Fragment Injection (exported `PreferenceActivity` with missing/permissive `isValidFragment`)
  10. - **Dynamic analysis with Frida**: adaptive bypass loop that generates custom scripts based on decompiled code, runs them, captures crash logs, and iterates until protections are bypassed
  11. - **Bypasses runtime protections**: RASP, root detection (RootBeer, SafetyNet), SSL pinning, anti-tamper, Frida detection — all via targeted hooks generated from static analysis, not generic scripts
  12. - **Detects Fragment Injection**: flags exported `PreferenceActivity` subclasses with missing or permissive `isValidFragment()` overrides, plus dynamic fragment instantiation driven by Intent extras, and provides an adb + Frida confirmation playbook
  13. - **Handles obfuscated code**: strategies for navigating ProGuard/R8 output, using strings and annotations as anchors
  14. - **Generates reports**: structured Markdown reports with all findings
  15. ## Required tools
  16. ### Mandatory
  17. | Tool | Minimum version | Purpose |
  18. |---|---|---|
  19. | **Java JDK** | 17+ | Runtime for jadx and Fernflower |
  20. | **jadx** | any | Primary decompiler (APK/DEX/JAR/AAR to Java) |
  21. ### Optional (recommended)
  22. | Tool | Purpose |
  23. |---|---|
  24. | **Vineflower** (Fernflower fork) | Higher quality decompilation for lambdas, generics, and complex Java code |
  25. | **dex2jar** | Convert DEX to JAR (required to use Fernflower with APKs/DEX files) |
  26. | **bundletool** | Convert AAB (App Bundle) to APK for decompilation |
  27. | **apktool** | Resource decoding (XML, drawables) when jadx fails |
  28. | **adb** | Extract APKs directly from a connected Android device |
  29. ### For dynamic analysis (Phase 7)
  30. | Tool | Purpose |
  31. |---|---|
  32. | **Python 3.8+** | Runtime for frida-tools (installed in a venv, never globally) |
  33. | **adb** | Communication with device/emulator |
  34. | **frida-server** | Runs on the Android device/emulator (the skill detects if you already have it) |
  35. | **frida-tools** | Client-side Frida CLI — auto-installed in a venv matching your server version |
  36. ### How to install the tools
  37. The skill includes a script that automatically detects the OS and package manager:
  38. ```bash
  39. # Check what is installed and what is missing
  40. bash scripts/check-deps.sh
  41. # Install dependencies individually (detects brew/apt/dnf/pacman)
  42. bash scripts/install-dep.sh java
  43. bash scripts/install-dep.sh jadx
  44. bash scripts/install-dep.sh vineflower
  45. bash scripts/install-dep.sh dex2jar
  46. bash scripts/install-dep.sh bundletool
  47. ```
  48. The script installs without sudo when possible (local download to `~/.local/`). When sudo is needed, it asks for confirmation. If it cannot install, it prints manual instructions.
  49. ### Frida setup
  50. The Frida setup is handled by a dedicated script that **detects your existing environment first** before changing anything:
  51. ```bash
  52. # Detect everything: device, frida-server version, create matching venv
  53. bash scripts/setup-frida.sh
  54. # If frida-server is not on the device, auto-download and push it:
  55. bash scripts/setup-frida.sh --install-server
  56. ```
  57. What `setup-frida.sh` does:
  58. 1. **Checks adb** — verifies a device/emulator is connected, gets architecture (arm64, x86, etc.)
  59. 2. **Finds existing frida-server** — checks `/data/local/tmp/frida-server` and running processes on the device
  60. 3. **Gets frida-server version** — extracts version from the binary on device
  61. 4. **Checks Python 3 + venv module** — required for frida-tools
  62. 5. **Creates a venv** at `~/.local/share/frida-re/venv` — **frida-tools is never installed globally**
  63. 6. **Installs frida-tools matching your server version** — avoids version mismatch errors
  64. 7. **Tests connectivity** — runs `frida-ps -U` to verify everything works
  65. If you already have frida-server on your device (most users do), the script just creates the venv and matches the client version. No unnecessary reinstalls.
  66. #### Manual Frida installation
  67. ```bash
  68. # 1. Create venv (always use a venv, never install globally)
  69. python3 -m venv ~/.local/share/frida-re/venv
  70. # 2. Check your frida-server version on device
  71. adb shell /data/local/tmp/frida-server --version
  72. # 3. Install matching frida-tools
  73. ~/.local/share/frida-re/venv/bin/pip install frida-tools==<server-version>
  74. # 4. Verify
  75. ~/.local/share/frida-re/venv/bin/frida-ps -U
  76. ```
  77. #### Manual installation
  78. **Java JDK 17+:**
  79. ```bash
  80. # macOS
  81. brew install openjdk@17
  82. # Ubuntu/Debian
  83. sudo apt install openjdk-17-jdk
  84. # Fedora
  85. sudo dnf install java-17-openjdk-devel
  86. # Arch
  87. sudo pacman -S jdk17-openjdk
  88. ```
  89. **jadx:**
  90. ```bash
  91. # macOS/Linux (Homebrew)
  92. brew install jadx
  93. # Or download directly from GitHub:
  94. # https://github.com/skylot/jadx/releases/latest
  95. # Extract and add bin/ to PATH
  96. ```
  97. **Vineflower (Fernflower fork):**
  98. ```bash
  99. # macOS (Homebrew)
  100. brew install vineflower
  101. # Or download the JAR:
  102. # https://github.com/Vineflower/vineflower/releases/latest
  103. # Save the JAR and set:
  104. export FERNFLOWER_JAR_PATH="$HOME/vineflower/vineflower.jar"
  105. ```
  106. **dex2jar:**
  107. ```bash
  108. # macOS (Homebrew)
  109. brew install dex2jar
  110. # Or download:
  111. # https://github.com/pxb1988/dex2jar/releases/latest
  112. # Extract and add to PATH
  113. ```
  114. **bundletool:**
  115. ```bash
  116. # macOS (Homebrew)
  117. brew install bundletool
  118. # Or download the JAR:
  119. # https://github.com/google/bundletool/releases/latest
  120. # Save and set:
  121. export BUNDLETOOL_JAR_PATH="$HOME/bundletool/bundletool.jar"
  122. ```
  123. ## Skill installation
  124. ### Via GitHub (recommended)
  125. In Claude Code, add the marketplace and install:
  126. ```
  127. /plugin marketplace add incogbyte/android-reverse-engineering-claude-skill
  128. /plugin install android-reverse-engineering@android-reverse-engineering-claude-skill
  129. ```
  130. ### Via local clone
  131. ```bash
  132. git clone https://github.com/incogbyte/android-reverse-engineering-claude-skill.git
  133. ```
  134. In Claude Code, add the local marketplace and install:
  135. ```
  136. /plugin marketplace add /path/to/android-reverse-engineering-claude-skill
  137. /plugin install android-reverse-engineering@android-reverse-engineering-claude-skill
  138. ```
  139. ### Quick test (no installation)
  140. Load the plugin directly for the current session:
  141. ```bash
  142. claude --plugin-dir /path/to/android-reverse-engineering-claude-skill/plugins/android-reverse-engineering
  143. ```
  144. ## Usage
  145. ### /decompile command
  146. ```
  147. /decompile path/to/app.apk
  148. ```
  149. Runs the full flow: checks dependencies, decompiles, and analyzes the app structure.
  150. ### Natural language
  151. The skill activates automatically with phrases like:
  152. - "Decompile this APK"
  153. - "Reverse engineer this Android app"
  154. - "Extract the API endpoints from this app"
  155. - "Follow the call flow from LoginActivity"
  156. - "Analyze this AAR library"
  157. - "Find the hardcoded URLs in this APK"
  158. - "Decompile this AAB file"
  159. - "Audit the security of this app"
  160. - "Find GraphQL endpoints in this APK"
  161. - "Check for certificate pinning"
  162. - "Bypass the root detection in this app"
  163. - "Hook the login method and capture credentials"
  164. - "The app crashes on my rooted device, find out why and bypass it"
  165. - "Trace all API calls this app makes at runtime"
  166. ### Standalone scripts
  167. The scripts can be used directly outside of Claude Code:
  168. ```bash
  169. # Decompile with jadx (default)
  170. bash scripts/decompile.sh app.apk
  171. # Decompile XAPK (extracts and decompiles each internal APK)
  172. bash scripts/decompile.sh app-bundle.xapk
  173. # Decompile AAB (uses bundletool to extract universal APK)
  174. bash scripts/decompile.sh app-bundle.aab
  175. # Decompile DEX file directly
  176. bash scripts/decompile.sh classes.dex
  177. # Decompile with Fernflower (better for JARs)
  178. bash scripts/decompile.sh --engine fernflower library.jar
  179. # Decompile with both engines and compare
  180. bash scripts/decompile.sh --engine both --deobf app.apk
  181. # Decompile code only (no resources, faster)
  182. bash scripts/decompile.sh --no-res app.apk
  183. # Search for API calls in decompiled code (all patterns)
  184. bash scripts/find-api-calls.sh output/sources/
  185. # Search with context lines for better readability
  186. bash scripts/find-api-calls.sh output/sources/ --context 3
  187. # Search for Retrofit endpoints only
  188. bash scripts/find-api-calls.sh output/sources/ --retrofit
  189. # Search for hardcoded URLs only
  190. bash scripts/find-api-calls.sh output/sources/ --urls
  191. # Search for authentication patterns
  192. bash scripts/find-api-calls.sh output/sources/ --auth
  193. # Search for Kotlin coroutines/Flow patterns
  194. bash scripts/find-api-calls.sh output/sources/ --kotlin
  195. # Search for RxJava patterns
  196. bash scripts/find-api-calls.sh output/sources/ --rxjava
  197. # Search for GraphQL queries/mutations
  198. bash scripts/find-api-calls.sh output/sources/ --graphql
  199. # Search for WebSocket connections
  200. bash scripts/find-api-calls.sh output/sources/ --websocket
  201. # Security audit (cert pinning, exposed secrets, debug flags, crypto)
  202. bash scripts/find-api-calls.sh output/sources/ --security
  203. # Fragment Injection scan (exported PreferenceActivity, isValidFragment status)
  204. bash scripts/find-fragment-injection.sh output/ --report fragment-injection-report.md
  205. # Full analysis with Markdown report, context, and deduplication
  206. bash scripts/find-api-calls.sh output/sources/ --context 3 --dedup --report report.md
  207. # --- Dynamic Analysis (Frida) ---
  208. # Setup Frida environment (detect device, create venv, match versions)
  209. bash scripts/setup-frida.sh
  210. # Setup + auto-install frida-server on device if missing
  211. bash scripts/setup-frida.sh --install-server
  212. # Launch app and capture crash diagnostics (before any hooks)
  213. bash scripts/adb-crash-capture.sh -p com.example.app
  214. # Launch with longer monitoring window and save logs
  215. bash scripts/adb-crash-capture.sh -p com.example.app -t 20 -o ./crash-logs/
  216. # Run a Frida script against an app (spawn mode)
  217. bash scripts/frida-run.sh -p com.example.app -l bypass.js
  218. # Run with early hook (pause on spawn, hook before app code runs)
  219. bash scripts/frida-run.sh -p com.example.app -l bypass.js --pause
  220. # Run inline JavaScript
  221. bash scripts/frida-run.sh -p com.example.app -e "Java.perform(function() { console.log('hooked'); })"
  222. # Attach to already running app
  223. bash scripts/frida-run.sh -p com.example.app -l analysis.js --attach
  224. # Run with timeout and save output
  225. bash scripts/frida-run.sh -p com.example.app -l bypass.js -t 60 --output-dir ./frida-output/
  226. ```
  227. ### decompile.sh options
  228. | Option | Description |
  229. |---|---|
  230. | `-o <dir>` | Output directory (default: `<name>-decompiled`) |
  231. | `--deobf` | Enable deobfuscation (renames obfuscated classes/methods) |
  232. | `--no-res` | Skip resource decoding (faster) |
  233. | `--engine ENGINE` | `jadx` (default), `fernflower`, or `both` |
  234. ### find-api-calls.sh options
  235. | Option | Description |
  236. |---|---|
  237. | `--retrofit` | Search only for Retrofit annotations |
  238. | `--okhttp` | Search only for OkHttp patterns |
  239. | `--volley` | Search only for Volley patterns |
  240. | `--urls` | Search only for hardcoded URLs |
  241. | `--auth` | Search only for auth-related patterns |
  242. | `--kotlin` | Search only for Kotlin coroutines/Flow patterns |
  243. | `--rxjava` | Search only for RxJava patterns |
  244. | `--graphql` | Search only for GraphQL patterns |
  245. | `--websocket` | Search only for WebSocket patterns |
  246. | `--security` | Search only for security patterns (cert pinning, secrets, debug flags, crypto) |
  247. | `--all` | Search all patterns (default) |
  248. | `--context N` | Show N lines of context around matches |
  249. | `--dedup` | Deduplicate results by endpoint/URL |
  250. | `--report FILE` | Export results as structured Markdown report |
  251. ### setup-frida.sh options
  252. | Option | Description |
  253. |---|---|
  254. | `-s, --serial SERIAL` | Target specific device by serial |
  255. | `--install-server` | Download and push frida-server to device if missing |
  256. | `--venv-dir DIR` | Custom venv directory (default: `~/.local/share/frida-re`) |
  257. ### frida-run.sh options
  258. | Option | Description |
  259. |---|---|
  260. | `-p, --package PKG` | Target package name (required) |
  261. | `-l, --load FILE` | JavaScript file to load (required, or use `-e`) |
  262. | `-e, --eval CODE` | Inline JavaScript to execute |
  263. | `-t, --timeout SECS` | Max seconds to run (default: 30, 0=unlimited) |
  264. | `--attach` | Attach to running process instead of spawning |
  265. | `--pause` | Pause app on spawn (hooks run before any app code) |
  266. | `-s, --serial SERIAL` | Target specific device |
  267. | `--output-dir DIR` | Save stdout/stderr/crash logs to directory |
  268. ### adb-crash-capture.sh options
  269. | Option | Description |
  270. |---|---|
  271. | `-p, --package PKG` | Target package name (required) |
  272. | `-a, --activity ACT` | Specific activity to launch (default: auto-detect) |
  273. | `-t, --time SECS` | Monitor window in seconds (default: 10) |
  274. | `-s, --serial SERIAL` | Target specific device |
  275. | `-o, --output-dir DIR` | Save logs to directory |
  276. | `-v, --verbose` | Include full logcat output |
  277. ### When to use each engine
  278. | Scenario | Recommended engine |
  279. |---|---|
  280. | First pass on any APK/AAB | `jadx` (faster, decodes resources) |
  281. | JAR/AAR library analysis | `fernflower` (better Java output) |
  282. | jadx has warnings or broken code | `both` (compare and pick the best per class) |
  283. | Complex lambdas, generics, streams | `fernflower` |
  284. | Quick overview of a large APK | `jadx --no-res` |
  285. | DEX file analysis | `jadx` (native support) or `fernflower` (via dex2jar) |
  286. ## How dynamic analysis works (adaptive bypass loop)
  287. Unlike tools that ship generic bypass scripts, this skill uses Claude as the intelligence layer. The approach:
  288. 1. **Static analysis first** (Phases 1–6): decompile the app, understand its structure, find protection mechanisms in the code
  289. 2. **Baseline crash check**: launch the app and capture crash logs — does it even run on a rooted device/emulator?
  290. 3. **Identify the protection**: cross-reference the crash stack trace with the decompiled code to find the exact method that triggered the crash
  291. 4. **Generate a targeted Frida script**: hook that specific method based on what the code actually does (not a generic bypass)
  292. 5. **Run and capture**: execute the script, monitor for new crashes
  293. 6. **Iterate**: if a new crash occurs, it means a different protection check triggered — analyze, generate another hook, repeat
  294. 7. **Analyze**: once the app runs cleanly, use Frida to intercept traffic, monitor crypto, trace methods
  295. ```
  296. Static Analysis → Find protections in code
  297. ↓
  298. Launch app → Crash? → Read crash logs
  299. ↓ ↓
  300. No crash Cross-reference with
  301. (skip to analysis) decompiled source
  302. ↓ ↓
  303. Runtime analysis Generate targeted hook
  304. (traffic, crypto, ↓
  305. method tracing) Run with Frida → New crash?
  306. ↓ ↓
  307. Success Repeat (next check)
  308. ```
  309. This approach handles RASP, root detection, SSL pinning, anti-tamper, and Frida detection — because it doesn't rely on known signatures. It reads the actual code and adapts.
  310. ## Repository structure
  311. ```
  312. android-reverse-engineering-claude-skill/
  313. ├── .claude-plugin/
  314. │ └── marketplace.json
  315. ├── plugins/
  316. │ └── android-reverse-engineering/
  317. │ ├── .claude-plugin/
  318. │ │ └── plugin.json
  319. │ ├── skills/
  320. │ │ └── android-reverse-engineering/
  321. │ │ ├── SKILL.md
  322. │ │ ├── references/
  323. │ │ │ ├── setup-guide.md
  324. │ │ │ ├── jadx-usage.md
  325. │ │ │ ├── fernflower-usage.md
  326. │ │ │ ├── api-extraction-patterns.md
  327. │ │ │ ├── call-flow-analysis.md
  328. │ │ │ ├── firebase-google-api-testing.md
  329. │ │ │ └── android-fragment-injection.md
  330. │ │ └── scripts/
  331. │ │ ├── check-deps.sh
  332. │ │ ├── install-dep.sh
  333. │ │ ├── decompile.sh
  334. │ │ ├── find-api-calls.sh
  335. │ │ ├── find-firebase-config.sh
  336. │ │ ├── find-fragment-injection.sh
  337. │ │ ├── test-firebase-google.sh
  338. │ │ ├── setup-frida.sh
  339. │ │ ├── frida-run.sh
  340. │ │ └── adb-crash-capture.sh
  341. │ ├── tests/
  342. │ │ ├── run_tests.sh
  343. │ │ └── fixtures/ # synthetic decompiled apps
  344. │ └── commands/
  345. │ └── decompile.md
  346. ├── LICENSE
  347. └── README.md
  348. ```
  349. ## Tests
  350. The detection scripts use bash heuristics that are easy to silently break
  351. (manifest parsing, `isValidFragment` classification, `targetSdkVersion` gating,
  352. AndroidX dynamic-load correlation). A committed fixture suite guards them:
  353. ```bash
  354. bash plugins/android-reverse-engineering/tests/run_tests.sh
  355. ```
  356. Fixtures under `tests/fixtures/` are synthetic decompiled apps covering:
  357. vulnerable / legacy (`targetSdk < 19`) / broken (`missing` + `targetSdk ≥ 19`)
  358. / safe (whitelist) / AndroidX (modern preference API + dynamic load) / clean /
  359. minified single-line manifest, plus Firebase config present and minified, and a
  360. no-Firebase control. Add a fixture + assertion whenever you touch a detector.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.