RevDroid Documentation

AI-assisted Android APK security analysis for bug bounty hunters. Decompile and scan APKs locally, then let an AI agent reason over the results to build exploit chains — without the APK ever leaving your machine.

Next.js 16 + React 19 Node.js + Express MongoDB Local ADB agent
⚠ External service costs are not included. RevDroid is a self-hosted application. The AI features connect to a third-party LLM provider (OpenRouter) that bills you directly based on usage, and login uses your own Google OAuth credentials. Your purchase does not include any API credits, subscriptions, or usage costs — you create your own provider accounts and pay them separately. Static analysis runs entirely locally and needs no paid service.

Overview

RevDroid is a full-stack, self-hostable platform that pairs a local analysis agent with a web dashboard and an AI hunt agent. It is built for bug bounty hunters, mobile pentesters, and AppSec engineers who need to go from an APK to a credible, submittable finding quickly.

The product ships as full source for three independent components you run yourself:

agent/

A local Node/Express agent that runs on your machine, wraps ADB, ingests APKs, and runs the 12-phase static analysis pipeline. Listens on 127.0.0.1:8071.

backend/

A Node/Express + MongoDB API for Google sign-in, JWT sessions, and the AI tool-calling loop over OpenRouter. Default port 8070.

frontend/

A Next.js 16 / React 19 dashboard (Tailwind v4 + DaisyUI) for projects, scans, findings, AI chat, and device control. Default port 3000.

The headline trust claim: your APK never leaves your machine. Decompilation and scanning happen on the local agent; only findings and small code snippets are ever sent to the AI layer.

How it works

1

Pair the local agent

Start the agent on your machine. It generates a one-time pairing token; you paste it into the dashboard so the browser can talk to the agent over localhost.

2

Add an APK

Upload an APK file directly, or pull an installed package straight off a connected Android device via ADB. APKs are de-duplicated by SHA-256.

3

Run a scan

The agent unpacks the APK and runs 12 analysis phases, streaming each result to the dashboard live over Server-Sent Events.

4

Hunt with the AI agent

Open the per-project AI chat. It reads your scan data through the agent, proposes multi-step exploit chains, and tracks verification steps — all while the APK stays on your machine.

Architecture

The browser is paired with both the cloud backend and the local agent. When the AI needs data about an APK, the backend emits a tool call, the browser executes it against the local agent, and posts the result back — so analysis data reaches the LLM without the APK being uploaded.

Browser — Next.js dashboard projects · scans · AI chat · device control Backend (cloud) Google OAuth · JWT · AI loop exploit chains · cost meter Local agent (your machine) ADB · APK ingest · 12-phase scan SSE stream · on-disk storage HTTPS · JWT HTTP + token (localhost) tool calls proxied by the browser

Prerequisites

Install these before you begin. Static analysis needs Java and the Android platform-tools; the AI features need a MongoDB instance and provider keys.

RequirementUsed byNotes
Node.js ≥ 18all three appsLTS recommended. Verify with node -v.
Java (JDK)agentRequired by apktool and keytool. Verify with java -version.
Android platform-toolsagentadb on your PATH, or set ADB_PATH. Needed for device features and pulling installed APKs.
MongoDBbackendLocal install or a hosted connection string (e.g. MongoDB Atlas).
Google OAuth clientbackendClient ID + secret from the Google Cloud Console for sign-in.
OpenRouter API keybackendFor the AI agent. Create one at openrouter.ai/keys. Billed by usage — see AI model & costs.

Installation — 1 · Local agent

You will run three processes. The agent and backend should be up before you use the dashboard.

cd agent
npm install        # also downloads pinned tools (apktool) with sha256 verification
npm start

On first boot the agent generates a pairing token, prints it in the terminal, and stores it at ~/.revdroid/agent.json (file mode 600). It listens on http://127.0.0.1:8071 and accepts browser requests only from the dashboard origin. Keep this terminal open — you'll copy the token in step 4.

The agent needs no .env file. All of its settings are optional environment variables with sensible defaults — see Agent variables.

Installation — 2 · Backend

cd backend
npm install
cp .env.example .env      # then edit .env — see Configuration below
npm run dev               # or: npm start

Open backend/.env and fill in every value. At minimum you must set MONGO_URI, a strong JWT_SECRET, the Google OAuth pair, and OPENROUTER_API_KEY.

JWT_SECRET is required and validated. The server refuses to start if JWT_SECRET is missing, a known placeholder, or shorter than 32 characters. Generate a strong value: openssl rand -hex 32.

Installation — 3 · Frontend

cd frontend
npm install
cp .env.example .env.local   # sets NEXT_PUBLIC_API_URL=http://localhost:8070
npm run dev                  # http://localhost:3000

The dashboard is now available at http://localhost:3000.

Installation — 4 · Pair & sign in

1

Sign in

Open the dashboard and sign in with Google. On success the backend issues a 7-day JWT that the frontend stores in localStorage.

2

Pair the agent

