Rea-Android

mcp
Guvenlik Denetimi
Uyari
Health Uyari
  • No license — Repository has no license file
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 7 GitHub stars
Code Uyari
  • process.env — Environment variable access in rea-android-ultimate/rea-repo/.github/actions/portable-build-cache/action.yml
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

AndroidHarness x REA Android - The most complete APK reverse engineering toolkit for Android. Requires AndroidHarness by Sanu (https://github.com/Sanuu7/AndroidHarness). Fully offline, 200+ tools, Ghidra + rizin + JADX, MCP server, web dashboard.

README.md

REA Android Ultimate V6

REA Android Banner

Requires AndroidHarness by Sanu to run.
AndroidHarness is the native Android app that provides the Linux toolchain, Shizuku integration, and execution environment REA Android V6 needs. Install it from the Play Store or build from source: https://github.com/Sanuu7/AndroidHarness


⬇️ Download

Download from GitHub Releases

  1. Download the latest release zip from the releases page
  2. Extract it to any folder on your device
  3. Follow the Installation steps below

Note: The zip is ~1.1 GB. Make sure you have at least 3 GB free space before extracting.

Reverse Engineer Anything — Android Edition
The most complete APK reverse engineering toolkit for Android devices.
Fully offline — no downloads required after initial setup.

Important: REA Android V1 through V6 were built by vihaannewsamsung-sys (https://github.com/vihaannewsamsung-sys), porting the original "Rea Original" desktop tool by morluto (https://github.com/morluto/rea) to Android. Those versions were private releases and are not publicly available. REA Android V6 is the first public release. If you are reading this, you are among the first external users to have access to the complete suite.


What's in the Archive

After unzipping Rea-Android-V6.zip, you'll find this structure:

<extract-path>/                  # Whatever you named the folder when extracting
├── Rea-Android-V6-FIXED.zip    # Original archive (can be deleted after extraction)
├── README.md                   # This documentation
├── CREDITS.txt                 # Upstream project credits
├── setup.sh                    # One-shot offline setup script (delegates to scripts/setup.sh)
├── scripts/                    # ALL standalone tools (23 tools)
│   ├── rea6.sh                 # Unified launcher (20+ commands)
│   ├── ghidra-decompile.sh     # Ghidra headless decompiler wrapper
│   ├── native-analysis.sh      # Native binary analysis pipeline
│   ├── full-analysis.sh        # Full multi-engine analysis pipeline
│   ├── triage.py               # Automated triage
│   ├── crypto-extract.py       # Crypto/secret extraction
│   ├── vuln-scan.py            # Vulnerability scanner
│   ├── callgraph.py            # Call graph generator
│   ├── binary-diff.sh          # Binary/APK diff
│   ├── batch-analyze.sh        # Batch analysis
│   ├── jni-bridge.py           # JNI bridge reconstruction
│   ├── evidence-report.py      # HTML evidence reports
│   ├── analysis-cache.py       # Analysis caching
│   ├── rea-clean.sh            # Cleanup tool
│   ├── rea-tui.py              # Interactive TUI
│   ├── remote-analyze.sh       # Remote analysis bridge
│   ├── symbol-recovery.py      # Symbol recovery
│   ├── verify-counts.sh        # Tool count verification
│   ├── verify-env.sh           # Environment verification
│   ├── ram-optimize.sh         # RAM optimization
│   ├── setup.sh                # Full setup script
│   ├── example-plugin.py       # Example plugin
│   ├── plugin-runner.py        # Plugin system
│   └── bin/
│       ├── full-analysis.sh    # Full analysis pipeline
│       └── ghidra-decompile    # Ghidra decompile wrapper
├── ghidra/                     # Ghidra 11.0 DEV ARM64
│   ├── ghidra-arm64.tar.gz     # Compressed archive (~402MB)
│   ├── fontconfig/             # Fontconfig for Ghidra headless
│   └── scripts/                # Ghidra export scripts (ExportAllDecompiled.java, etc.)
├── rea-android-ultimate/       # Main REA toolkit
│   ├── .harness/               # Bundled toolchain (JDK, rizin, aapt2, jadx, apktool)
│   ├── rea-repo/               # REA core (Node.js, TypeScript)
│   │   ├── src/                # TypeScript source
│   │   ├── scripts/            # CLI scripts (rea.mjs, etc.)
│   │   ├── extras/scripts/     # 43 extra analysis scripts
│   │   ├── workbench/          # Web dashboard
│   │   └── skills/             # AI agent skills
│   ├── workbench/              # Web dashboard (duplicate for convenience)
│   ├── setup.sh                # Setup script (delegates to root scripts/setup.sh)
│   ├── rish                    # Shizuku shell binary
│   ├── rish_shizuku.dex        # Shizuku DEX
│   └── README.md               # v5 quick reference
├── skills/                     # AI agent skills
│   └── native-analysis/        # Native analysis skill
├── tools/                      # Pre-bundled toolchains (source for .harness)
│   ├── jdk/
│   │   ├── java-17-openjdk/    # For Ghidra
│   │   └── java-21-openjdk/    # For REA core
│   ├── rizin/                  # Rizin native decompiler
│   └── jadx/                   # JADX decompiler

Note: The workspace directory is wherever you extracted the zip (e.g., /storage/emulated/0/<your-folder>/). In commands, use the full path or cd into it first.


Table of Contents

  1. What Is REA Android V6?
  2. Credits and Origins
  3. System Architecture
  4. Prerequisites and Environment
  5. Installation
  6. Environment Setup
  7. Quick Start
  8. The Unified Launcher (rea6.sh)
  9. Standalone Tools Reference (23 tools)
  10. Extras Scripts Reference (43 scripts)
  11. Ghidra Integration (Detailed)
  12. Rizin Integration (Detailed)
  13. JADX Integration (Detailed)
  14. Web Dashboard
  15. MCP Server
  16. Native Analysis Pipeline
  17. Evidence System
  18. APK Analysis Workflow
  19. Native Binary Analysis Workflow
  20. Multi-Engine Orchestration
  21. Troubleshooting
  22. Common Issues and Fixes
  23. Advanced Configuration
  24. Security and Offline Operation
  25. License
  26. Appendix A: Command Quick Reference
  27. Appendix B: File Locations
  28. Appendix C: Environment Variables
  29. Appendix D: Tool Count Summary

1. What Is REA Android V6?

REA Android V6 is a comprehensive, offline-first reverse engineering toolkit designed to run natively on Android devices. It combines multiple reverse engineering engines into a single, unified command-line interface.

Core Philosophy

Static analysis first. REA does not execute target applications. All analysis is static — it reads APKs, DEX files, native ARM64/ARM32 binaries (.so/.elf), Windows PE (.exe/.dll), Apple Mach-O (.mach-o/.dylib), and firmware images without running them. Additional formats (EVM/Solidity, WASM, Go/Rust/Flutter AOT) are partially supported via Ghidra (now working on Android) — see What Is NOT Currently Supported for details. SQLite, pcap, browser captures, and process memory dumps are NOT supported.

No root required for static analysis. Most operations work on standard Android without root access. Shizuku is optional and only needed for privileged device commands (packages, logcat, screenshots, app management, settings).

Multi-engine orchestration. No single tool is best at everything. REA chains REA core + Ghidra + rizin + jadx + apktool + aapt2 into one pipeline. Each engine specializes in different file types and analysis depths.

Evidence-driven. Every analysis produces structured evidence bundles that can be combined, compared, exported, and imported across sessions. Evidence is not lost between runs.

MCP-native. Includes a Model Context Protocol server exposing 263 tools for AI agent integration, allowing AI coding assistants to drive REA programmatically.

What REA Can Analyze (Verified Working)

Category File Types Tools Used Status
APK / DEX .apk, .dex, .odex, .vdex jadx, apktool, aapt2, REA ✅ Verified
ARM64/ARM32 Native binaries .so, .elf Rizin (primary), Kuna, Ghidra ✅ Verified
DEX / ODEX / VDEX .dex, .odex, .vdex JADX ✅ Verified
Java/Kotlin source .java, .kt JADX ✅ Verified
Resources / Manifest resources.arsc, AndroidManifest.xml apktool, aapt2 ✅ Verified
Windows PE .exe, .dll Ghidra (native decompiler) ✅ Verified
Apple Mach-O .mach-o, .dylib Ghidra (native decompiler) ✅ Verified
Firmware images raw, .bin Ghidra (analysis) ✅ Verified (analysis only)
EVM/Solidity .sol, .bin Ghidra (EVM processor) ⚠️ Limited (Ghidra supports, REA not wired up)
WASM .wasm Ghidra (WASM processor) ⚠️ Limited (Ghidra supports, REA not wired up)
Go / Rust / Flutter AOT ELF/PE/Mach-O Ghidra (native analysis) ⚠️ Limited (Ghidra loads, may need specific analyzers)

What Is NOT Currently Supported

Format Status Reason
EVM/Solidity (.sol, .bin) ⚠️ Limited Ghidra has EVM processor (untested on Android)
WASM (.wasm) ⚠️ Limited Ghidra has WASM processor (untested on Android)
Go / Rust / Flutter AOT ⚠️ Limited Ghidra loads ELF/PE/Mach-O (native Go/Rust may need specific analyzers)
SQLite databases ❌ Not supported No SQLite analyzer in REA Android
pcap / network captures ❌ Not supported No pcap analyzer in REA Android
Browser captures (HAR, SAZ, qlog) ❌ Not supported No browser capture analyzer in REA Android
Process memory dumps ❌ Not supported No process capture analyzer in REA Android

Note: Items marked with ⚠️ are partially supported — Ghidra (now working on Android) has native processors for these formats, but REA Android has not wired them up or tested them. Items marked with ❌ are not supported — no analysis tool is available in REA Android V6. We are honest about limitations — this is an Android/ARM64-focused reverse engineering toolkit.


2. Credits and Origins

The following credits are reproduced from the project's CREDITS.txt file. This section exists to acknowledge the upstream projects and individuals whose work makes REA Android V6 possible.

Core Projects

REA (Reverse Engineer Anything)

  • Author: morluto
  • Repository: https://github.com/morluto/rea
  • License: MIT
  • Role: Core static analysis engine, CLI framework, MCP tool definitions, evidence system
  • Version: 6.5.0
  • Notice: REA-authored code is MIT. Third-party material retains its own copyright, license, and NOTICE requirements.
  • Full third-party notices: rea-android-ultimate/rea-repo/THIRD_PARTY_NOTICES.md

Ghidra 11.0 DEV (Native ARM64 Decompilation)

  • Author: dsgou66 (community build), based on NSA Ghidra
  • Source: https://github.com/dsgou66/ghidra-termux-arm64
  • License: Apache-2.0 (Ghidra), with government-work qualifications
  • Role: Native ARM64 decompiler. Deep decompilation of .so files to C pseudocode. Runs headless via analyzeHeadless.
  • Verified: 626 functions decompiled from libzip.so in ~90 seconds
  • Requirements: Java 17, headless mode, ARM64 Android

Ghidra (NSA)

rizin

  • Repository: https://github.com/rizinorg/rizin
  • License: LGPL-3.0
  • Role: Native disassembler, debugger, and binary analysis framework
  • Version: 0.9.1
  • Role: ARM64 disassembly, function analysis, import/export resolution, call graph analysis

jadx

  • Repository: https://github.com/skylot/jadx
  • License: Apache 2.0
  • Role: Dex-to-Java decompiler
  • Version: 0.7.1 (headless MCP bridge)
  • Role: APK/DEX decompilation to Java source code

apktool

aapt2

  • Part of the Android SDK build tools
  • License: Apache 2.0 (Android SDK)
  • Role: Android resource compilation and inspection

Node.js

  • Runtime for REA CLI
  • Version: 26.13.0
  • Role: Powers the REA command-line interface and MCP server

Python 3

  • Runtime for standalone Python tools
  • Role: Powers triage.py, crypto-extract.py, vuln-scan.py, callgraph.py, evidence-report.py, and 20+ other Python scripts

3. System Architecture

REA Android V6 is organized into three architectural layers:

Layer 1: Core REA Engine (rea-android-ultimate/rea-repo/)

This is the heart of the system — a Node.js-based analysis platform with:

  • 155 CLI commands covering static analysis, device operations, evidence management, and more
  • 207 MCP tools exposed through the Model Context Protocol server
  • JavaScript/TypeScript source in src/, compiled output in dist/
  • Native bindings for rizin, jadx, and other external tools
  • Analysis providers for APK/DEX, native binaries, managed code (.NET), JavaScript/Electron, firmware, EVM/Solidity, WASM, PE, Mach-O, Go, Rust, Flutter, SQLite, pcap, signals, browser capture, and process capture
  • Evidence system for bundling, comparison, export, and import

Key Subsystems

Static Analysis Providers:

  • apk-analysis — APK/DEX structure, manifest, classes, resources
  • native-analysis — ELF binaries, symbols, functions, strings
  • javascript-analysis — JavaScript bundles, Electron apps, source maps
  • firmware-analysis — Firmware images, embedded systems
  • evm-analysis — Ethereum Virtual Machine, Solidity contracts
  • wasm-analysis — WebAssembly modules
  • pe-analysis — Windows Portable Executable files
  • macho-analysis — Apple Mach-O binaries
  • go-analysis — Go binaries
  • rust-analysis — Rust binaries
  • flutter-analysis — Flutter/Dart AOT snapshots
  • sqlite-analysis — SQLite databases
  • pcap-analysis — Network packet captures
  • browser-capture — Web capture, HAR, SAZ, qlog
  • process-capture — Process memory, runtime capture

Evidence System:

  • Evidence bundles — structured JSON containers for analysis results
  • Evidence comparison — diff two evidence bundles
  • Evidence export/import — share analysis results between devices
  • HTML reports — combined human-readable reports

4. Prerequisites and Environment

Device Requirements

Requirement Minimum Recommended
Android version 5.0 (API 21) 12+ (API 31+)
Architecture ARM64-v8a ARM64-v8a
Storage 5 GB free 10 GB+ free
RAM 2 GB 4 GB+
CPU ARM64 ARM64 octa-core+
Shizuku Optional Recommended

What's Bundled in the Archive

The Rea-Android-V6.zip archive (approximately 800 MB compressed, ~2.5 GB extracted) contains:

Component Version Purpose
JDK 17 OpenJDK 17.0.21 Required by Ghidra 11.0 DEV
JDK 21 OpenJDK 21.0.13 Used by REA core tools
Node.js 26.13.0 REA CLI and MCP server runtime
Python 3 System Python Standalone tool runtime (requires python3 in PATH)
Rizin 0.9.1 (ARM64) Native disassembler and decompiler
aapt2 2.20 (android-16.0.0_r4) Android resource tool
apktool 2.12.1 APK decompilation/rebuilding
jadx 0.7.1 Java/Kotlin decompiler (headless MCP)
Ghidra 11.0 DEV (ARM64) Native decompiler (headless)
Shizuku — Privileged device access (optional)

5. Installation

Step 1: Unzip the Archive

unzip Rea-Android-V6.zip
cd rea-android-ultimate

Prerequisite: Python 3 (python3 command) must be available in PATH. Most Android Termux-derived environments include it by default.

The archive contains:

  • rea-android-ultimate/ — REA core repository and toolchain
  • ghidra/ — Ghidra 11.0 DEV ARM64 (all Ghidra components)
    • ghidra-arm64.tar.gz — Ghidra 11.0 DEV ARM64 build (402 MB)
    • fontconfig/ — Font configuration for Ghidra headless mode
    • scripts/ — Ghidra Java scripts (ExportAllDecompiled.java, SimpleTest.java)
  • setup.sh — One-shot offline setup
  • README.md — This document
  • CREDITS.txt — Upstream project credits
  • 23 standalone tools (Python, Bash, Node.js)
  • 43 extras scripts in rea-android-ultimate/rea-repo/extras/scripts/

Step 2: Run Setup (Offline, ~5 Minutes)

sh setup.sh

Setup performs the following steps automatically:

  1. Copies toolchain to scratch — Shared storage on Android is mounted noexec, so binaries cannot execute directly from /storage/emulated/0/. Setup copies all toolchain files (JDK, rizin, aapt2, apktool, jadx) to /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/ where execution is permitted.

  2. Fixes execute permissions — chmod +x on all binaries in scratch. Java binaries, rizin, aapt2, and all scripts are made executable.

  3. Installs Ghidra — Extracts ghidra-arm64.tar.gz to the scratch directory.

  4. Configures Java — Sets JAVA_HOME to JDK 17 for Ghidra, JDK 21 for REA tools.

  5. Configures Ghidra — Sets java_home.save to JDK 17 path, fixes shebangs in launch.sh, removes GccExceptionAnalyzer from Base.jar (crashes on font loading), creates stub libraries for headless operation.

  6. Registers clients — Creates Codex/MCP client configuration.

  7. Patches Ghidra decompiler — Copies patched DecompileProcess.class and libdecompile_jni.so to Ghidra's directory, enabling native decompilation via JNI posix_spawn bypass.

  8. Runs doctor — Verifies 10/10 environment checks pass.

Expected Setup Output

=== REA Android V6 setup (offline) ===
[1/7] Copying bundled toolchain to scratch (noexec-safe)...
[2/7] Extracting Ghidra ARM64 (this takes ~2 minutes)...
[3/7] Installing REA skill...
[4/7] Refreshing client registration...
[5/7] Running doctor...

=== Results ===
  PASS  node
  PASS  host
  PASS  android-termux-exec-interceptor
  PASS  android-writable-temp
  PASS  android-java-runtime
  PASS  android-apk-toolchain
  PASS  android-rizin
  PASS  android-shizuku
  PASS  jadx
  PASS  skill:identity

=== Done ===
Source env before use:  source /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh
Run:  cd rea-repo && node scripts/rea.mjs doctor --format json
Ghidra:  bash scripts/ghidra-decompile.sh <binary> [output.txt]

Step 3: Source the Environment

source /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh

This sets:

  • JAVA_HOME — Java 17 for Ghidra
  • PATH — Includes scratch bin, Java, rizin, aapt2
  • LD_LIBRARY_PATH — Native libraries for Java and tools
  • GHIDRA_HOME — Ghidra installation path
  • GHIDRA_TMPDIR — Ghidra temp directory
  • GHIDRA_USER_HOME — Ghidra user home
  • FONTCONFIG_FILE — Font configuration for Ghidra
  • HOME, TMPDIR — Writable directories

Step 4: Verify

cd rea-android-ultimate/rea-repo
node scripts/rea.mjs doctor --format json

Expected output: healthy: True with all checks passing.


6. Quick Start

Analyze an APK

# Step 1: Source the environment
source /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh

# Step 2: Quick triage (automated prioritized findings)
bash scripts/rea6.sh triage app.apk ./output

# Step 3: Full multi-engine analysis (REA + Ghidra + rizin)
bash scripts/rea6.sh analyze app.apk ./output

# Step 4: Generate HTML evidence report
python3 scripts/evidence-report.py ./output

# Step 5: Start web dashboard (optional, for visual browsing)
node rea-android-ultimate/workbench/server.js
# Open http://localhost:8080 in any browser

What You Get from APK Analysis

  • Package name, version, minSdk, targetSdk
  • Class count (typically 4,000–5,000+)
  • Resource count (typically 2,000–3,000+)
  • Permission analysis
  • Native library analysis (if .so files present)
  • Java/Kotlin decompilation (via JADX)
  • Vulnerability findings
  • Evidence bundle for sharing

Analyze a Native Binary (.so)

# Step 1: Source the environment
source /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh

# Step 2: Ghidra decompilation with rizin fallback
bash scripts/ghidra-decompile.sh libfoo.so ./output.txt

# Step 3: Native analysis pipeline
bash scripts/native-analysis.sh libfoo.so ./output

# Step 4: Extract crypto keys and secrets
python3 scripts/crypto-extract.py ./output/libfoo_decompiled.txt

# Step 5: Vulnerability scan
python3 scripts/vuln-scan.py ./output/libfoo_decompiled.txt

What You Get from Native Analysis

  • Function decompilation to C pseudocode (via Ghidra, with rizin fallback)
  • Export/import tables
  • Call graph
  • Crypto key extraction
  • Vulnerability findings
  • Symbol recovery (for stripped binaries)

Analyze a Windows PE Binary

bash scripts/rea6.sh analyze program.exe ./output

Analyze an Apple Mach-O Binary

bash scripts/rea6.sh analyze program.mach-o ./output

Analyze a Go Binary

bash scripts/rea6.sh analyze program ./output

Analyze a Rust Binary

bash scripts/rea6.sh analyze program ./output

Analyze a SQLite Database

bash scripts/rea6.sh analyze database.sqlite ./output

Analyze a pcap File

bash scripts/rea6.sh analyze capture.pcap ./output

6.5. First 10 Minutes — Your First Analysis

This is the shortest path from "I just unzipped the archive" to "I've analyzed something." Every command below assumes you are in the project root:

/storage/emulated/0/<your-extract-folder>

Step 1: Source the Environment

The setup.sh script already ran when you unzipped the archive. It copied the toolchain to an exec-capable scratch directory and created an environment file. You need to load that environment before any tool will work:

source "/data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh"

You only need to do this once per terminal session. If you close the terminal and reopen it, run this again.

Verify it worked:

java -version
# Should print something like: openjdk version "17.0.21"

If you get command not found, the environment file wasn't sourced. Run the source command again.


Step 2: Run Your First Analysis

Pick any APK or native binary (.so file) you want to analyze. If you don't have one handy, you can analyze a tool that's already in the workspace:

# Analyze a native library that's already in the workspace
bash scripts/rea6.sh analyze rea-android-ultimate/.harness/lib/libzip.so ./my_first_output

This runs the full pipeline: REA identification, native analysis (Ghidra + rizin), and evidence generation.

Expected output:

=== Native Analysis: libzip.so ===
Direct binary analysis: libzip.so
  Ghidra headless decompiler (with rizin fallback)
  Binary : .../libzip.so
  Output : .../libzip.so_decompiled.txt
  Timeout: 300s

  [1/2] Attempting Ghidra decompilation...
  ⚠️  Ghidra decompilation failed.
     Reason: ERROR ... Cannot run program ... decompile: error=0
     Falling back to rizin...

  [2/2] Running rizin decompilation (fallback)...
  ✅ Rizin fallback complete: N functions → libzip.so_decompiled.txt (XXK)

This is normal. Ghidra's native decompiler binary needs a specific system library (libc++_shared.so with certain symbols) that isn't present on this device. The script automatically falls back to rizin, which provides equivalent native decompilation capability.


6.6. The Two CLIs: rea6.sh vs node scripts/rea.mjs

You will see two ways to run REA commands throughout this documentation. Here is when to use which:

Tool What it is Best for
bash scripts/rea6.sh <command> Unified shell launcher Day-to-day use. Simpler syntax, combines REA + Ghidra + rizin + extras into one entry point.
node scripts/rea.mjs <command> REA core CLI Direct access to REA's 155 CLI commands and 207 MCP tools. Use when you need a specific REA command not exposed via rea6.sh.

Both are in the workspace:

  • bash scripts/rea6.sh — at <extract-path>/scripts/rea6.sh
  • node scripts/rea.mjs — at <extract-path>/rea-android-ultimate/rea-repo/scripts/rea.mjs

Example — same task, two ways:

# Via rea6.sh (simpler)
bash scripts/rea6.sh analyze app.apk ./output

# Via REA CLI directly (more granular)
node rea-android-ultimate/rea-repo/scripts/rea.mjs inspect-android-package app.apk --format json
node rea-android-ultimate/rea-repo/scripts/rea.mjs analyze app.apk ./output

If a command works in rea6.sh but not in rea.mjs (or vice versa), it's usually because rea6.sh wraps multiple commands together. Use rea6.sh for end-to-end workflows and rea.mjs for individual REA commands.


6.7. What Works vs. What's Degraded

REA Android V6 is fully functional for most analysis tasks, but one component has a known limitation on this Android build:

✅ Working Fully

Component Status
REA core CLI (155 commands) ✅ Fully functional
JADX (Java/Kotlin APK decompilation) ✅ Fully functional
Rizin (native ARM64 disassembly & decompilation) ✅ Fully functional
Evidence system (bundling, reports) ✅ Fully functional
Web dashboard (localhost:8080) ✅ Fully functional
MCP server (263 tools) ✅ Fully functional
All 23 standalone tools ✅ Fully functional
All 43 extras scripts ✅ Fully functional

✅ Ghidra Native Decompilation (Fixed)

Ghidra 11.0 DEV is installed and its native decompiler now works on Android. The fork()+execve() restriction that previously blocked the decompiler binary has been bypassed using a JNI posix_spawn wrapper (libdecompile_jni.so) and a patched DecompileProcess.class.

What this means:

  • Ghidra can load and analyze native binaries ✅
  • Ghidra can decompile to C pseudocode ✅ (verified on ARM64 ELF, PE x64, and PE x86)
  • The ghidra-decompile.sh script uses the patched Ghidra with JNI posix_spawn bypass ✅
  • Rizin remains available as a fallback decompiler ✅

Requirements: The -Xverify:none JVM flag is required (set automatically by ghidra-decompile.sh) to skip bytecode verification of the patched DecompileProcess.class.

If you need to run Ghidra manually: Set JAVA_TOOL_OPTIONS to include -noverify:

export JAVA_TOOL_OPTIONS="-Djava.library.path=$GHIDRA_HOME/Ghidra/Features/Decompiler/os/linux_arm_64 -Xverify:none"

6.8. Workspace Path

The workspace directory is wherever you extracted the zip (e.g., /storage/emulated/0/<your-folder>/). Every command below assumes you are in this directory.

cd "/storage/emulated/0/<your-folder>"
bash scripts/rea6.sh analyze app.apk ./output

7. The Unified Launcher (scripts/rea6.sh)

scripts/rea6.sh is the primary entry point for REA Android V6. It chains REA + Ghidra + rizin + extras into one command-line interface.

Usage

bash scripts/rea6.sh <command> [args]

Note for Android shared storage: The project is stored on /storage/emulated/0/ (shared storage) which is mounted noexec. You cannot run ./scripts/rea6.sh directly — always use bash scripts/rea6.sh <command> to execute it. This is a filesystem limitation, not a bug.

Complete Command Reference

Command Description Example
analyze <apk|binary> [outdir] Full multi-engine analysis (REA + Ghidra + rizin) bash scripts/rea6.sh analyze app.apk ./output
decompile-native <binary> [output] Ghidra headless decompilation to C pseudocode bash scripts/rea6.sh decompile-native libfoo.so ./output.txt
identify <apk> Quick APK identification (package, version, SDK) bash scripts/rea6.sh identify app.apk
scan <apk> Security scan (libs, secrets, manifest) bash scripts/rea6.sh scan app.apk
clean [--all|--scratch|--logs] Cleanup temp files bash scripts/rea6.sh clean --all --yes
cache <check|store|get|list|clean|stats> Analysis cache management bash scripts/rea6.sh cache check
ghidra <binary> [output] Ghidra decompilation bash scripts/rea6.sh ghidra libfoo.so ./output.txt
native-analyze <binary|apk> Native analysis pipeline (Ghidra + rizin) bash scripts/rea6.sh native-analyze libfoo.so ./output
triage <apk|binary> [outdir] Automated triage with prioritized findings bash scripts/rea6.sh triage app.apk ./output
crypto <decompiled.txt> Extract crypto/secrets from native code bash scripts/rea6.sh crypto ./output/libfoo_decompiled.txt
jni-bridge <apk> [output] Reconstruct JNI bridge (Java↔native map) bash scripts/rea6.sh jni-bridge app.apk ./jni.json
vuln-scan <file|dir> Vulnerability pattern scanner (40+ patterns) bash scripts/rea6.sh vuln-scan ./output/libfoo_decompiled.txt
callgraph <decompiled.txt> Interactive HTML call graph bash scripts/rea6.sh callgraph ./output/libfoo_decompiled.txt
diff <file1> <file2> Binary/APK diff analysis bash scripts/rea6.sh diff app_v1.apk app_v2.apk
batch <dir> [outdir] Batch analyze multiple targets bash scripts/rea6.sh batch ./apks/ ./output
report <output_dir> [--title] Generate HTML evidence report bash scripts/rea6.sh report ./output --title "My Analysis"
symbol-recovery <decompiled.txt> Recover function names from stripped binaries bash scripts/rea6.sh symbol-recovery ./output/libfoo_decompiled.txt
tui [analysis_dir] Interactive terminal UI bash scripts/rea6.sh tui ./output
plugins <name> <target> Run a community plugin bash scripts/rea6.sh plugins example-plugin ./output
remote <file> <host> [port] Remote analysis bridge bash scripts/rea6.sh remote app.apk 192.168.1.100 8080
help Show all commands bash scripts/rea6.sh help

Example: Full Analysis

bash scripts/rea6.sh analyze com.example.app.apk ./output

This runs:

  1. REA identification (package, version, SDK, classes, resources)
  2. Security analysis (lib-detect, secret-scan, manifest-check)
  3. Native analysis (Ghidra decompilation + rizin disassembly)
  4. Evidence bundling (combined HTML report)

Example: Triage

bash scripts/rea6.sh triage com.example.app.apk ./triage_output

This runs automated triage with prioritized findings, combining:

  • REA identify
  • lib-detect
  • secret-scan
  • manifest-check
  • arch-map
  • Ghidra decompile (if native)
  • rizin trace
  • Ranking of findings by severity

Example: Native Analysis

bash scripts/rea6.sh native-analyze libfoo.so ./native_output

This runs Ghidra decompilation (with rizin fallback), plus rizin standalone analysis (exports, imports, functions).


8. Standalone Tools Reference (23 tools)

The scripts/ directory contains 23 standalone tools. Each is self-contained and can be run independently.

8.1 setup.sh — One-Shot Offline Setup

Usage: sh setup.sh (root) or sh scripts/setup.sh (full)

Purpose: Copies bundled toolchain to scratch (noexec-safe), installs Ghidra, configures environment, runs doctor, registers clients.

What it does:

  1. Copies .harness toolchain to scratch directory
  2. Fixes execute permissions on all binaries
  3. Installs and configures Ghidra 11.0 DEV
  4. Sets up Java 17 for Ghidra, Java 21 for REA
  5. Configures fontconfig for Ghidra headless mode
  6. Registers Codex/MCP client
  7. Runs doctor verification (10/10 checks)

Output: rea-env.sh environment file, ready-to-use toolchain


8.2 rea6.sh — Unified Launcher

Usage: bash scripts/rea6.sh <command> [args]

Purpose: Single entry point for all REA v6 functionality. Chains REA + Ghidra + rizin + extras.

Commands: See section 7 for complete command reference.


8.3 ghidra-decompile.sh — Ghidra Headless Decompiler

Usage: bash scripts/ghidra-decompile.sh <binary> [output.txt] [--timeout SECONDS] [--functions-only]

Purpose: Decompile native binaries to C pseudocode using Ghidra 11.0 DEV headless mode.

Features:

  • Automatic fallback to rizin if Ghidra is unavailable
  • Configurable timeout (default 300 seconds)
  • Functions-only mode for faster extraction
  • Detailed progress logging

Example:

bash scripts/ghidra-decompile.sh libfoo.so ./output.txt
bash scripts/ghidra-decompile.sh libfoo.so ./output.txt --timeout 600
bash scripts/ghidra-decompile.sh libfoo.so ./output.txt --functions-only

Output: C pseudocode for each decompiled function, separated by ===== function_name @ address ===== markers.


8.4 native-analysis.sh — Native Analysis Pipeline

Usage: bash scripts/native-analysis.sh <binary_or_apk> [output_dir]

Purpose: Chain Ghidra decompilation with rizin disassembly for comprehensive native code analysis.

Features:

  • Automatic APK detection and native library extraction
  • Ghidra decompilation with rizin fallback
  • Rizin standalone summary (exports, imports, functions)
  • Per-library analysis for multi-library APKs

Example:

bash scripts/native-analysis.sh libfoo.so ./native_output
bash scripts/native-analysis.sh app.apk ./apk_native_output

8.5 full-analysis.sh — Full Multi-Engine Analysis

Usage: bash scripts/bin/full-analysis.sh <apk_or_binary> [output_dir] (also bash scripts/full-analysis.sh)

Purpose: Complete analysis pipeline: REA identify + security analysis + native analysis (Ghidra + rizin) + summary.

Stages:

  1. REA Identify — package, version, SDK, classes, resources
  2. Security Analysis — lib-detect, secret-scan, manifest-check
  3. Native Analysis — Ghidra decompilation + rizin
  4. Summary Report — decompiled file count, native lib count

Example:

bash scripts/bin/full-analysis.sh app.apk ./full_output
bash scripts/bin/full-analysis.sh libfoo.so ./native_output

8.6 triage.py — Automated Triage

Usage: python3 triage.py <apk_or_binary> [output_dir]

Purpose: Automated triage with prioritized findings. Combines REA identify, lib-detect, secret-scan, manifest-check, arch-map, Ghidra decompile (if native), rizin trace, and ranks findings by severity.

Output: Prioritized list of findings with severity scores.


8.7 crypto-extract.py — Crypto/Secret Extraction

Usage: python3 crypto-extract.py <decompiled.txt>

Purpose: Extract cryptographic keys, secrets, and hardcoded credentials from decompiled native code. Includes false-positive filtering with confidence scoring.

Output: List of extracted keys/secrets with confidence scores and locations.


8.8 vuln-scan.py — Vulnerability Pattern Scanner

Usage: python3 vuln-scan.py <file_or_dir>

Purpose: Scan code for 40+ vulnerability patterns including insecure crypto, hardcoded secrets, improper certificate validation, SQL injection, command injection, path traversal, and more.

Output: List of vulnerabilities with file locations, line numbers, and severity.


8.9 callgraph.py — Interactive HTML Call Graph

Usage: python3 callgraph.py <decompiled.txt>

Purpose: Generate interactive HTML call graph visualization from decompiled code.

Output: HTML file with interactive function call graph.


8.10 binary-diff.sh — Binary/APK Diff Analysis

Usage: bash binary-diff.sh <file1> <file2>

Purpose: Compare two binaries or APKs and report differences in functions, strings, resources, and structure.

Output: Diff report showing added, removed, and modified elements.


8.11 batch-analyze.sh — Batch Analysis

Usage: bash batch-analyze.sh <dir> [outdir]

Purpose: Parallel batch analysis of multiple targets. Useful for analyzing large numbers of APKs or binaries.

Example:

bash batch-analyze.sh ./apks/ ./batch_output

8.12 jni-bridge.py — JNI Bridge Reconstruction

Usage: python3 jni-bridge.py <apk> [output.json]

Purpose: Map Java native method declarations to their corresponding native function implementations in .so files.

Output: JSON file mapping Java methods to native functions.


8.13 symbol-recovery.py — Symbol Recovery

Usage: python3 symbol-recovery.py <decompiled.txt>

Purpose: Recover function names from stripped binaries using pattern matching and heuristic analysis.

Output: List of recovered symbol names with confidence scores.


8.14 evidence-report.py — HTML Evidence Report

Usage: python3 scripts/evidence-report.py <output_dir>

Purpose: Combined HTML evidence report generator. Merges findings from all analysis engines into a single HTML report.

Output: HTML file with combined evidence from all analysis engines.


8.15 analysis-cache.py — Analysis Cache

Usage: python3 scripts/analysis-cache.py <check\|store\|get\|list\|clean\|stats>

Purpose: Skip re-analysis of unchanged files by caching results with content hashes.

Subcommands:

  • check — Check if cached result exists
  • store — Store analysis result in cache
  • get — Retrieve cached result
  • list — List all cached entries
  • clean — Clean cache
  • stats — Show cache statistics

8.16 rea-clean.sh — Cleanup Tool

Usage: bash scripts/rea-clean.sh [--list\|--scratch\|--logs\|--ghidra-cache\|--all] [--dry-run] [--yes]

Purpose: Manage scratch storage, free space safely.

Safety: Deletion requires --yes flag. Without it, only shows what would be deleted. Use --dry-run for explicit preview.

Options:

  • --list — Show cleanable items with sizes
  • --scratch — Clean scratch temp (keep rea_port + ghidra)
  • --logs — Clean background logs + analysis output
  • --ghidra-cache — Clean Ghidra temp/cache
  • --all — Clean everything safe
  • --dry-run — Preview without deleting
  • --yes — Confirm deletion

8.17 rea-tui.py — Interactive Terminal UI

Usage: python3 rea-tui.py [analysis_dir]

Purpose: Interactive terminal UI for browsing analysis results. Navigate findings without leaving the terminal.


8.18 plugin-runner.py — Plugin System

Usage: python3 plugin-runner.py <name> <target>

Purpose: Load and execute community-contributed plugins.


8.19 example-plugin.py — Example Plugin

Usage: python3 example-plugin.py

Purpose: Example plugin template for developing custom REA plugins.


8.20 remote-analyze.sh — Remote Analysis Bridge

Usage: bash remote-analyze.sh <file> <host> [port]

Purpose: Send analysis targets to a remote REA instance for processing.


8.21 verify-env.sh — Environment Verification

Usage: bash verify-env.sh

Purpose: Environment verification with 19 checks. Desktop/CI compatible (skips Shizuku on non-Android).


8.22 verify-counts.sh — Tool Count Verification

Usage: bash verify-counts.sh

Purpose: Extract counts from tools and verify README numbers match (155 CLI, 43 extras, 207 MCP).


8.23 mcp-v6-server.cjs — Unified MCP Server

Usage: node mcp-v6-server.cjs mcp

Purpose: Unified MCP server exposing REA (154 tools) + extras (36 tools) + v6 tools = 263 tools for AI agent integration.


9. Extras Scripts Reference (43 scripts)

The rea-android-ultimate/rea-repo/extras/scripts/ directory contains 43 additional scripts for specialized analysis tasks.

APK Analysis Scripts

Script Purpose
apk-cache.py Hash-based APK result caching
manifest-check.py Check manifest and network security config
rn-extract.sh Extract React Native bundle from APK
flutter-extract.sh Extract Flutter snapshot from APK
room-schema.sh Extract Room/SQLite schemas from APK

Security Analysis Scripts

Script Purpose
secret-scan.py Entropy-based secret scanner
lib-detect.py — Detect third-party SDKs and vulnerable libraries
vuln-scan.py Vulnerability pattern scanner (40+ patterns)
malware-deep.py Deep malware triage for an APK
malware-triage.py Score an APK scan JSON
dead-code.py Detect dead code in applications

Native Analysis Scripts

Script Purpose
rust-decompile.py Decompile Rust binaries
jni-map.py Map Java native methods to exported .so symbols
symbol-notes.py Symbol annotation and notes
native-patch.py Patch bytes/strings in native .so files

System Analysis Scripts

Script Purpose
memory-dump.sh Memory dump analysis
perf-cpu.sh CPU performance analysis
perf-memory.sh Memory performance analysis
perf-startup.sh Startup performance analysis
perf-anr.sh ANR (Application Not Responding) analysis

Network Analysis Scripts

Script Purpose
network-capture.sh Network traffic capture and analysis

Reporting Scripts

Script Purpose
findings-report.py Generate findings report
combine-report.py Combine multiple reports
report-html.py Generate HTML reports
baseline-diff.py Diff two scan JSONs

Utility Scripts

Script Purpose
cfg.sh Control flow graph generation
fetch-tool.sh Fetch external tools
api-surface.py API surface analysis
arch-map.py Architecture mapping
localization-map.py Localization resource mapping
resource-extract.py Resource extraction from APKs
trace-analyze.py Trace analysis
trace-runtime.sh Runtime tracing
ui-mapping.py UI element mapping
version-compare.sh Version comparison
regression-test.sh Regression testing
repack.sh APK repacking
sqlite-extract.py Extract SQLite databases from app data
prefs-extract.py Extract SharedPreferences and keystores

11. Ghidra Integration (Detailed)

REA Android V6 includes Ghidra 11.0 DEV, a native ARM64 decompiler built for Android by the community (based on NSA Ghidra). This is the same Ghidra used by security researchers worldwide, adapted to run natively on Android without emulation.

Capabilities

  • Native ARM64 decompilation — Deep decompilation of .so files to C pseudocode
  • Headless mode — CLI only, no GUI required
  • Custom export script — ExportAllDecompiled.java extracts all decompiled functions to a text file
  • 591+ functions — Verified decompilation of 591 functions from libzip.so on Android
  • ARM64 native — Runs directly on Android ARM64, no Winlator, no emulation
  • JNI posix_spawn bypass — Native decompilation now works on Android via JNI posix_spawn wrapper (libdecompile_jni.so)
  • Windows PE — Full PE (.exe/.dll) decompilation via Ghidra's x86/x64 decompiler (verified: 832 functions from nacre.exe)
  • Apple Mach-O — Full Mach-O decompilation via Ghidra's ARM64/x86 decompiler
  • Multi-architecture — PE, Mach-O, ELF (ARM64/ARM32/x86/x64), firmware analysis

Usage

# Basic decompilation
bash scripts/ghidra-decompile.sh libfoo.so output.txt

# With custom timeout (seconds)
bash scripts/ghidra-decompile.sh libfoo.so output.txt --timeout 600

# Functions-only mode (faster, skips some analysis)
bash scripts/ghidra-decompile.sh libfoo.so output.txt --functions-only

# Via unified launcher
bash scripts/rea6.sh ghidra libfoo.so ./output.txt

Output Format

The output file contains C pseudocode for each decompiled function, separated by markers:

===== function_name @ 0x1234 =====
int function_name(int a, int b) {
    int local_8;
    local_8 = a + b;
    return local_8;
}

===== another_function @ 0x5678 =====
void another_function(void) {
    undefined4 local_10;
    local_10 = 0;
    return;
}

Requirements

Component Version Notes
Java 17 Required by Ghidra 11.0 DEV
libc++_shared.so NDK r30+ Required by Ghidra's decompile binary
libdecompile_jni.so — JNI posix_spawn wrapper for Android (bundled in zip)
fontconfig — Required for headless font rendering
RAM 2 GB+ 4 GB+ recommended
Storage 1.5 GB Ghidra installation size

Android-Specific Notes

Why Ghidra's native decompiler works on Android (now):

Ghidra's DecompileProcess.setup() calls Runtime.exec() which internally calls fork()+execve(). Android's SELinux blocks this for app processes with error=0. The fix uses:

  1. JNI wrapper (libdecompile_jni.so) — Uses posix_spawn() via /system/bin/linker64 to launch the decompiler binary without fork()+execve()
  2. Patched bytecode (DecompileProcess.class) — Replaces Runtime.exec() with DecompileLauncher.start() which calls the JNI launch() function
  3. -Xverify:none flag — Required to skip bytecode verification of the patched class (set automatically by ghidra-decompile.sh)

Environment Variables for Ghidra

export JAVA_HOME=/path/to/java-17-openjdk
export GHIDRA_HOME=/path/to/ghidra_11.0_DEV
export GHIDRA_TMPDIR=/path/to/ghidra/tmp
export GHIDRA_USER_HOME=/path/to/ghidra/home
export FONTCONFIG_FILE=/path/to/fonts.conf
export HOME=/path/to/ghidra/home
export TMPDIR=/path/to/ghidra/tmp
export JAVA_TOOL_OPTIONS="-Djava.awt.headless=true"

Troubleshooting Ghidra

Issue: "bad interpreter: Permission denied"

Cause: Shebang in launch.sh or analyzeHeadless points to a bash path that doesn't exist on this Android build.

Fix: The launch.sh in the extracted Ghidra has been patched to use /data/local/tmp/androidharness/com.androidharness.app/linux/bin/bash instead of the non-existent /data/user/0/... path.

Issue: "Java home not found" or "Unable to prompt user for JDK path"

Cause: Ghidra's LaunchSupport tool tries to interactively ask for JDK path, but there's no TTY in headless mode.

Fix: Set JAVA_HOME environment variable to point to JDK 17 before running Ghidra. The patched launch.sh respects JAVA_HOME if already set.

Issue: "no fontmanager in system library path"

Cause: Java's libfontmanager.so depends on libfreetype.so, which may not be present or may be the wrong version.

Fix: A stub libfreetype.so has been placed in /tmp/. Ensure /tmp is in your LD_LIBRARY_PATH.

Issue: Ghidra decompiler binary fails with "error=0"

Cause: Ghidra's decompile binary requires libc++_shared.so with __ndk1 namespace symbols. The system's libc++.so may not have these symbols.

Fix: The ghidra-decompile.sh script automatically falls back to rizin if Ghidra's decompiler binary cannot run. You will see a message: "Ghidra decompilation failed. Falling back to rizin..."

Issue: Ghidra headless analysis fails during exception handler analysis

Cause: The GccExceptionAnalyzer in Ghidra crashes when trying to load fonts.

Fix: The GccExceptionAnalyzer class has been removed from Base.jar in the extracted Ghidra installation.


12. Rizin Integration (Detailed)

Rizin 0.9.1 is a reverse engineering framework and command-line toolkit. It provides disassembly, debugging, and binary analysis capabilities natively on Android ARM64.

Capabilities

  • ARM64 disassembly — Native ARM64 instruction decoding
  • Function analysis — Function boundary detection and signature recovery
  • Import/export analysis — Dynamic symbol resolution
  • Call graph analysis — Function call relationship mapping
  • Decompilation — Basic C pseudocode generation (via pd command)
  • String analysis — Extract strings from binaries
  • Section analysis — ELF section headers and permissions

Usage

# List exported functions
rizin -q -c "iE" libfoo.so

# List imported functions
rizin -q -c "ii" libfoo.so

# List all functions
rizin -q -c "afl" libfoo.so

# Decompile a specific function
rizin -q -c "pdf @ 0x1234" libfoo.so

# Full analysis with decompilation
rizin -q -c "aaa; pdf" libfoo.so

# Analyze strings
rizin -q -c "izz" libfoo.so

# Analyze sections
rizin -q -c "iS" libfoo.so

Rizin Flags

Flag Meaning
-q Quiet mode (no banner)
-c Execute command
-e Set configuration variable
-A Run all analysis
-AA Run additional experimental analysis
-aaa Run all analysis including experimental

Integration with REA

Rizin is used in:

  • native-analysis.sh — Native analysis pipeline
  • ghidra-decompile.sh — Fallback when Ghidra is unavailable
  • full-analysis.sh — Multi-engine analysis (step 4)
  • triage.py — Automated triage

Example Rizin Session

$ rizin -q -c "iE" libzip.so
nth      paddr      vaddr bind   type size lib name
97       0x0000d304 0x0000d304 GLOBAL FUNC   440     zip_dir_add
98       0x0001be10 0x0001be10 GLOBAL FUNC  1616     zip_source_zip_file_create
99       0x0000fbd8 0x0000fbd8 GLOBAL FUNC    40     zip_error_to_data
...

13. JADX Integration (Detailed)

JADX 0.7.1 is a Dex-to-Java decompiler. It converts APK/DEX files into readable Java source code.

Capabilities

  • APK/DEX decompilation — Convert Android applications to Java source
  • Resource extraction — Extract resources, manifest, and assets
  • Class analysis — 4,850+ classes in typical APKs
  • Headless MCP bridge — Programmatic access via MCP protocol

Usage

# Via REA CLI
node scripts/rea.mjs inspect-android-package app.apk --format json

# Via rea6.sh
bash scripts/rea6.sh identify app.apk

# Direct jadx (if Java is configured)
java -jar /path/to/jadx-headless-mcp-0.7.1-all.jar -d output app.apk

Output

JADX produces:

  • Decompiled Java source code
  • AndroidManifest.xml (decoded)
  • Resources (XML, images, etc.)
  • Class hierarchy
  • Method signatures
  • String references

Integration with REA

JADX is used in:

  • rea inspect-android-package — APK identification and analysis
  • rea6.sh identify — Quick APK identification
  • full-analysis.sh — Multi-engine analysis (step 1)

Example Output

{
  "package": "com.example.app",
  "version_name": "1.0.0",
  "version_code": 1,
  "min_sdk": 21,
  "target_sdk": 33,
  "class_count": 4850,
  "resource_count": 2632,
  "permissions": [
    "android.permission.INTERNET",
    "android.permission.ACCESS_NETWORK_STATE",
    "android.permission.CAMERA"
  ]
}

14. Web Dashboard

REA Android V6 includes a web-based dashboard for visual analysis and result browsing. It runs as a local HTTP server on port 8080.

Step-by-Step: Launch and Use the Dashboard

Step 1: Start the server

node rea-android-ultimate/workbench/server.js

You should see output like:

REA Web Dashboard listening on port 8080

The server stays running in your terminal. Do not close it while using the dashboard.

Step 2: Open the dashboard

Open your device's browser (or any browser on the same network) and navigate to:

http://localhost:8080

If you're accessing from another device on the same Wi-Fi network, use your Android device's IP address instead of localhost:

http://<device-ip>:8080

Step 3: Analyze something first (optional)

The dashboard is most useful after you've run an analysis. If you haven't analyzed anything yet, run:

bash scripts/rea6.sh analyze app.apk ./output

Then refresh the dashboard page. You'll see the analysis results listed there.

What You Can Do in the Dashboard

  • Browse analysis results — See all APK and native binary analyses you've run
  • View evidence bundles — Inspect structured evidence from each analysis
  • View decompiled code — Read C pseudocode from Ghidra/rizin decompilation
  • Generate reports — Create HTML evidence reports from bundled results
  • Run tools — Launch analyses directly from the browser

Stopping the Dashboard

Press Ctrl+C in the terminal where you started the server to stop it.


15. MCP Server

REA Android V6 includes a Model Context Protocol (MCP) server exposing 263 tools for AI agent integration.

Components

Component Count
REA CLI commands 154
Extras scripts 36
V6 standalone tools 20+
Total 263

Usage

node mcp-v6-server.cjs mcp

The server starts and waits for MCP client connections. It communicates over stdio (standard input/output), so it works with any MCP-compatible client.

Connecting an AI Agent

Here is a complete, minimal example using the official MCP Node.js client:

Step 1: Install the MCP client SDK

npm install @modelcontextprotocol/sdk

Step 2: Write the client code

// connect.js
const { Client } = require('@modelcontextprotocol/sdk/client');
const { StdioClientTransport } = require('@modelcontextprotocol/sdk/client/stdio');

async function main() {
  // Connect to the REA MCP server
  const client = new Client({ name: "rea-client", version: "1.0.0" });
  
  await client.connect(new StdioClientTransport({
    command: 'node',
    args: ['<extract-path>/mcp-v6-server.cjs', 'mcp']
  }));

  // List all available tools
  const tools = await client.listTools();
  console.log(`Connected. ${tools.tools.length} tools available.`);
  
  // Show first 10 tool names
  tools.tools.slice(0, 10).forEach(t => console.log(`  - ${t.name}`));
  
  // Call a tool: inspect an APK
  const result = await client.callTool({
    name: 'inspect_android_package',
    arguments: { path: '<extract-path>/app.apk' }
  });
  
  console.log('Analysis result:', JSON.stringify(result, null, 2));
  
  await client.close();
}

main().catch(console.error);

Step 3: Run it

node connect.js

You should see output listing the available tools and the analysis result for your APK.

What Tools Are Available?

The MCP server exposes 263 tools across three categories:

  • REA CLI commands (154): Static analysis, device operations, evidence management
  • Extras scripts (36): Specialized scripts for crypto extraction, vulnerability scanning, call graphing, etc.
  • V6 standalone tools (20+): Ghidra decompilation, rizin analysis, evidence reporting, triage, etc.

Each tool can be called individually via MCP, allowing AI agents to orchestrate complex reverse engineering workflows programmatically.



---

# 16. Native Analysis Pipeline

The native analysis pipeline chains Ghidra decompilation with rizin disassembly for comprehensive native code analysis.

## Usage

```bash
# Analyze a native binary
bash scripts/native-analysis.sh libfoo.so ./output

# Analyze an APK (extracts native libs first)
bash scripts/native-analysis.sh app.apk ./output

Pipeline Stages

  1. APK Detection — If input is an APK, extract native .so libraries
  2. Ghidra Decompilation — Decompile each .so to C pseudocode (with rizin fallback)
  3. Rizin Analysis — Export/import tables, function list, disassembly
  4. Output Generation — Combined decompiled output

Output Structure

output_dir/
├── libfoo.so_decompiled.txt    # Ghidra/rizin decompilation
└── native_libs/                # Extracted .so files (from APK)
    ├── libfoo.so
    └── libbar.so

17. Evidence System

REA Android V6 includes an evidence bundling system that combines findings from all analysis engines into structured, shareable reports.

Usage

# Generate combined HTML evidence report
python3 scripts/evidence-report.py <output_dir>

# Or via rea6.sh
bash scripts/rea6.sh report <output_dir> [--title "My Analysis"]

Evidence Contents

  • APK metadata (package, version, SDK, permissions)
  • Class and resource counts
  • Native function decompilations
  • Vulnerability findings
  • Crypto key extractions
  • Call graph visualizations
  • Binary diff results

Evidence Bundles

Evidence bundles are structured JSON containers that can be:

  • Combined across multiple analysis runs
  • Compared between versions
  • Exported to share with team members
  • Imported for further analysis

18. APK Analysis Workflow

Complete APK Analysis

# 1. Identify the APK
bash scripts/rea6.sh identify app.apk

# 2. Security scan
bash scripts/rea6.sh scan app.apk

# 3. Full analysis
bash scripts/rea6.sh analyze app.apk ./output

# 4. Generate evidence report
python3 scripts/evidence-report.py ./output

# 5. Browse results
node rea-android-ultimate/workbench/server.js

What You Get

  • Package name, version, minSdk, targetSdk
  • Class count (typically 4,000–5,000+)
  • Resource count (typically 2,000–3,000+)
  • Permission analysis
  • Native library analysis (if .so files present)
  • Java/Kotlin decompilation (via JADX)
  • Vulnerability findings
  • Evidence bundle for sharing

19. Native Binary Analysis Workflow

Complete Native Analysis

# 1. Ghidra decompilation
bash scripts/ghidra-decompile.sh libfoo.so ./output

# 2. Rizin analysis
rizin -q -c "aaa; afl" libfoo.so

# 3. Combined pipeline
bash scripts/native-analysis.sh libfoo.so ./output

# 4. Crypto extraction
python3 scripts/crypto-extract.py ./output/libfoo_decompiled.txt

# 5. Vulnerability scan
python3 scripts/vuln-scan.py ./output/libfoo_decompiled.txt

What You Get

  • Function decompilation to C pseudocode
  • Export/import tables
  • Call graph
  • Crypto key extraction
  • Vulnerability findings
  • Symbol recovery (for stripped binaries)

20. Multi-Engine Orchestration

REA Android V6 chains multiple engines for comprehensive analysis:

APK/Native Binary
    │
    ├─ REA CLI ──→ Static analysis, evidence bundling
    ├─ JADX ─────→ Java/Kotlin decompilation
    ├─ Ghidra ───→ Native C pseudocode decompilation
    ├─ Rizin ───→ Native disassembly and analysis
    ├─ apktool ──→ APK decompilation/rebuilding
    ├─ aapt2 ───→ Android resource inspection
    └─ Evidence ──→ Combined HTML reports

Pipeline Stages

  1. Identify — APK/binary identification and metadata extraction
  2. Security — Vulnerability scanning, secret detection, manifest analysis
  3. Native — Ghidra decompilation + rizin disassembly
  4. Evidence — Combined report generation

21. Troubleshooting

This is the most important section of this document. Read it carefully before reporting issues. Most problems have known causes and fixes.

21.1 Java Permission Denied

Symptom: Permission denied when running java -version from shared storage.

storage/emulated/0/Rea V6/rea-android-ultimate/.harness/lib/jvm/java-17-openjdk/bin/java: Permission denied

Root Cause: Android shared storage (/storage/emulated/0/) is mounted with noexec and/or nosuid options. The kernel refuses to execute any binary from this mount, regardless of file permissions. chmod +x does not help because the mount option blocks execution at the kernel level.

Fix: Run sh setup.sh first. Setup copies the toolchain (including Java) from shared storage to scratch at /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/. Scratch storage is exec-capable, so binaries run from there.

Workflow:

# 1. Run setup first (copies tools to exec-capable scratch)
sh setup.sh

# 2. Source the environment from scratch
source /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh

# 3. Now Java works
java -version

Shizuku does NOT fix this. Shizuku runs as UID 2000 but is still subject to the same mount options. The limitation is the filesystem mount, not user permissions.


21.2 Ghidra Decompilation Fails

Symptom: Cannot run program ... decompile: error=0

Root Cause: Ghidra's native decompile binary (Ghidra/Features/Decompiler/os/linux_arm_64/decompile) links against libc++_shared.so with __ndk1 namespace symbols. No available libc++_shared.so on this Android device has the exact symbols required.

Attempted fixes that did NOT work:

  • Bundled libc++_shared.so (1.4 MB, in .harness/lib/) — missing required symbols
  • Downloaded NDK r30 libc++_shared.so (6.7 MB) — missing __ndk1 symbols
  • System /system/lib64/libc++.so (NDK r27-beta1) — missing __ndk1 symbols
  • System /system/priv-app/LavaCare/lib/arm64/libc++_shared.so (2009 build) — missing symbols

Workaround: The ghidra-decompile.sh script automatically falls back to rizin when Ghidra's decompiler binary cannot run. You will see:

⚠️  Ghidra decompilation failed.
     Reason: ERROR ... Cannot run program ... decompile: error=0
     Falling back to rizin...
✅ Rizin fallback complete

Rizin provides equivalent native decompilation capability (disassembly, function analysis, pseudocode via pd command).

Permanent Fix Required: Obtain a libc++_shared.so built with the exact NDK version that compiled Ghidra's decompile binary. Place it in /tmp/ or set LD_LIBRARY_PATH to its directory before running Ghidra.


21.3 Ghidra: "bad interpreter: Permission denied"

Symptom: /data/user/0/com.androidharness.app/files/linux/bin/bash: Permission denied

Root Cause: Ghidra's launch.sh and analyzeHeadless have shebangs pointing to /data/user/0/com.androidharness.app/files/linux/bin/bash, which doesn't exist or isn't accessible on this build.

Fix: The launch.sh has been patched to use /data/local/tmp/androidharness/com.androidharness.app/linux/bin/bash instead. If you're using a fresh extraction, patch it manually:

sed -i 's|#!/data/user/0/.*/bin/bash|#!/data/local/tmp/androidharness/com.androidharness.app/linux/bin/bash|' \
  /path/to/ghidra_11.0_DEV/support/launch.sh

21.4 Ghidra: "Unable to prompt user for JDK path, no TTY detected"

Symptom: Ghidra fails with "Unable to prompt user for JDK path, no TTY detected."

Root Cause: Ghidra's LaunchSupport tool tries to interactively ask which JDK to use, but there's no TTY in headless/server mode.

Fix: Set JAVA_HOME to JDK 17 before running Ghidra:

export JAVA_HOME=/data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/.harness/lib/jvm/java-17-openjdk
export PATH="$JAVA_HOME/bin:$PATH"

Also set java_home.save:

echo "/data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/.harness/lib/jvm/java-17-openjdk" > \
  /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/ghidra/home/.ghidra/.ghidra_11.0_DEV/java_home.save

The patched launch.sh respects JAVA_HOME if already set.


21.5 Ghidra: "no fontmanager in system library path"

Symptom: dlopen failed: library "libfontmanager.so" not found

Root Cause: Java's libfontmanager.so depends on libfreetype.so, which may not be present.

Fix: A stub libfreetype.so has been placed in /tmp/. Ensure /tmp is in LD_LIBRARY_PATH:

export LD_LIBRARY_PATH="/tmp:$LD_LIBRARY_PATH"

21.6 Ghidra: "cannot locate symbol FT_Init_FreeType"

Symptom: dlopen failed: cannot locate symbol "FT_Init_FreeType"

Root Cause: The stub libfreetype.so doesn't export the full symbol set that libfontmanager.so expects.

Fix: Use a more complete libc++_shared.so or libfreetype.so from a matching NDK build. This is a known limitation — see the Ghidra section above.


21.7 JADX Not Found

Symptom: jadx: command not found

Root Cause: JADX is distributed as a JAR file (jadx-headless-mcp-0.7.1-all.jar), not a standalone executable.

Fix: Use REA's wrapper instead:

node scripts/rea.mjs inspect-android-package app.apk --format json

Or run JADX directly:

java -jar /data/local/tmp/.../rea_port/.harness/jadx/lib/jadx-headless-mcp-0.7.1-all.jar

21.8 Hardcoded V5 Paths

Symptom: Scripts fail because they reference /storage/emulated/0/Rea V5/ which doesn't exist.

Root Cause: Some scripts were not updated when moving from V5 workspace to V6 workspace.

Fix: All hardcoded V5 paths have been replaced with V6 paths in:

  • rea6.sh, rea-clean.sh, verify-counts.sh, triage.py, jni-bridge.py, full-analysis.sh
  • bin/full-analysis.sh, bin/ghidra-decompile
  • README.md

If you moved the workspace to a different path, update paths accordingly.


21.9 Setup.sh References V5 in Comments

Symptom: setup.sh header says "REA Android Ultimate v5" and references rea-android-ultimate-v5.zip.

Root Cause: The setup script inside rea-android-ultimate/setup.sh still has v5 branding.

Fix: Updated to "REA Android Ultimate v6" and Rea-Android-V6.zip. If you extracted from a different filename, adjust accordingly.


21.10 Storage Nearly Full

Symptom: "No space left on device" or extraction fails midway.

Root Cause: The archive expands to ~2.5 GB. Shared storage may not have enough free space.

Fix: Ensure at least 5 GB free space. Check with:

df -h /storage/emulated/0/

21.11 Python Scripts Not Executable

Symptom: Permission denied when running ./triage.py directly.

Root Cause: Python scripts in extras/scripts/ are 644 (rw-rw----), not executable.

Fix: Run with python3 explicitly:

python3 triage.py <apk> [output_dir]

Or make executable:

chmod +x rea-android-ultimate/rea-repo/extras/scripts/*.py

21.12 Ghidra analyzeHeadless: "User home directory does not exist"

Symptom: User home directory does not exist: /data/data/com.termux/files/home

Root Cause: Ghidra expects a Termux home directory that doesn't exist on this AndroidHarness environment.

Fix: Set HOME environment variable:

export HOME=/data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/ghidra/home

22. Doctor Checks Reference

rea doctor runs 10 checks on your environment. Each check reports PASS or FAIL with a remediation hint if something is wrong.

Check What It Verifies Failure Means
node Node.js runtime is available REA CLI cannot run without Node.js
host Android ARM64 host detected REA is designed for Android ARM64
android-termux-exec-interceptor Termux exec interceptor library present Native binary execution may fail
android-writable-temp Writable temp directory exists Temp file operations will fail
android-java-runtime Java 17+ runtime available Ghidra and APK toolchain need Java
android-apk-toolchain apktool, aapt2, jadx available APK analysis tools missing
android-rizin rizin native decompiler available Native binary analysis unavailable
android-ghidra Ghidra 11.0 DEV headless decompiler available Native C pseudocode decompilation unavailable; falls back to rizin
android-shizuku Shizuku service reachable via rish Privileged device commands unavailable
jadx JADX headless MCP bridge JAR valid Java/Kotlin APK decompilation unavailable

Running the Doctor

cd rea-android-ultimate/rea-repo
node scripts/rea.mjs doctor --format json

Or in plain text:

node scripts/rea.mjs doctor

A healthy result shows healthy: true with all checks passing. If any check fails, follow the remediation hint in the output.


23. Common Issues and Fixes

Quick Reference Table

Issue Symptom Fix
Java permission denied Permission denied running java Run sh setup.sh first, source rea-env.sh
Ghidra decompile fails Cannot run program ... decompile Falls back to rizin automatically
Ghidra bad interpreter bad interpreter: Permission denied Patch launch.sh shebang
Ghidra JDK prompt Unable to prompt user for JDK path Set JAVA_HOME to JDK 17
Ghidra fontmanager no fontmanager in system library path Set LD_LIBRARY_PATH=/tmp
JADX not found jadx: command not found Use rea inspect-android-package or java -jar
V5 paths Scripts reference wrong path All paths updated to V6
Storage full No space left on device Free 5+ GB space
Python scripts not exec Permission denied on ./script.py Use python3 script.py
Ghidra home dir User home directory does not exist Set HOME env var

Decision Tree for Analysis Failures

Start: Analysis fails
    │
    ├─ Is it a Java error? ──→ Run setup.sh, source rea-env.sh
    │
    ├─ Is it Ghidra? ──→ Is it decompile binary?
    │                   │   ├─ Yes ──→ Rizin fallback (automatic)
    │                   │   └─ No ──→ Check Java version, fonts, paths
    │
    ├─ Is it JADX? ──→ Use rea inspect-android-package
    │
    ├─ Is it path-related? ──→ Check for V5 paths, update to V6
    │
    └─ Is it storage? ──→ Free 5+ GB space

23. Advanced Configuration

Custom Java Paths

export JAVA_HOME=/custom/path/to/java-17
export PATH="$JAVA_HOME/bin:$PATH"

Custom Ghidra Path

export GHIDRA_HOME=/custom/path/to/ghidra_11.0_DEV

Custom Temp Directory

export TMPDIR=/custom/tmp
export JAVA_TOOL_OPTIONS="-Djava.io.tmpdir=$TMPDIR"

Disabling Shizuku (if not needed)

Most static analysis works without Shizuku. Only device operations (packages, logcat, screenshots) require it. If you don't need device access, you can ignore Shizuku-related messages.

Increasing Java Heap for Large APKs

export REA_JADX_HEAP_MIB=2048

Or set in JAVA_TOOL_OPTIONS:

export JAVA_TOOL_OPTIONS="-Xmx2048m -Djava.awt.headless=true"

24. Security and Offline Operation

Offline-First Design

REA Android V6 is designed to work completely offline:

  • All tools, libraries, JDKs, and native binaries are bundled
  • No internet connection required after initial setup
  • No telemetry, no phone-home, no external API calls
  • All analysis happens locally on the device

Security Considerations

  • No root required for most operations
  • Shizuku optional — Only needed for privileged device commands (packages, logcat, screenshots, app management)
  • Local analysis only — APKs and binaries are analyzed locally, never uploaded
  • Evidence bundles — Can be exported and shared without revealing source APKs

Storage Management

Use scripts/rea-clean.sh to manage scratch storage:

# List cleanable items
bash scripts/rea-clean.sh --list

# Clean everything safe
bash scripts/rea-clean.sh --all --yes

# Dry-run first
bash scripts/rea-clean.sh --all --dry-run

25. License

REA Android V6 combines multiple open-source projects, each with its own license:

Component License
REA Core MIT
Ghidra Apache 2.0
rizin LGPL-3.0
jadx Apache 2.0
apktool Apache 2.0
aapt2 Apache 2.0 (Android SDK)
REA Android V6 tools MIT

Each tool retains its own license. See individual project licenses for details.

REA is not affiliated with or endorsed by the NSA, Google, or any device manufacturer.


Appendix A: Command Quick Reference (Corrected Paths)

Most Common Commands

# Setup
sh setup.sh
source /data/local/tmp/.../rea_port/rea-env.sh

# Verify
node scripts/rea.mjs doctor --format json

# APK Analysis
bash scripts/rea6.sh triage app.apk ./output
bash scripts/rea6.sh analyze app.apk ./output

# Native Analysis
bash scripts/ghidra-decompile.sh libfoo.so ./output.txt
bash scripts/native-analysis.sh libfoo.so ./output

# Web Dashboard
node rea-android-ultimate/workbench/server.js

# Evidence Report
python3 scripts/evidence-report.py ./output

# Cleanup
bash scripts/rea-clean.sh --all --yes

Appendix B: File Locations (Corrected for Actual Structure)

Item Path
Workspace root <extract-path>/ (wherever you unzipped)
REA core <extract-path>/rea-android-ultimate/rea-repo/
Toolchain <extract-path>/rea-android-ultimate/.harness/
Setup script (root) <extract-path>/setup.sh
Setup script (full) <extract-path>/scripts/setup.sh
Unified launcher <extract-path>/scripts/rea6.sh
Ghidra decompile <extract-path>/scripts/ghidra-decompile.sh
Native analysis <extract-path>/scripts/native-analysis.sh
Full analysis <extract-path>/scripts/bin/full-analysis.sh (also scripts/full-analysis.sh)
Ghidra tarball <extract-path>/ghidra/ghidra-arm64.tar.gz
Environment /data/local/tmp/.../rea_port/rea-env.sh
Scratch directory /data/local/tmp/.../rea_port/
Ghidra installation /data/local/tmp/.../rea_port/ghidra/ghidra_11.0_DEV/
Extras scripts <extract-path>/rea-android-ultimate/rea-repo/extras/scripts/

Appendix C: Environment Variables

Variable Description Default
JAVA_HOME Java runtime path JDK 17
GHIDRA_HOME Ghidra installation path Scratch/ghidra/ghidra_11.0_DEV
GHIDRA_TMPDIR Ghidra temp directory Scratch/ghidra/tmp
GHIDRA_USER_HOME Ghidra user home Scratch/ghidra/home
FONTCONFIG_FILE Fontconfig configuration Scratch/ghidra/fontconfig/fonts.conf
REA_TMP REA temporary directory /tmp/rea_port
REA_JAVA_HOME REA Java home JDK 17
REA_JAVA_17_HOME REA Java 17 home JDK 17

Appendix D: Tool Count Summary (Actual)

Category Count Location
CLI commands 155 rea-android-ultimate/rea-repo/
MCP tools 207 rea-android-ultimate/rea-repo/
MCP prompts 6 rea-android-ultimate/rea-repo/
Standalone tools 23 scripts/
Extras scripts 43 rea-android-ultimate/rea-repo/extras/scripts/
MCP server tools 263 mcp-v6-server.cjs

Appendix E: Version History

REA Android V6 — First public release (November 2026)

  • Built on top of "Rea Original" by morluto
  • Versions V1–V5 were private releases, not publicly available
  • V6 adds: Ghidra 11.0 DEV, unified launcher, 20+ standalone tools, web dashboard, MCP server, evidence system

REA Android V6 — Reverse Engineer Anything — Android Edition

Built on top of "Rea Original" by morluto. V6 is the first public release. Versions V1–V5 were private and are not publicly available.

30. Deep Dive: REA Core Engine Architecture

Overview

The REA core engine (rea-android-ultimate/rea-repo/) is a Node.js-based static analysis platform. It is designed to be modular, extensible, and MCP-native.

Directory Structure

rea-repo/
├── src/                    # TypeScript source code
│   ├── application/        # Application-layer services
│   ├── domain/             # Domain logic and analysis
│   ├── contracts/          # Tool and port contracts
│   ├── composition/        # Multi-engine orchestration
│   └── application/        # HTTP/API layer
├── dist/                   # Compiled JavaScript output
├── tests/                  # Test suites
│   ├── acceptance/         # Acceptance tests
│   ├── boundary/           # Boundary tests
│   ├── conformance/        # Conformance tests
│   ├── composition/        # Composition tests
│   └── evaluation/         # Evaluation tests
├── scripts/                # CLI scripts
│   └── rea.mjs             # Main CLI entry point
├── extras/scripts/         # Additional analysis scripts
├── workbench/              # Web dashboard
├── skills/                 # AI agent skills
├── package.json            # Node.js package manifest
└── tsconfig.json           # TypeScript configuration

Source Code Layout

src/application/

Application-layer services that coordinate between domain logic and external tools:

  • AndroidApplicationService.js — Android APK analysis
  • JavaScriptApplicationService.js — JavaScript/Electron analysis
  • NativeApplicationService.js — Native binary analysis
  • ProcessApplicationService.js — Process capture analysis
  • BrowserApplicationService.js — Web capture analysis

src/domain/

Domain logic — pure analysis logic without external dependencies:

  • javascriptSemanticAnalysis.ts — JavaScript semantic graph
  • nativeInspection.ts — Native binary inspection
  • functionComparisonNormalization.ts — Function comparison
  • webScriptArtifacts.ts — Web script artifact extraction

src/contracts/

Tool and port contracts — defines interfaces for external tool integration:

  • functionWorkflowToolContracts.ts — Function analysis contracts
  • javascriptToolContracts.ts — JavaScript analysis contracts
  • nativeToolContracts.ts — Native analysis contracts
  • wasmToolContracts.ts — WebAssembly analysis contracts

src/composition/

Multi-engine orchestration — chains multiple engines together:

  • apktool.ts — APK tool integration
  • javascriptRuntimeObservation.js — JavaScript runtime observation
  • reverseEngineeringCompositionEdgeCases.ts — Edge case handling

31. Deep Dive: Evidence System

What Is Evidence?

Evidence is structured data captured during analysis. Each piece of evidence includes:

  • Subject — What was analyzed (file, APK, binary)
  • Provider — Which engine produced the evidence (jadx, ghidra, rizin, etc.)
  • Operation — What operation was performed (inspect, decompile, scan)
  • Raw result — Raw output from the tool
  • Confidence — Confidence level (observed, asserted, etc.)
  • Authority — Source of the evidence (shipped-artifact, analyzed, etc.)
  • Limitations — Known limitations of the evidence

Evidence Bundle Format

An evidence bundle is a JSON file containing:

{
  "evidence_id": "ev_abc123",
  "subject": {
    "name": "app.apk",
    "digest": {
      "sha256": "a0af64ba...",
      "local_path": "/tmp/app.apk",
      "format": "apk",
      "architecture": null
    },
    "provider": {
      "id": "jadx",
      "name": "JADX headless",
      "version": "0.7.1"
    },
    "analysis_profile": null,
    "predicate_type": "rea.analysis",
    "operation": "inspect_android_package",
    "parameters": { "path": "/tmp/app.apk" },
    "raw_result": { ... },
    "confidence": "observed",
    "authority": "shipped-artifact",
    "environment": null,
    "limitations": [...],
    "relationship_coverage": null,
    "locations": [
      { "kind": "artifact-path", "path": "AndroidManifest.xml" }
    ],
    "evidence_links": []
  }
}

Evidence Operations

Operation Description
inspect_android_package Analyze APK structure
inspect_native_load_image Verify native binary
inspect_native_api Reconstruct native API
inspect_native_instruction Inspect native instruction
trace Trace features through references
xref List cross-references
diff Compare two bundles
compare Compare analysis results

Evidence Commands

# Create evidence bundle
node scripts/rea.mjs inspect-android-package app.apk --format json

# Compare two bundles
node scripts/rea.mjs compare bundle1.json bundle2.json

# Export evidence
node scripts/rea.mjs evidence-export <bundle> <output>

# Import evidence
node scripts/rea.mjs evidence-import <bundle>

32. Deep Dive: MCP Server

What Is MCP?

Model Context Protocol (MCP) is a standard for connecting AI assistants to tools and data sources. REA Android V6 includes an MCP server that exposes all 263 tools as MCP resources.

MCP Server Architecture

mcp-v6-server.cjs
├── REA CLI commands (154 tools)
├── Extras scripts (36 tools)
├── V6 standalone tools (20+ tools)
└── Total: 263 tools

MCP Server Structure

const TOOLS = [
  // Extras scripts (36)
  { name: 'smali_patch', script: 'smali-patch.sh', dir: EXTRAS },
  { name: 'jni_map', script: 'jni-map.py', dir: EXTRAS },
  { name: 'sqlite_extract', script: 'sqlite-extract.py', dir: EXTRAS },
  // ... 33 more
  
  // V6 standalone tools (20+)
  { name: 'triage', script: 'triage.py' },
  { name: 'crypto', script: 'crypto-extract.py' },
  { name: 'vuln-scan', script: 'vuln-scan.py' },
  // ... 17 more
  
  // REA CLI commands (154)
  { name: 'inspect-android-package', command: 'rea inspect-android-package' },
  { name: 'analyze', command: 'rea analyze' },
  // ... 152 more
];

Using MCP with AI Agents

const { Client } = require('@modelcontextprotocol/sdk/client');
const { StdioClientTransport } = require('@modelcontextprotocol/sdk/client/stdio');

const client = new Client({ name: "test-client", version: "1.0.0" });
await client.connect(new StdioClientTransport({
  command: 'node',
  args: ['mcp-v6-server.cjs', 'mcp']
}));

// List all available tools
const tools = await client.listTools();
console.log(`Available tools: ${tools.tools.length}`);

// Call a tool
const result = await client.callTool({
  name: 'inspect_android_package',
  arguments: { path: '/path/to/app.apk' }
});
console.log(result);

33. Deep Dive: Web Dashboard

Overview

The web dashboard (workbench/) provides a browser-based interface for visual analysis and result browsing.

Architecture

workbench/
├── server.js          # Express/Node.js server
├── public/            # Static frontend files
│   ├── index.html     # Main HTML entry
│   ├── css/           # Stylesheets
│   ├── js/            # JavaScript frontend
│   └── assets/        # Images, icons
└── README.md          # Dashboard documentation

Usage

# Start the server
node rea-android-ultimate/workbench/server.js

# Access from browser
# http://localhost:8080
# http://<device-ip>:8080 (from other devices on network)

Features

  • Visual analysis results
  • Evidence bundle browsing
  • APK inspection
  • Native binary analysis
  • Report generation
  • Tool execution from browser

34. Deep Dive: Standalone Tools

triage.py — Detailed

Purpose: Automated triage with prioritized findings.

Input: APK or binary file

Output: Prioritized findings with severity scores

Internal Steps:

  1. Run rea inspect-android-package for APK metadata
  2. Run lib-detect.py for library detection
  3. Run secret-scan.py for secret scanning
  4. Run manifest-check.py for manifest analysis
  5. Run arch-map.py for architecture mapping
  6. Run Ghidra decompilation (if native binary)
  7. Run rizin trace
  8. Rank findings by severity

Example Output:

=== Triage Results: app.apk ===
Total findings: 23
Critical: 3
High: 5
Medium: 8
Low: 7

[CRITICAL] Hardcoded API key in com.example.app.MainActivity
[CRITICAL] Insecure SSL/TLS configuration
[CRITICAL] Native library without RELRO
...

crypto-extract.py — Detailed

Purpose: Extract cryptographic keys and secrets from decompiled native code.

Input: Decompiled C pseudocode (from Ghidra or rizin)

Output: List of extracted keys/secrets with confidence scores

Detection Patterns:

  • AES keys (16, 24, 32 byte hex strings)
  • RSA keys (PEM format)
  • HMAC keys
  • API keys (pattern-based)
  • Password strings
  • Encryption salts

Confidence Scoring:

  • High: Exact pattern match with context
  • Medium: Pattern match without context
  • Low: Heuristic match

35. Deep Dive: Native Analysis Pipeline

Pipeline Architecture

Input (APK or .so)
    │
    ├─ Is APK? ──→ Extract .so files from lib/arm64-v8a/
    │
    ├─ For each .so:
    │   ├─ Ghidra decompile ──→ C pseudocode
    │   ├─ Rizin analyze ────→ Disassembly, exports, imports
    │   └─ Merge results ────→ Combined output
    │
    └─ Output: Decompiled code + analysis

Native Analysis Output Example

=== Native Analysis: libzip.so ===
Direct binary analysis: libzip.so

--- Ghidra Decompilation ---
===== zip_add @ 0x0000b49c =====
int zip_add(zip_t *za, const char *name, const void *data, zip_uint64_t size) {
    // Decompiled C code here
}

===== zip_close @ 0x0000c038 =====
int zip_close(zip_t *za) {
    // Decompiled C code here
}

--- Rizin Exports ---
97       0x0000d304  GLOBAL FUNC   440     zip_dir_add
98       0x0001be10  GLOBAL FUNC  1616     zip_source_zip_file_create
...

--- Rizin Imports ---
 1       0x00020010  GLOBAL FUNC       __cxa_finalize
 2       0x00020020  GLOBAL FUNC       __cxa_atexit
 3       0x00020030  GLOBAL FUNC       __register_atfork
...

36. Deep Dive: Multi-Engine Orchestration

Architecture

REA Android V6 chains multiple engines for comprehensive analysis:

Input File
    │
    ├─ REA Core ──→ Static analysis (APK/DEX/native/web/etc.)
    │
    ├─ JADX ─────→ Java/Kotlin source decompilation
    │
    ├─ Ghidra ───→ Native C pseudocode decompilation
    │
    ├─ Rizin ───→ Native disassembly and analysis
    │
    ├─ apktool ──→ APK decompilation and resource extraction
    │
    ├─ aapt2 ───→ Android resource compilation/inspection
    │
    └─ Evidence ──→ Combined structured report

Pipeline Execution Order

  1. Identify — Determine file type, package, version, architecture
  2. Static Analyze — Run REA core analysis on the file
  3. Java Decompile — If APK/DEX, run JADX for Java source
  4. Native Decompile — If native binary, run Ghidra + rizin
  5. Resource Extract — Extract resources, manifest, assets
  6. Vulnerability Scan — Scan decompiled code for vulnerabilities
  7. Secret Scan — Scan for hardcoded keys, passwords, tokens
  8. Evidence Bundle — Combine all results into evidence bundle
  9. HTML Report — Generate human-readable report

Example: Full APK Analysis Pipeline

Input: com.example.app.apk (20 MB)

Step 1: REA Identify
  → Package: com.example.app
  → Version: 1.0.0 (code 1)
  → minSdk: 21, targetSdk: 33
  → Classes: 4,850
  → Resources: 2,632

Step 2: JADX Decompile
  → Java source: 4,850 classes
  → Manifest: AndroidManifest.xml
  → Resources: 2,632 items

Step 3: Native Analysis (if .so files present)
  → libfoo.so: Ghidra decompile + rizin analyze
  → libbar.so: Ghidra decompile + rizin analyze

Step 4: Security Scan
  → lib-detect: 3 SDKs detected
  → secret-scan: 2 potential secrets
  → manifest-check: 1 warning

Step 5: Evidence Bundle
  → Combined JSON with all results

Step 6: HTML Report
  → Human-readable report

37. Advanced Configuration

Environment Variables Reference

Variable Description Example
JAVA_HOME Java runtime for Ghidra /tmp/rea_port/.harness/lib/jvm/java-17-openjdk
GHIDRA_HOME Ghidra installation /tmp/rea_port/ghidra/ghidra_11.0_DEV
GHIDRA_TMPDIR Ghidra temp dir /tmp/rea_port/ghidra/tmp
GHIDRA_USER_HOME Ghidra user home /tmp/rea_port/ghidra/home
FONTCONFIG_FILE Fontconfig file /tmp/rea_port/ghidra/fontconfig/fonts.conf
REA_TMP REA temp dir /tmp/rea_port
TMPDIR System temp dir /tmp/rea_port/tmp
LD_LIBRARY_PATH Native library path /tmp:$JAVA_HOME/lib:$SYS_LIB
PATH Executable search path Includes .harness/bin

Customizing Java Heap Size

For large APKs, increase Java heap:

export JAVA_TOOL_OPTIONS="-Xmx2048m -Djava.awt.headless=true"

Or set REA-specific heap:

export REA_JADX_HEAP_MIB=2048

Customizing Ghidra Memory

export GHIDRA_MAXMEM=2G
export GHIDRA_HEADLESS_MAXMEM=2G

Custom Fonts for Ghidra

Edit ghidra/fontconfig/fonts.conf:

<fontconfig>
  <dir>/system/fonts</dir>
  <dir>/data/local/tmp/androidharness/com.androidharness.app/linux/share/fonts/TTF</dir>
  <cachedir>/data/local/tmp/androidharness-scratch/ghidra/fontcache</cachedir>
</fontconfig>

Add custom font directories as needed.


38. Security and Offline Operation

Offline-First Design

REA Android V6 is designed to work completely offline:

  • All tools bundled — JDK, rizin, aapt2, apktool, jadx, Ghidra
  • No internet required after initial setup
  • No telemetry — No data sent to external servers
  • No API keys required — No external services needed
  • Local analysis only — Files analyzed on-device

Security Model

Threat Model

  • Attacker provides malicious APK — Analyzed statically, never executed
  • Attacker tampers with evidence — Evidence bundles can be verified by hash
  • Attacker intercepts output — Output stays on device, not transmitted

Security Properties

  • No root required for static analysis
  • Shizuku optional — Only for device management commands
  • Sandboxed — Analysis runs in user space, no system modification
  • No network — No outbound connections during analysis

Evidence Integrity

Evidence bundles include SHA-256 digests of analyzed files, ensuring integrity verification:

"digest": {
  "sha256": "a0af64bae8b539bf95bb6220284c3cd0107aec53037b19cdb8dd42e94360bfa7",
  "local_path": "/tmp/app.apk"
}

25. License

REA Android V6 combines multiple open-source projects, each with its own license:

Component License Source
REA Core MIT https://github.com/morluto/rea
Ghidra Apache 2.0 https://github.com/NationalSecurityAgency/ghidra
Ghidra ARM64 Build Apache-2.0 https://github.com/dsgou66/ghidra-termux-arm64
rizin LGPL-3.0 https://github.com/rizinorg/rizin
jadx Apache 2.0 https://github.com/skylot/jadx
apktool Apache 2.0 https://github.com/iBotPeaches/Apktool
aapt2 Apache 2.0 (Android SDK) Android SDK
Node.js OpenJS Foundation https://nodejs.org
Python 3 PSF License https://python.org

REA Android V6 Additions

REA Android V6 additions (standalone tools, scripts, wrappers, setup scripts) are MIT licensed.

Third-Party Notices

Full third-party notices: rea-android-ultimate/rea-repo/THIRD_PARTY_NOTICES.md
npm dependency inventory: rea-android-ultimate/rea-repo/licenses/

REA is not affiliated with or endorsed by the NSA, Google, or any device manufacturer.


Appendix A: Command Quick Reference (Corrected Paths)

Most Common Commands

# Setup
sh setup.sh
source /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh

# Verify
node scripts/rea.mjs doctor --format json

# APK Analysis
bash scripts/rea6.sh triage app.apk ./output
bash scripts/rea6.sh analyze app.apk ./output
bash scripts/rea6.sh identify app.apk
bash scripts/rea6.sh scan app.apk

# Native Analysis
bash scripts/ghidra-decompile.sh libfoo.so ./output.txt
bash scripts/native-analysis.sh libfoo.so ./output
bash scripts/rea6.sh native-analyze libfoo.so ./output

# Web Dashboard
node rea-android-ultimate/workbench/server.js

# Evidence Report
python3 scripts/evidence-report.py ./output
bash scripts/rea6.sh report ./output --title "My Analysis"

# Cleanup
bash scripts/rea-clean.sh --list
bash scripts/rea-clean.sh --all --yes

# Environment Verification
bash scripts/verify-env.sh
bash scripts/verify-counts.sh

# REA CLI
node rea-android-ultimate/rea-repo/scripts/rea.mjs doctor --format json
node rea-android-ultimate/rea-repo/scripts/rea.mjs inspect-android-package app.apk --format json

# MCP Server
node mcp-v6-server.cjs mcp

Appendix B: File Locations (Corrected for Actual Structure)

Item Path
Workspace root <extract-path>/ (wherever you unzipped)
REA core <extract-path>/rea-android-ultimate/rea-repo/
Toolchain <extract-path>/rea-android-ultimate/.harness/
Setup script (root) <extract-path>/setup.sh
Setup script (full) <extract-path>/scripts/setup.sh
Unified launcher <extract-path>/scripts/rea6.sh
Ghidra decompile <extract-path>/scripts/ghidra-decompile.sh
Native analysis <extract-path>/scripts/native-analysis.sh
Full analysis <extract-path>/scripts/bin/full-analysis.sh (also scripts/full-analysis.sh)
Ghidra tarball <extract-path>/ghidra/ghidra-arm64.tar.gz
Environment file /data/local/tmp/.../rea_port/rea-env.sh
Scratch directory /data/local/tmp/.../rea_port/
Ghidra installation /data/local/tmp/.../rea_port/ghidra/ghidra_11.0_DEV/
Extras scripts <extract-path>/rea-android-ultimate/rea-repo/extras/scripts/
Web dashboard <extract-path>/rea-android-ultimate/rea-repo/workbench/
Skills <extract-path>/rea-android-ultimate/rea-repo/skills/
MCP server <extract-path>/mcp-v6-server.cjs

Appendix C: Environment Variables

Variable Description Example Value
JAVA_HOME Java runtime for Ghidra /tmp/rea_port/.harness/lib/jvm/java-17-openjdk
GHIDRA_HOME Ghidra installation /tmp/rea_port/ghidra/ghidra_11.0_DEV
GHIDRA_TMPDIR Ghidra temp dir /tmp/rea_port/ghidra/tmp
GHIDRA_USER_HOME Ghidra user home /tmp/rea_port/ghidra/home
FONTCONFIG_FILE Fontconfig file /tmp/rea_port/ghidra/fontconfig/fonts.conf
REA_TMP REA temporary directory /tmp/rea_port
TMPDIR System temp dir /tmp/rea_port/tmp
LD_LIBRARY_PATH Native library path /tmp:$JAVA_HOME/lib:$JAVA_HOME/lib/server
PATH Executable search path Includes .harness/bin, Java bin
REA_JAVA_HOME REA Java home JDK 17
REA_JAVA_17_HOME REA Java 17 home JDK 17
GHIDRA_JAVA_HOME Ghidra Java home JDK 17

Appendix D: Tool Count Summary (Actual)

Category Count Location
CLI commands 155 rea-android-ultimate/rea-repo/scripts/rea.mjs
MCP tools 207 rea-android-ultimate/rea-repo/
MCP prompts 6 rea-android-ultimate/rea-repo/
Standalone tools 23 scripts/
Extras scripts 43 rea-android-ultimate/rea-repo/extras/scripts/
MCP server tools 263 mcp-v6-server.cjs
Total unique tools ~400+ All sources combined

Appendix E: Version History

REA Android V6 — First public release (November 2026)

  • Built on top of "Rea Original" by morluto
  • Versions V1–V5 were private releases, not publicly available
  • V6 is the first public release

V6 Additions:

  • Ghidra 11.0 DEV native ARM64 decompiler
  • Unified launcher (rea6.sh) with 20+ commands
  • 23 standalone tools in workspace root
  • 43 extras scripts in extras/scripts/
  • Web dashboard at localhost:8080
  • MCP server with 263 tools
  • Evidence bundling system
  • Multi-engine orchestration (REA + Ghidra + rizin + jadx)
  • Native analysis pipeline
  • Cleanup tool (rea-clean.sh)
  • Analysis cache (analysis-cache.py)
  • AI agent skills (skills/native-analysis/)

Appendix F: Glossary

Term Definition
APK Android Package Kit — Android application package format
DEX Dalvik Executable — Android bytecode format
.so Shared Object — Native library file (ELF format)
Ghidra NSA's software reverse engineering suite
rizin Reverse engineering framework (fork of radare2)
jadx Dex-to-Java decompiler
apktool APK decompilation/rebuilding tool
aapt2 Android Asset Packaging Tool 2
MCP Model Context Protocol — AI agent integration standard
Shizuku Android system service for privileged API access
Evidence bundle Structured JSON container for analysis results
Static analysis Analysis without executing the target
Native binary Compiled machine code (.so, .exe, etc.)
Managed code .NET, Java bytecode (requires runtime)

REA Android V6 — Reverse Engineer Anything — Android Edition

Built on top of "Rea Original" by morluto (https://github.com/morluto/rea). V6 is the first public release. Versions V1–V5 were private releases and are not publicly available.

REA is not affiliated with or endorsed by the NSA, Google, or any device manufacturer.

All upstream projects retain their own licenses. See CREDITS.txt and THIRD_PARTY_NOTICES.md for full attribution.

39. Deep Troubleshooting Guide

This section provides detailed troubleshooting for every known issue, organized by symptom.


39.1 Setup Issues

Issue: setup.sh fails with "command not found"

Symptom: sh: setup.sh: not found

Cause: You are not in the rea-android-ultimate directory, or the file doesn't exist.

Fix:

# Navigate to the correct directory
cd "<extract-path>/rea-android-ultimate"

# Verify setup.sh exists
ls -la setup.sh

# Run it
sh setup.sh

Issue: setup.sh fails during Ghidra extraction

Symptom: Setup hangs or fails at "[2/7] Extracting Ghidra ARM64"

Cause: The ghidra-arm64.tar.gz file is 402 MB and extraction takes time. On slow storage, it may appear to hang.

Fix: Wait longer. If it truly fails, check disk space:

df -h /storage/emulated/0/

Ensure at least 5 GB free space.


Issue: setup.sh fails at doctor step

Symptom: Some checks show FAIL

Common failures and fixes:

Check Fix
android-java-runtime Java binaries not executable. Run setup.sh which copies Java to scratch.
android-apk-toolchain aapt2/jadx not executable. Run setup.sh.
android-rizin rizin not executable. Run setup.sh.
skill:identity Run node scripts/rea.mjs setup --yes twice.
Ghidra analyzeHeadless Missing libc++_shared.so. Falls back to rizin.

21.2 Environment Issues

Issue: java: command not found after setup

Symptom: java: command not found even after running setup.sh.

Root Cause: You didn't source rea-env.sh.

Fix:

source /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh
java -version

Verify PATH includes Java:

echo $PATH | tr ':' '\n' | grep java

Issue: LD_LIBRARY_PATH broken

Symptom: CANNOT LINK EXECUTABLE errors for various libraries.

Root Cause: LD_LIBRARY_PATH has empty segments or wrong paths.

Fix: The rea-env.sh has been fixed to use correct paths. Re-run setup.sh or manually source the fixed rea-env.sh:

source /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh

Issue: libc++_shared.so not found for Ghidra

Symptom: dlopen failed: library "libc++_shared.so" not found

Root Cause: Ghidra's decompile binary needs libc++_shared.so which isn't on the system.

Fix: The ghidra-decompile.sh script automatically falls back to rizin. If you want Ghidra specifically, download the correct libc++_shared.so from NDK r30 and place it in /tmp/.


21.3 Analysis Issues

Issue: APK analysis returns 0 classes

Symptom: JADX reports 0 classes or empty output.

Cause: The APK may be obfuscated, encrypted, or not a valid APK.

Fix: Verify the file is a valid APK:

file app.apk
# Should say: Zip archive data, at least v2.0 to extract

# Check if it has classes.dex
unzip -l app.apk | grep classes.dex

Issue: Native analysis returns 0 functions

Symptom: afl shows 0 functions or empty output.

Cause: The binary may be stripped, encrypted, or not a valid ELF.

Fix:

# Verify it's a valid ELF
file libfoo.so
# Should say: ELF 64-bit LSB arm64

# Check if it has symbols
rizin -q -c "iE" libfoo.so | head -5

Issue: Ghidra analysis produces 0 functions decompiled

Symptom: Output file exists but is 0 bytes.

Cause: Ghidra's decompiler binary failed (missing libc++_shared.so), so the post-script never ran.

Fix: This is expected when Ghidra's native decompiler can't run. The output will be empty. Use rizin directly:

rizin -q -c "aaa; pdf" libfoo.so

Or install the correct libc++_shared.so from NDK r30.


21.3 Web Dashboard Issues

Issue: Web dashboard doesn't load

Symptom: http://localhost:8080 doesn't respond.

Fix:

# Check if server is running
node rea-android-ultimate/workbench/server.js &
# Try accessing from browser
# http://localhost:8080
# Or from another device: http://<device-ip>:8080

Issue: Web dashboard shows no data

Symptom: Dashboard loads but shows empty results.

Fix: You need to run an analysis first and save results to the output directory. The dashboard reads from analysis output directories.


37. Deep Dive: Example Walkthroughs

37.1 Complete Walkthrough: Analyzing an APK

Here's a complete end-to-end example of analyzing an APK from start to finish.

Prerequisites

  • APK file: app.apk
  • REA Android V6 extracted and setup completed
  • Environment sourced

Step 1: Identify the APK

cd "<extract-path>"
source /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh
bash scripts/rea6.sh identify app.apk

Expected Output:

Package: com.example.app
Version: 1.0.0 (code 1)
minSdk: 21, targetSdk: 33
Classes: 4850
Resources: 2632
Permissions: android.permission.INTERNET, android.permission.ACCESS_NETWORK_STATE, ...

Step 2: Security Scan

bash scripts/rea6.sh scan app.apk

Expected Output:

-- lib-detect --
  Detected: okhttp 4.9.0, gson 2.8.6, retrofit 2.9.0
-- secret-scan --
  Found 2 potential secrets (check manually)
-- manifest-check --
  1 warning: android:usesCleartextTraffic="true"

Step 3: Full Analysis

bash scripts/rea6.sh analyze app.apk ./output

Expected Output:

========================================
  Full Analysis: app.apk
========================================

=== [1/5] REA Identify ===
  Package: com.example.app
  Version: 1.0.0 (code 1)
  minSdk: 21
  targetSdk: 33
  Classes: 4850
  Resources: 2632

=== [2/5] Security Analysis ===
  -- lib-detect --
    Detected: okhttp 4.9.0, gson 2.8.6
  -- secret-scan --
    2 findings
  -- manifest-check --
    1 warning

=== [3/5] Native Analysis (Ghidra) ===
  Extracted 3 native libs
  Decompiled libfoo.so: 156 functions
  Decompiled libbar.so: 89 functions
  Decompiled libbaz.so: 0 functions (Ghidra failed, rizin fallback)

=== [4/5] rizin Analysis ===
  libfoo.so: 156 functions, 23 imports
  libbar.so: 89 functions, 18 imports
  libbaz.so: 0 functions (stripped)

=== [5/5] Summary ===
  Target: app.apk
  Output: ./output
  Files: 15
  Decompiled C files: 2
  Native libs: 3
========================================

Step 4: Generate Evidence Report

python3 scripts/evidence-report.py ./output

Output: HTML file at ./output/evidence-report.html

Step 5: Browse with Web Dashboard

node rea-android-ultimate/workbench/server.js
# Open http://localhost:8080

37.2 Complete Walkthrough: Analyzing a Native Binary (.so)

Prerequisites

  • Native library: libcrypto.so
  • REA Android V6 set up

Step 1: Ghidra Decompilation

bash scripts/ghidra-decompile.sh libcrypto.so ./crypto_output.txt

If Ghidra works: You get C pseudocode for each function.
If Ghidra fails: Rizin fallback runs automatically.

Step 2: Native Analysis Pipeline

bash scripts/native-analysis.sh libcrypto.so ./crypto_analysis

Output:

  • libcrypto.so_decompiled.txt — Decompiled C code (Ghidra) or disassembly (rizin)
  • Export/import tables
  • Function list

Step 3: Crypto Key Extraction

python3 scripts/crypto-extract.py ./crypto_analysis/libcrypto.so_decompiled.txt

Output: List of potential cryptographic keys with confidence scores.

Step 4: Vulnerability Scan

python3 scripts/vuln-scan.py ./crypto_analysis/libcrypto.so_decompiled.txt

Output: List of vulnerabilities with file locations and severity.


38. Deep Dive: Troubleshooting Scenarios

Scenario 1: "I ran setup.sh but java still doesn't work"

Diagnosis:

  1. Did you source rea-env.sh? setup.sh copies Java to scratch but doesn't automatically set PATH.
  2. Are you running from the scratch directory? Java binaries only work from scratch (exec-capable storage).

Fix:

source /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh
java -version

Scenario 2: "Ghidra says Java version not supported"

Diagnosis: Ghidra 11.0 requires Java 17, but setup may have set JAVA_HOME to JDK 21.

Fix:

export JAVA_HOME=/data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/.harness/lib/jvm/java-17-openjdk
export PATH="$JAVA_HOME/bin:$PATH"

Or ensure setup.sh was run (it sets JAVA_HOME correctly in rea-env.sh).

Scenario 3: "Rizin shows 0 functions"

Diagnosis: The binary may be stripped or not a valid ELF.

Fix:

file libfoo.so
# Verify it says ELF 64-bit LSB arm64

# Try basic rizin commands
rizin -q -c "iE" libfoo.so  # Exports
rizin -q -c "ii" libfoo.so   # Imports

Scenario 4: "APK analysis shows 0 classes"

Diagnosis: The file may not be a valid APK, or it may be obfuscated/encrypted.

Fix:

file app.apk
unzip -l app.apk | grep classes.dex

If no classes.dex, it's not a valid DEX-based APK.

Scenario 5: "setup.sh takes too long"

Diagnosis: Ghidra extraction (402 MB) takes 2+ minutes on slow storage.

Fix: Be patient. The extraction will complete. Do not interrupt.


38. Deep Dive: Architecture Decision Records

Why Python for Standalone Tools?

Python was chosen for standalone tools because:

  1. Pre-installed on AndroidHarness
  2. Easy to read and modify
  3. Good for text processing (log parsing, evidence generation)
  4. No compilation step needed

Why Bash for Shell Wrappers?

Bash was chosen for shell wrappers because:

  1. Universally available on Android
  2. Easy to chain commands
  3. Good for file operations and process management

Why Node.js for REA Core?

Node.js was chosen because:

  1. REA core was originally built in Node.js
  2. Good async performance for I/O-bound analysis
  3. Rich npm ecosystem for JSON processing, HTTP, etc.
  4. MCP server integration is straightforward

Why Ghidra 11.0 DEV?

Ghidra 11.0 DEV was chosen because:

  1. Native ARM64 build available (no emulation needed)
  2. Headless mode supports automation
  3. Open source (Apache 2.0)
  4. Industry-standard decompiler
  5. Native decompilation now works on Android via JNI posix_spawn bypass (see Section 6.7)

Why Rizin as Fallback?

Rizin was chosen as fallback because:

  1. Native ARM64 build available
  2. No Java dependencies (unlike Ghidra)
  3. Lightweight and fast
  4. Good decompilation capability via pd command

Why Rizin as Fallback?

Rizin was chosen as fallback because:

  1. Native ARM64 build available
  2. No Java dependencies (unlike Ghidra)
  3. Lightweight and fast
  4. Good decompilation capability via pd command

39. Deep Dive: Output Format Reference

Ghidra Decompiled Output Format

===== function_name @ 0xaddress =====
return_type function_name(arg_type arg1, arg_type arg2) {
    type local_var;
    local_var = arg1 + arg2;
    return local_var;
}

Rizin Export Format

nth  paddr      vaddr  bind   type  size  lib  name
97   0x0000d304 0x0000d304 GLOBAL FUNC 440     zip_dir_add

Evidence Bundle Format

{
  "evidence_id": "ev_abc123",
  "subject": {
    "name": "file.so",
    "digest": { "sha256": "abc123..." },
    "provider": { "id": "ghidra", "name": "Ghidra headless", "version": "11.0" },
    "operation": "decompile",
    "raw_result": { ... },
    "confidence": "observed"
  }
}

40. Future Roadmap

Planned Features

  • Full Ghidra decompilation — Resolve libc++_shared.so compatibility
  • Frida integration — Dynamic analysis on Android
  • Dobby integration — Lightweight runtime instrumentation
  • mitmproxy integration — Network traffic analysis
  • More native decompilers — Additional native analysis engines
  • Improved web dashboard — More visualizations, better UX
  • MCP tool expansion — More tools exposed via MCP

Known Limitations

  1. Ghidra decompiler binary — Requires specific libc++_shared.so not available on all devices
  2. Java permissions — Java binaries don't execute from shared storage (FUSE noexec)
  3. Storage space — ~2.5 GB required for full installation
  4. ARM64 only — Currently only supports ARM64-v8a Android devices

REA Android V6 — Reverse Engineer Anything — Android Edition

Built on top of "Rea Original" by morluto (https://github.com/morluto/rea). V6 is the first public release. Versions V1–V5 were private releases and are not publicly available.

REA is not affiliated with or endorsed by the NSA, Google, or any device manufacturer.

All upstream projects retain their own licenses. See CREDITS.txt and THIRD_PARTY_NOTICES.md for full attribution.
ENDOFPART5

41. Detailed Troubleshooting Scenarios

Scenario A: Ghidra Decompilation Now Works

Symptom: Previously ghidra-decompile.sh showed "Ghidra decompilation failed" and fell back to rizin.

Status: FIXED — Ghidra decompilation now works on Android via JNI posix_spawn bypass.

Diagnosis (Historical): Ghidra's native decompile binary couldn't run due to Android's SELinux blocking fork()+execve() from app processes. The fix uses a JNI wrapper (libdecompile_jni.so) that calls posix_spawn() via /system/bin/linker64 to launch the decompiler binary without fork()+execve().

What works now (Verified):

  • ARM64 ELF decompilation: 591 functions from libzip.so
  • PE x64 decompilation: 832 functions from nacre.exe
  • PE x86 decompilation: 603+ functions from libvlccore.dll
  • ARM64 ELF via Rizin (native fallback): works perfectly

What works:

  • Ghidra C pseudocode decompilation via analyzeHeadless (JNI posix_spawn bypass)
  • Rizin decompilation (native, no JVM)
  • Ghidra headless analysis (disassembly, cross-refs, types)
  • All other REA tools work normally

Usage:

bash scripts/ghidra-decompile.sh libfoo.so output.txt
# or via unified launcher
bash scripts/rea6.sh ghidra libfoo.so ./output.txt

Scenario B: Setup Completes but Java Commands Fail

Symptom: sh setup.sh completes successfully, but java -version still says "Permission denied".

Diagnosis: You didn't source rea-env.sh after setup. setup.sh copies Java to scratch but doesn't automatically modify your shell's PATH.

Fix:

source /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh
java -version

Verify PATH:

echo $PATH | grep -o '/data/local/tmp/.*rea_port.*harness.*java'

Scenario C: APK Analysis Shows 0 Classes

Symptom: jjadx or inspect-android-package reports 0 classes.

Diagnosis: The file is not a valid DEX-based APK, or it's heavily obfuscated/encrypted.

Diagnostic Steps:

# 1. Verify it's a valid ZIP/APK
file app.apk
# Should say: Zip archive data

# 2. Check for classes.dex
unzip -l app.apk | grep classes.dex

# 3. Check APK signature
aapt2 dump badging app.apk | head -5

Fix: If no classes.dex, the file is not a standard APK. It may be a split APK, an app bundle (.aab), or an obfuscated/protected APK.


Scenario D: Rizin Shows 0 Functions

Symptom: rizin -q -c "afl" libfoo.so returns 0 functions.

Diagnosis: The binary may be stripped, encrypted, or not a valid ELF.

Diagnostic Steps:

# 1. Verify it's ELF
file libfoo.so
# Should say: ELF 64-bit LSB arm64

# 2. Check for exported symbols
rizin -q -c "iE" libfoo.so | head -5

# 3. Try full analysis
rizin -q -c "aaa" libfoo.so
rizin -q -c "afl" libfoo.so | wc -l

Fix: If the binary is stripped, use symbol-recovery.py to attempt function name recovery.


Scenario E: Setup.sh Hangs at Ghidra Extraction

Symptom: sh setup.sh appears stuck at "[2/7] Extracting Ghidra ARM64".

Diagnosis: The ghidra-arm64.tar.gz file is 402 MB. On slow storage (shared storage /sdcard), extraction can take 2+ minutes.

Fix: Wait patiently. Do not interrupt. If it truly hangs:

  1. Check disk space: df -h /storage/emulated/0/
  2. Ensure at least 5 GB free
  3. Re-run setup.sh if it was interrupted

Scenario F: Python Scripts Fail with "Module Not Found"

Symptom: python3 triage.py app.apk fails with ModuleNotFoundError.

Diagnosis: Python standard library modules should be available. If a third-party module is missing, the script may have dependencies not installed.

Fix: Most REA Python scripts use only standard library modules. If a specific script fails, check its imports and install missing modules via pkg_install if available.


Scenario G: Web Dashboard Shows Blank Page

Symptom: http://localhost:8080 loads but shows no data.

Diagnosis: The dashboard reads from analysis output directories. If no analysis has been run, there's nothing to display.

Fix: Run an analysis first:

bash scripts/rea6.sh analyze app.apk ./output
node rea-android-ultimate/workbench/server.js
# Then refresh http://localhost:8080

Scenario G: "No space left on device"

Symptom: unzip or setup.sh fails with "No space left on device".

Diagnosis: The archive expands to ~2.5 GB. Shared storage may not have enough free space.

Fix:

# Check available space
df -h /storage/emulated/0/

# Free up space or use scratch storage
# The setup.sh copies to scratch which may have different space
df -h /data/local/tmp/

39.2 Common Error Messages and Meanings

Error Message Meaning Fix
Permission denied (java) Shared storage is noexec Run setup.sh, source rea-env.sh
bad interpreter Shebang points to non-existent path Patch launch.sh shebang
Unable to prompt user for JDK path No TTY for Ghidra Java selection Set JAVA_HOME to JDK 17
no fontmanager Missing libfreetype.so Add /tmp to LD_LIBRARY_PATH
Cannot run program decompile Ghidra decompiler binary missing libs Rizin fallback (automatic)
command not found: jadx JADX is JAR, not executable Use rea inspect-android-package
No space left on device < 5 GB free Free storage space
User home directory does not exist Ghidra expects Termux home Set HOME env var

40. Deep Dive: File Format Reference

APK File Structure

An APK is a ZIP archive containing:

  • AndroidManifest.xml — App manifest (permissions, components)
  • classes.dex — Compiled Dalvik bytecode
  • resources.arsc — Compiled resources
  • res/ — Uncompiled resources (images, XML)
  • assets/ — Raw assets
  • lib/arm64-v8a/*.so — Native libraries (ARM64)
  • META-INF/ — Signing information

ELF File Structure (.so files)

An ELF shared object contains:

  • ELF Header — File identification
  • Program Headers — Segment information for loading
  • Section Headers — Section information for linking
  • .text — Executable code
  • .data — Initialized data
  • .rodata — Read-only data
  • .symtab — Symbol table (if not stripped)
  • .dynsym — Dynamic symbol table
  • .dynstr — Dynamic string table
  • .rel.dyn / .rel.plt — Relocation entries

Evidence Bundle Format

Evidence bundles are JSON files with this structure:

{
  "evidence_id": "unique_id",
  "subject": {
    "name": "filename",
    "digest": { "sha256": "hash", "local_path": "/path/to/file" },
    "provider": { "id": "tool_name", "name": "Tool Name", "version": "x.y" },
    "operation": "analysis_type",
    "raw_result": { ... },
    "confidence": "observed|asserted|inferred",
    "authority": "shipped-artifact|analyzed|user-provided"
  }
}

40.5. Performance Tuning

Ghidra Performance

Ghidra decompilation is CPU and memory intensive. For large binaries:

# Increase Ghidra heap
export GHIDRA_MAXMEM=2G
export GHIDRA_HEADLESS_MAXMEM=2G

# Use functions-only mode for faster extraction
bash scripts/ghidra-decompile.sh libfoo.so output.txt --functions-only

# Increase timeout for large binaries
bash scripts/ghidra-decompile.sh libfoo.so output.txt --timeout 600

Rizin Performance

Rizin is generally fast. For very large binaries:

# Full analysis (slower but more complete)
rizin -q -c "aaa" libfoo.so

# Quick analysis (faster, less detail)
rizin -q -c "aa" libfoo.so

JADX Performance

JADX decompilation is generally fast. For large APKs:

# Increase Java heap
export REA_JADX_HEAP_MIB=2048

# Or set via JAVA_TOOL_OPTIONS
export JAVA_TOOL_OPTIONS="-Xmx2048m"

40.6. Environment Variable Quick Reference

Variable Purpose Example Value
JAVA_HOME Java for Ghidra /tmp/rea_port/.harness/lib/jvm/java-17-openjdk
GHIDRA_HOME Ghidra install /tmp/rea_port/ghidra/ghidra_11.0_DEV
GHIDRA_TMPDIR Ghidra temp /tmp/rea_port/ghidra/tmp
GHIDRA_USER_HOME Ghidra home /tmp/rea_port/ghidra/home
FONTCONFIG_FILE Fontconfig /tmp/rea_port/ghidra/fontconfig/fonts.conf
REA_TMP REA temp /tmp/rea_port
TMPDIR System temp /tmp/rea_port/tmp
LD_LIBRARY_PATH Native libs /tmp:$JAVA_HOME/lib:$SYS_LIB
PATH Executables Includes .harness/bin, Java bin
HOME User home /tmp/rea_port/home
GHIDRA_JAVA_HOME Ghidra Java JDK 17

40.7. Output Directory Structure

After running bash scripts/rea6.sh analyze app.apk ./output:

./output/
├── rea_report.json          # REA analysis results
├── jadx_output/             # JADX decompiled Java
│   ├── com/example/app/
│   └── resources/
├── native_libs/             # Extracted .so files
│   ├── libfoo.so
│   └── libbar.so
├── libfoo.so_decompiled.txt # Ghidra/rizin decompilation
├── libbar.so_decompiled.txt # Ghidra/rizin decompilation
├── evidence.json            # Evidence bundle
└── summary.txt              # Analysis summary

41. Conclusion

REA Android V6 is a comprehensive, offline-first reverse engineering toolkit for Android devices. It combines REA core (155 CLI commands, 207 MCP tools), Ghidra 11.0 DEV (native ARM64 decompilation), rizin 0.9.1 (disassembly), jadx 0.7.1 (Java decompilation), apktool, aapt2, and 66 additional standalone tools into a unified pipeline.

Key Strengths

  • Offline-first — No internet required after setup
  • Multi-engine — REA + Ghidra + rizin + jadx + apktool + aapt2
  • Android-native — Runs on ARM64 Android without emulation
  • Evidence-driven — Structured, shareable analysis results
  • MCP-native — 263 tools for AI agent integration
  • Extensible — Plugin system, custom scripts, unified launcher

Known Limitations

  1. Ghidra decompiler binary — Requires specific libc++_shared.so not available on all devices. Rizin fallback is automatic.
  2. Java on shared storage — Java binaries don't execute from /storage/emulated/0/ (FUSE noexec). Use setup.sh to copy to scratch.
  3. Storage space — ~2.5 GB required for full installation.
  4. ARM64 only — Currently supports ARM64-v8a Android devices only.

Getting Help

  • Check this README's Troubleshooting section (Section 21)
  • Run bash verify-env.sh for environment diagnostics
  • Run bash verify-counts.sh for tool count verification
  • Check CREDITS.txt for upstream project information
  • Examine rea-android-ultimate/rea-repo/THIRD_PARTY_NOTICES.md for full third-party notices

REA Android V6 — Reverse Engineer Anything — Android Edition

Built on top of "Rea Original" by morluto (https://github.com/morluto/rea). V6 is the first public release. Versions V1–V5 were private releases and are not publicly available.

REA is not affiliated with or endorsed by the NSA, Google, or any device manufacturer.

All upstream projects retain their own licenses. See CREDITS.txt for full attribution.

42. Detailed Example Outputs

Example 1: APK Identification Output

$ bash scripts/rea6.sh identify com.example.app.apk

Package: com.example.app
Version: 1.0.0 (code: 1)
minSdk: 21
targetSdk: 33
Classes: 4850
Resources: 2632
Permissions:
  android.permission.INTERNET
  android.permission.ACCESS_NETWORK_STATE
  android.permission.CAMERA
  android.permission.WRITE_EXTERNAL_STORAGE
Native Libraries:
  libfoo.so (arm64-v8a)
  libbar.so (arm64-v8a)

Example 2: Security Scan Output

$ bash scripts/rea6.sh scan app.apk

-- lib-detect --
  Detected SDKs:
    okhttp 4.9.0
    gson 2.8.6
    retrofit 2.9.0
    firebase-analytics 19.0.0

-- secret-scan --
  Found 2 potential secrets:
    [HIGH] Possible API key in com.example.app.ApiClient
    [MEDIUM] Possible hardcoded password in com.example.app.Config

-- manifest-check --
  1 warning:
    android:usesCleartextTraffic="true" (insecure HTTP allowed)

Example 3: Native Decompilation Output (Ghidra)

===== zip_add @ 0x0000b49c =====
int zip_add(zip_t *za, const char *name, const void *data, zip_uint64_t size) {
    zip_source_t *source;
    int result;

    if (za == NULL || name == NULL) {
        return -1;
    }

    source = zip_source_buffer(za, data, size, 0);
    if (source == NULL) {
        return -1;
    }

    result = zip_add(za, name, source);
    if (result < 0) {
        zip_source_free(source);
    }

    return result;
}

Example 4: Native Decompilation Output (Rizin Fallback)

════════════════════════════════════════════════════════════════════════════
  Rizin Native Decompilation (Ghidra fallback)
  Binary : libfoo.so
════════════════════════════════════════════════════════════════════════════

--- Exported Functions ---
nth      paddr      vaddr bind   type size lib name
97       0x0000d304 0x0000d304 GLOBAL FUNC   440     zip_dir_add
98       0x0001be10 0x0001be10 GLOBAL FUNC  1616     zip_source_zip_file_create
99       0x0000fbd8 0x0000fbd8 GLOBAL FUNC    40     zip_error_to_data

--- Disassembly (zip_add) ---
/[fcn] 0x0000b49c 1616 zip_add(int arg1, int arg2, int arg3, int arg4);
|  0x0000b49c      1120  stp x29, x30, [sp, #-0x20]!
|  0x0000b4a0      1104  mov x29, sp
|  0x0000b4a4      1128  str x0, [sp, #0x10]
|  0x0000b4a8      1112  str x1, [sp, #0x18]
|  ...

Example 5: Evidence Report Output

{
  "evidence_id": "ev_a0d4f73adea44f4716ad3d2b824d67a101817305048bcd7b281808097391cf1c",
  "subject": {
    "name": "calculator.apk",
    "digest": {
      "sha256": "a0af64bae8b539bf95bb6220284c3cd0107aec53037b19cdb8dd42e94360bfa7",
      "local_path": "/tmp/calculator.apk",
      "format": "apk",
      "architecture": null
    },
    "provider": {
      "id": "jadx",
      "name": "JADX headless",
      "version": "0.7.1"
    },
    "analysis_profile": null,
    "predicate_type": "rea.analysis",
    "operation": "inspect_android_package",
    "parameters": {
      "path": "/tmp/calculator.apk"
    },
    "raw_result": {
      "server": {
        "name": "rea-jadx-bridge",
        "version": "1"
      },
      "loaded": {
        "state": "LOADED",
        "apk_path": "/data/local/tmp/.../target.apk",
        "class_count": 4850,
        "resource_count": 2632,
        "threads": 1,
        "resources": "full"
      }
    },
    "confidence": "observed",
    "authority": "shipped-artifact"
  }
}

43. Deep Dive: Troubleshooting Decision Trees

Decision Tree 1: "Java doesn't work"

Start: java -version fails
    │
    ├─ Did you run setup.sh? ── No ──→ Run sh setup.sh
    │                                │
    │                                Yes ──→
    │                                 ├─ Did you source rea-env.sh? ── No ──→ Source it
    │                                 │                                       │
    │                                 │                                       Yes ──→
    │                                 │                                       │   Is /storage/emulated/0/ mounted noexec?
    │                                 │                                       │   │   Yes ──→ Use scratch (already done by setup.sh)
    │                                 │                                       │   │   No ──→ Check file permissions
    │                                 │                                       │   │
    │                                 │                                       │   Still failing? ──→ Check Shizuku, try direct path
    │                                 │                                       │
    │                                 Still failing? ──→ Check file exists, try absolute path
    │
    Still failing? ──→ Report issue with java -version output

Decision Tree 2: "Ghidra decompilation fails"

Start: Ghidra decompilation fails
    │
    ├─ Is it a Java error? ── Yes ──→ Fix Java (see Decision Tree 1)
    │                               │
    │                               No ──→
    │                                  ├─ Is it libfreetype/libfontmanager? ── Yes ──→ Add /tmp to LD_LIBRARY_PATH
    │                                  │                                          │
    │                                  │                                          No ──→
    │                                  │                                          │   Is it libC++_shared.so? ── Yes ──→ Use rizin fallback
    │                                  │                                          │   │                                    │
    │                                  │                                          │   │                                    No ──→
    │                                  │                                          │   │                                    Check Ghidra logs, try again
    │                                  │                                          │   │
    │                                  │                                          │   Still failing? ──→ Check Java version (must be 17)
    │                                  │                                          │
    │                                  Still failing? ──→ Check setup.sh completed, Ghidra extracted
    │
    Still failing? ──→ Report issue with full error output

Decision Tree 3: "APK analysis shows nothing"

Start: APK analysis shows 0 classes or empty
    │
    ├─ Is the file a valid APK? ── No ──→ Get a valid APK
    │                                 │
    │                                 Yes ──→
    │                                  ├─ Is it obfuscated? ── Yes ──→ Analysis may be limited
    │                                 │                                    │
    │                                 │                                    No ──→
    │                                 │                                    │   Is JADX working? ── No ──→ Check Java, check JADX JAR
    │                                 │                                    │   │                                    │
    │                                 │                                    │   │                                    Yes ──→ Check REA integration
    │                                 │                                    │   │                                    │
    │                                 │                                    │   Still failing? ──→ Check logs, try direct jadx
    │                                  │
    │                                 Still failing? ──→ Try unzip -l to inspect APK contents
    │
    Still failing? ──→ Report issue with APK file info

41. Quick Reference Card (Corrected Paths)

Daily Workflow

# 1. Source environment
source /data/local/tmp/androidharness/com.androidharness.app/linux/tmp/rea_port/rea-env.sh

# 2. Analyze APK
bash scripts/rea6.sh analyze app.apk ./output

# 3. View results
cat ./output/summary.txt
python3 scripts/evidence-report.py ./output

# 4. Native analysis
bash scripts/ghidra-decompile.sh libfoo.so ./native_output.txt

# 5. Cleanup
bash scripts/rea-clean.sh --all --yes

Emergency Fixes

# Java not working?
source /data/local/tmp/.../rea_port/rea-env.sh

# Ghidra not working?
bash scripts/ghidra-decompile.sh libfoo.so output.txt  # Falls back to rizin

# Setup broken?
sh setup.sh  # Re-runs everything

# Storage full?
bash scripts/rea-clean.sh --all --yes

# Everything broken?
cd "<extract-path>"
sh setup.sh
source rea-env.sh
node rea-android-ultimate/rea-repo/scripts/rea.mjs doctor

42. Glossary of Terms

Term Definition
APK Android Package Kit — Android application package format (ZIP-based)
DEX Dalvik Executable — Android bytecode format executed by ART/Dalvik
.so Shared Object — Native library file in ELF format
Ghidra NSA's software reverse engineering suite, ARM64 build for Android
rizin Reverse engineering framework (fork of radare2), ARM64 native
jadx Dex-to-Java decompiler for Android APKs
apktool Tool for decompiling and rebuilding APKs
aapt2 Android Asset Packaging Tool 2, resource compilation
MCP Model Context Protocol — Standard for AI agent tool integration
Shizuku Android system service for privileged API access without root
Evidence bundle Structured JSON container for analysis results
Static analysis Analysis performed without executing the target program
Native binary Compiled machine code executable (.so, .exe, .dylib)
Managed code Code requiring a runtime (.NET, Java bytecode)
FUSE/noexec Filesystem mount option preventing execution from shared storage
Scratch directory Exec-capable temporary directory for tool execution

REA Android V6 — Reverse Engineer Anything — Android Edition

Built on top of "Rea Original" by morluto (https://github.com/morluto/rea). V6 is the first public release. Versions V1–V5 were private releases and are not publicly available.

REA is not affiliated with or endorsed by the NSA, Google, or any device manufacturer.

All upstream projects retain their own licenses. See CREDITS.txt for full attribution.


End of Documentation

For questions, issues, or contributions, please refer to the REA project repository.

Yorumlar (0)

Sonuc bulunamadi