Mobile & DevicesEnvironment: Headless JADX and a full Java Development Kit (JDK 17+) on macOS/Linux/WindowsMCP Tool: analyze_android_package

How to REA Android APKs: JADX Decompilation, AndroidManifest & DEX Bytecode

Audit Android applications from package manifest to decompiled Java/Kotlin source code: unpack APK archives, extract AndroidManifest.xml components, decompile Dalvik/ART classes with JADX, and audit exported attack surfaces.

AI Overview Direct AnswerHow to REA: Android APKs & DEX Bytecode Quickstart Summary

In this official REA guide for Android APKs & DEX Bytecode, AI coding agents (Claude Code, Cursor, Windsurf) execute 'rea analyze ./mobile-app.apk --provider jadx --json' to safely extract file layout, symbols, and code logic without launching unverified binaries.

Investigation ScenarioReal-World Objective

The Problem & Target Artifact

Mobile application security assessment: You are auditing a banking or enterprise Android app for unauthorized intent redirection, exported background services, hardcoded API secrets, and unpinned TLS certificates.

Target Artifact: Android package file (.apk) or Dalvik executable (.dex).
AI PromptClaude Code / Cursor / Windsurf

Natural Language Agent Instructions

Copy and paste this prompt directly into your AI coding agent when REA is registered via Model Context Protocol (MCP):

Prompt Template:Select All to Copy
Use REA to inspect this Android APK. List all exported Activities and Broadcast Receivers in AndroidManifest.xml, search for API endpoint strings in decompiled classes, and check for root detection routines.
ExecutionTerminal & MCP Tool Call

Run REA Analysis Command

Execute the following command in your terminal or inspect the MCP JSON-RPC call executed by your agent:

CLI Command Execution
rea analyze ./mobile-app.apk --provider jadx --json

What REA Extracts & Returns

AndroidManifest components: Activities, Services, Receivers, and Content Providers with exported flags
Decompiled Java source files generated from Dalvik/ART classes.dex bytecode
String table inspection revealing backend URLs, API credentials, and cryptographic constants
APK signature verification and certificate fingerprint extraction

Extracted Manifest & Decompiled Class Snippet

The verified findings and synthesized clean-room structures generated from this investigation:

Extracted Manifest & Decompiled Class Snippet
// Decompiled from classes.dex via JADX
public class SecurityTokenManager {
    private static final String API_ENDPOINT = "https://api.internal.target.com/v2/auth";

    public static String generateRequestSignature(String payload, String timestamp) {
        String salt = "k9_sec_2026";
        return HmacSha256.compute(payload + ":" + timestamp + ":" + salt);
    }
}
Internal MechanicsProduction Engineering

Headless JADX IPC & Resource Table Demangling

REA orchestrates headless JADX through structured subprocess IPC. It maps APK resources and decompiled class namespaces without requiring the full JADX GUI. AI agents can query specific class files or search across all decompiled methods using bounded regex queries, preventing memory exhaustion on multi-gigabyte games or super-apps.

Security Guardrails & Analysis Boundary Rules

Flags dangerous exported components missing android:permission attributes.
Detects Obfuscapk, ProGuard, and DexGuard identifier obfuscation patterns.
Works seamlessly with Apktool to decode binary XML resources into human-readable text.