Click Pair Agent in the sidebar. Paste the token the agent printed on first boot. The agent URL defaults to http://127.0.0.1:8071. The pairing is stored in localStorage.

3

Create a project

Create your first project, then upload an APK or pull one from a connected device to begin.

The project dashboard after pairing the agent and adding an APK
The project dashboard: framework detection, an APK, and its scan.

Configuration — Backend variables

Set these in backend/.env (copy from backend/.env.example).

VariableRequiredDescription
PORTnoAPI listen port. Default 8070.
MONGO_URIyesMongoDB connection string, e.g. mongodb://localhost:27017/revdroid.
JWT_SECRETyesRandom string ≥ 32 chars. The server will not start without a strong value.
JWT_EXPIRES_INnoToken lifetime. Default 7d.
GOOGLE_CLIENT_IDyesGoogle OAuth client ID.
GOOGLE_CLIENT_SECRETyesGoogle OAuth client secret.
GOOGLE_CALLBACK_URLyesOAuth redirect, e.g. http://localhost:8070/auth/google/callback. Must match the Google console.
FRONTEND_URLyesDashboard origin used for post-login redirect, e.g. http://localhost:3000.
OPENROUTER_API_KEYyes*Key for the AI agent. *Required for AI chat; static scanning works without it.
AI_MODELnoOpenRouter model slug. Default anthropic/claude-sonnet-4.5.

Configuration — Agent variables

All optional. Set them in your shell before npm start if the defaults don't fit.

VariableDefaultDescription
PORT8071Local listen port.
HOST127.0.0.1Bind address. Do not expose this to your network.
ADB_PATHadbFull path to the adb binary if it isn't on PATH.
JAVA_PATHjavaFull path to the java binary if it isn't on PATH.
ALLOWED_ORIGINShttp://localhost:3000,http://127.0.0.1:3000Comma-separated CORS allowlist. Add your deployed dashboard origin here.

