Analyze Android APKs with REA (JADX setup, tested)
Unofficial guide. This site is an independent community guide and is not affiliated with the REA project. For authoritative docs see the official REA website and the morluto/rea GitHub repository. Commands here are taken from the official README/docs (checked 2026-10-20); REA changes quickly, so verify against the official docs.
Short answer: REA does not download JADX for you. Get jadx-headless-mcp-0.7.1-all.jar from the jadx-headless-mcp v0.7.1 GitHub release (42.6 MB, SHA-256 6e5eacf500b64292bfb73c49797c1958f6ee44646e43e868039ae7feb573ff75), install a full JDK 17+, set REA_JADX_MCP_JAR to the JAR's absolute path, then run rea inspect-android-package app.apk.
Tested on 2026-10-18: Linux x64 (Debian 13), rea-agents 6.5.0, Node.js 22.20, Temurin OpenJDK 21.0.12, on the open-source Privacy Friendly Dicer 2.0.0 APK from F-Droid (2.9 MB, GPL).
1. Download jadx-headless-mcp-0.7.1-all.jar and check the hash
REA pins exactly version 0.7.1. The download URL and digest come from REA's android-analysis.md; the hash below matched on our download.
mkdir -p "$HOME/.local/share/rea/android" && cd "$HOME/.local/share/rea/android"
curl -fL -o jadx-headless-mcp-0.7.1-all.jar \
https://github.com/1013503897/jadx-headless-mcp/releases/download/v0.7.1/jadx-headless-mcp-0.7.1-all.jar
echo '6e5eacf500b64292bfb73c49797c1958f6ee44646e43e868039ae7feb573ff75 jadx-headless-mcp-0.7.1-all.jar' | sha256sum -c -
# jadx-headless-mcp-0.7.1-all.jar: OK
export REA_JADX_MCP_JAR="$PWD/jadx-headless-mcp-0.7.1-all.jar"
macOS: use shasum -a 256 -c - instead of sha256sum -c -.
Windows PowerShell:
$jar = Join-Path $HOME '.local\share\rea\android\jadx-headless-mcp-0.7.1-all.jar'
New-Item -ItemType Directory -Force (Split-Path $jar) | Out-Null
Invoke-WebRequest -Uri 'https://github.com/1013503897/jadx-headless-mcp/releases/download/v0.7.1/jadx-headless-mcp-0.7.1-all.jar' -OutFile $jar
(Get-FileHash -Algorithm SHA256 $jar).Hash.ToLower() # must be 6e5eacf500b64292bfb73c49797c1958f6ee44646e43e868039ae7feb573ff75
$env:REA_JADX_MCP_JAR = $jar
$env:JAVA_HOME = 'D:\tools\jdk-21' # optional
2. Install a full JDK 17 or newer
A JRE is not enough: REA compiles a small bridge at runtime and needs the jdk.compiler module. Any OpenJDK build works; we used Temurin 21. Check with java --list-modules | grep jdk.compiler. If java is not on PATH, set JAVA_HOME. On Linux REA also needs a procps ps on PATH.
3. Check readiness
rea doctor --provider jadx
Real output (trimmed):
healthy: true
scope_checks[2]:
- name: node ok: true detail: 22.20.0
- name: jadx ok: true
detail: JADX MCP bridge JAR validated at /home/you/.local/share/rea/android/jadx-headless-mcp-0.7.1-all.jar;
its path is recorded for agent registrations.
4. Run it on an APK
rea inspect-android-package dicer.apk
rea search-android-classes dicer.apk MainActivity
rea inspect-android-method dicer.apk org.secuso.privacyfriendlydicer.ui.MainActivity onCreate
rea inspect-android-class /path/Example.apk example.MainActivity
rea trace-android-references /path/Example.apk example.MainActivity --method-name onCreate
What we got back:
inspect-android-packagefinished in 3.6 s (first run, npx cache warm): JADX loaded 1,368 classes and 1,086 resources in 1,147 ms and returned packageorg.secuso.privacyfriendlydicer, version 2.0.0 (101), min SDK 17, target SDK 34, the permissions (android.permission.VIBRATEplus a signature permission) and the full decodedAndroidManifest.xml.search-android-classes ... MainActivityreturned one match,org.secuso.privacyfriendlydicer.ui.MainActivity, withcoverage: complete.inspect-android-method ... onCreatereturned the signatureonCreate(android.os.Bundle): void, the DEX descriptor(Landroid/os/Bundle;)Vand the decompiled Java body (body_status: available).
Every result records the APK's SHA-256 and the JAR's SHA-256, and states its limits: the APK is never executed, and signatures, split APKs and native libraries are not verified by this provider. MCP tool names are the same with underscores: inspect_android_package, search_android_classes, inspect_android_class, inspect_android_method, trace_android_references.
5. Make it work inside Claude Code, Cursor or Codex (MCP)
The agent's MCP server needs the same variable. Export REA_JADX_MCP_JAR (and JAVA_HOME if you set one) before running npx rea-agents setup. In our dry run, setup detected it and wrote it into the registration: "Detected provider environment: REA_JADX_MCP_JAR=/.../jadx-headless-mcp-0.7.1-all.jar. Existing server environment overrides are retained." Restart the agent afterwards. If you already ran setup without it, rerun setup with the variable exported, or add it to the env block of the REA server in your client config (see the config generator).
Errors you may see (real output)
Set REA_JADX_MCP_JAR to the absolute path of a caller-supplied jadx-headless-mcp 0.7.1 JAR
code: capability_unavailable
category: unsupported_provider
message: Set REA_JADX_MCP_JAR to the absolute path of a caller-supplied jadx-headless-mcp 0.7.1 JAR. REA does not download or install it.
We got this both with the variable unset and with a relative path (REA_JADX_MCP_JAR=jadx-headless-mcp-0.7.1-all.jar). Use the full path. Inside an MCP client it usually means the variable was set in your terminal but not in the server's environment (see step 5).
Cannot inspect selected Java runtime java: spawn java ENOENT
code: capability_unavailable
message: "Cannot inspect selected Java runtime java: spawn java ENOENT. Select a full JDK including jdk.compiler via JAVA_HOME or PATH; verify it with java --list-modules."
No java on PATH and no JAVA_HOME. Install a JDK 17+ and point JAVA_HOME at it.
Platform notes
The docs list Linux x86-64 with Temurin 21 as verified for the current bridge (our run matches), with earlier records on macOS arm64 and Windows x64 with JDK 21. Windows x64 needs a recent rea-agents package (see Install REA on Windows); Windows arm64 is not supported.
Analyze only apps you own or are authorized to examine.
Related guides
Sources: android-analysis.md · jadx-headless-mcp v0.7.1 release · Privacy Friendly Dicer (F-Droid)
Flutter app? See Analyze a Flutter APK with REA (identify-flutter-build and the inspect-dart-aot unsupported_target error).
FAQ
Where do I download jadx-headless-mcp-0.7.1-all.jar?
From the v0.7.1 release of github.com/1013503897/jadx-headless-mcp. REA does not download it. Its SHA-256 is 6e5eacf500b64292bfb73c49797c1958f6ee44646e43e868039ae7feb573ff75.
Which Java version does REA need for Android APKs?
A full JDK 17 or newer that includes the jdk.compiler module; a JRE is not enough. We tested OpenJDK 21.
Why does REA say Set REA_JADX_MCP_JAR to the absolute path?
The variable is unset in that process or is a relative path. Use the full path, and export it before rea setup so MCP clients get it too.