Connect REA to Ghidra 12.1 (unofficial)
REA 6.5.0 (October 2026) uses an existing Ghidra 12.1.x installation with a 64-bit full JDK 21 or newer, located through GHIDRA_INSTALL_DIR; upstream verified the bridge with Ghidra 12.1.4 and JDK 21.
REA drives an existing Ghidra install. It does not download Ghidra for you.
- Install Ghidra 12.1.x and a 64-bit full JDK (Ghidra 12.1 needs JDK 21 or newer; REA's docs say the bridge is verified with Ghidra 12.1.4 + JDK 21).
- Export absolute paths, then check readiness:
export GHIDRA_INSTALL_DIR=/absolute/path/to/ghidra_12.1.4_PUBLIC
export JAVA_HOME=/absolute/path/to/jdk-21 # optional if java/javac are already on PATH
rea doctor --provider ghidra --json
- Analyze with an explicit provider:
rea analyze /absolute/path/to/program --provider ghidra --json
Supported platforms and versions
| Item | Upstream statement (REA docs) |
|---|---|
| Hosts | Linux x64/arm64, macOS x64/arm64; Windows x64 is experimental P0 |
| Ghidra | 12.1.x |
| JDK | 64-bit full JDK within the install's application.java.min / max; current 12.1 needs JDK 21+ with no max |
| Verification cited by REA | Ghidra 12.1.4 + JDK 21 |
| Native decompiler | Must exist under Ghidra/Features/Decompiler/os/<platform>/ (or build/os/<platform>/) for the host architecture |
REA does not build or install native tools, and does not change Gatekeeper quarantine settings.
Set environment variables
Linux / macOS
export GHIDRA_INSTALL_DIR=/absolute/path/to/ghidra_12.1.4_PUBLIC
export JAVA_HOME=/absolute/path/to/jdk-21
rea doctor --json
rea setup
On macOS, Homebrew OpenJDK is keg-only. Point JAVA_HOME at the formula's libexec/openjdk.jdk/Contents/Home (for example /opt/homebrew/opt/openjdk/libexec/openjdk.jdk/Contents/Home).
Windows (PowerShell)
$env:GHIDRA_INSTALL_DIR = "C:\tools\ghidra_12.1.4_PUBLIC"
$env:JAVA_HOME = "C:\Program Files\Java\jdk-21"
rea doctor --json
rea providers --json
If GHIDRA_INSTALL_DIR is unset, doctor may search PATH for ghidra / ghidraRun. An explicit but invalid GHIDRA_INSTALL_DIR always wins and is reported instead of silently falling back.
Native decompiler on macOS
Missing macOS x64 decompiler
If doctor reports native_decompiler missing on macOS x64, the archive may ship sources without the executable. REA documents this build (needs Xcode CLT, make, bison):
cd "$GHIDRA_INSTALL_DIR/Ghidra/Features/Decompiler/src/decompile/cpp"
make ghidra_opt
decompiler_dir="$GHIDRA_INSTALL_DIR/Ghidra/Features/Decompiler/os/mac_x86_64"
mkdir -p "$decompiler_dir"
test ! -e "$decompiler_dir/decompile" && test ! -L "$decompiler_dir/decompile" &&
install -m 755 ghidra_opt "$decompiler_dir/decompile"
rea doctor --json
Apple Silicon (arm64)
cd "$GHIDRA_INSTALL_DIR/Ghidra/Features/Decompiler/src/decompile/cpp"
make ghidra_opt ARCH_TYPE="-arch arm64" OSDIR=mac_arm_64
decompiler_dir="$GHIDRA_INSTALL_DIR/Ghidra/Features/Decompiler/os/mac_arm_64"
mkdir -p "$decompiler_dir"
test ! -e "$decompiler_dir/decompile" && test ! -L "$decompiler_dir/decompile" &&
install -m 755 ghidra_opt "$decompiler_dir/decompile"
rea doctor --json
REA states this was verified on macOS 15.6 arm64 with Apple clang 17 and stock bison 2.3 against Ghidra 12.1.4.
Linux ARM64 uses linux_arm_64; official archives may require building that native component separately.
Prefer Ghidra when both Hopper and Ghidra work
export REA_ANALYSIS_PROVIDER=ghidra
An explicit --provider on the CLI overrides the env var. For large binaries, raise the startup deadline:
export REA_GHIDRA_STARTUP_TIMEOUT_MS=600000
(Integer between 1 and 2,147,483,647 per docs.)
Related on RepoRead
FAQ
Does REA install Ghidra?
No. Extract Ghidra and install the JDK yourself, then point GHIDRA_INSTALL_DIR at the tree.
Which Ghidra version should I use with REA?
REA accepts 12.1.x and cites verification with 12.1.4. Prefer that line unless upstream docs change.
Why does doctor fail when Java “works”?
The JDK's platform must match the host native decompiler directory (no Rosetta mismatch). Set JAVA_HOME to a matching 64-bit full JDK inside Ghidra's declared Java bounds.
Is Windows fully supported?
REA documents Windows Ghidra as experimental P0 with a defined PE/raw scope. Read windows-ghidra-p0.md.
Can I use this to crack software?
No. Authorized targets only. See REA's DISCLAIMER.md.