Rotate the pairing token at any time (you'll need to re-pair):

cd agent
node src/index.js --rotate-token

Configuration — Frontend variables

VariableRequiredDescription
NEXT_PUBLIC_API_URLyesBase URL of the backend API, e.g. http://localhost:8070.

Configuration — AI model & costs

The AI agent calls an LLM through OpenRouter using your own API key. Set AI_MODEL to any OpenRouter model slug; the default is anthropic/claude-sonnet-4.5. You can switch to cheaper models such as anthropic/claude-haiku-4.5, openai/gpt-4o-mini, or deepseek/deepseek-chat.

Usage is billed by the provider, not by RevDroid. Every AI conversation consumes tokens you pay OpenRouter for. RevDroid meters per-conversation token and cost totals in the UI so you can keep an eye on spend, but it does not include any credits. Static analysis is free and needs no key.

Using RevDroid — Run a scan

Inside a project, add an APK (upload a file or pull one from a device), then click Run scan. The agent executes the pipeline and streams each phase to the UI in real time:

  1. unpackapktool d into smali, resources, and AndroidManifest.xml
  2. framework — detect Flutter, React Native, Xamarin, Unity, or native (+ ABIs)
  3. signing — certificate chain and signature algorithm analysis
  4. resources — sensitive files, config bundles, and URLs in assets/res
  5. code — weak crypto, SSL/TLS bypass, insecure RNG, WebView misconfig, reflection, SQLi patterns, debug logging
  6. secrets — hardcoded API keys and credentials (AWS, GCP, Stripe, Slack, GitHub, Twilio, private keys, OAuth tokens)
  7. trackers — 40+ known third-party SDKs
  8. files — inventory by type, suspicious files, oversized files
  9. binaries — ELF mitigations (NX, PIE, RELRO, stack canary, stripped, RPATH)
  10. apkid — commercial packers, obfuscators (ProGuard/R8/DexGuard), anti-debug stubs
  11. behaviour — high-signal Android behaviours (IMEI/IMSI, contacts, sensors, encryption, native loads)
  12. strings — extract and dedupe smali + binary strings into a searchable index
A completed scan showing the 12 phases, severity breakdown, and top findings
A completed scan: 12 phases with timings, a severity breakdown, and top findings.

Using RevDroid — Read findings

Each scan opens to an overview with a severity chart and per-phase status, plus dedicated tabs: findings (filterable), manifest, permissions, network & deep-links, code, secrets (reveal/copy), signing, behaviour, trackers, file inventory, binaries, APKiD, and strings. Findings update live as phases complete.

Using RevDroid — AI hunt agent

Open the AI chat for a project and ask it to hunt, e.g. "What's the most promising exploit chain here?" The agent runs a multi-turn tool-calling loop (up to 25 hops) and can call these read-only tools against your local agent: get_project_summary, list_scans, get_scan_summary, list_findings, get_finding, get_manifest_summary, get_framework, get_secrets, search_strings, and read_smali_file.

Exploit chains. The agent tracks bug-bounty hypotheses as multi-step chains (hypothesis → steps with status → impact), seeded from 10+ canonical Android templates such as open Firebase RTDB, unrestricted Maps key, WebView JS-interface RCE, deep-link account takeover/IDOR, exported-provider disclosure, JWT weakness, SSRF via image proxy, and purchase race conditions. Each conversation shows hop count, model, and running cost.

The AI agent's exploit chains with verifiable steps
The AI agent's exploit chains, each with verifiable steps and impact.

Using RevDroid — Device tooling

With a device connected over USB or Wi-Fi, the agent unlocks: device info and security posture (bootloader, verified boot, SELinux, debuggable), an installed-apps browser with icons, a live screen view with remote input (tap / swipe / key), and the ability to pull an installed APK straight into a project. Connect over Wi-Fi from the dashboard by entering the device host and port (default 5555).

Feature reference

Local-first analysis

All decompilation and scanning run on the agent. APK bytes never leave your machine.

12-phase static pipeline

Unpack, framework, signing, resources, code, secrets, trackers, files, binaries, APKiD, behaviour, strings — streamed live.

Framework detection

Flutter, React Native, Xamarin, Unity, and native apps, with detected ABIs.

Secret scanning

API keys and credentials across many providers, plus private keys and OAuth tokens.

Manifest review

Debuggable, allowBackup, cleartext, exported components, deep links, network security config.

Exploit-chain tracking

The AI records hypotheses as verifiable, multi-step chains with impact — not flat checklists.

Device control (ADB)

Connect over USB/Wi-Fi, inspect security posture, browse apps, view the live screen, pull APKs.

Live SSE streaming

Every scan phase streams to the UI, backed by an append-only event log that replays on reconnect.

Cost metering

Per-conversation token and cost totals, with cached-token-aware pricing.

Deploying to production

For a hosted deployment, the backend and frontend run in the cloud while each user still runs the agent locally (that is the privacy model — the agent must be on the machine that holds the APK).

  • Backend: deploy to any Node host (Render, Railway, a VPS, etc.). Set all backend variables as real secrets. Point MONGO_URI at a managed MongoDB. Update GOOGLE_CALLBACK_URL and FRONTEND_URL to your production domains and register the callback in the Google console.
  • Frontend: deploy to Vercel or any Next.js host. Set NEXT_PUBLIC_API_URL to your production backend URL.
  • Agent CORS: add your production dashboard origin to the agent's ALLOWED_ORIGINS so the deployed dashboard can reach the local agent.
  • HTTPS note: a browser served over HTTPS talking to a plain-HTTP localhost agent can trigger mixed-content restrictions. See the agent notes for the local-certificate approach.

Troubleshooting

SymptomFix
Backend exits immediately with a JWT_SECRET errorSet a strong JWT_SECRET (≥ 32 chars). Generate one with openssl rand -hex 32.
Dashboard can't reach the agent / pairing failsConfirm the agent is running on 127.0.0.1:8071, the token matches, and your dashboard origin is in the agent's ALLOWED_ORIGINS.
adb not foundInstall Android platform-tools and put adb on PATH, or set ADB_PATH to the full binary path.
Unpack phase failsEnsure a JDK is installed (java -version). apktool and keytool require Java.
Google sign-in failsCheck the OAuth client ID/secret and that GOOGLE_CALLBACK_URL exactly matches an authorized redirect URI in the Google console.
AI chat returns a config errorSet OPENROUTER_API_KEY in backend/.env and restart the backend.
No devices listedRun adb devices in a terminal; authorize the USB debugging prompt on the phone, or connect over Wi-Fi from the dashboard.

Security & responsible use

For authorized security testing only. Use RevDroid solely on applications you own, bug bounty programs you are enrolled in, or intentionally vulnerable / CTF apps. You are responsible for having permission to test any app you analyze.
  • The agent binds to 127.0.0.1 and authenticates every route (except health) with a bearer token stored at mode 600. Do not expose it to your network.
  • Set a unique, strong JWT_SECRET in production; the backend enforces this at startup.
  • Keep your .env files out of source control. The project ships .env.example templates only.
  • APK bytes stay on the machine running the agent; only findings and small code snippets reach the AI provider you configure.

FAQ

Does my APK get uploaded anywhere?

No. Decompilation and scanning run locally through the agent. Only findings and small code snippets are used by the AI layer.

Do I need a paid AI key?

The AI features use an LLM via your own OpenRouter key and incur usage costs. Static analysis works without any key.

Do I need a physical device?

No — you can upload an APK directly. A connected device unlocks pulling installed apps and the device tooling.

Which frameworks are supported?

It detects and adapts to Flutter, React Native, Xamarin, Unity, and native Android apps.

Is iOS supported?

No. RevDroid is Android-specialized by design.

Can I self-host the whole thing?

Yes. You receive full source for all three components and host them yourself. The agent always runs locally on each user's machine.

Support

If you run into a problem not covered here:

  • Re-check the Prerequisites and Troubleshooting sections.
  • Include your Node version (node -v), OS, which component is failing, and any terminal output when you contact support.
  • Support is provided through your CodeCanyon item's Comments tab and the author's support channel listed on the item page.