Skip to content

Getting Started

Sam MG Harish edited this page Oct 15, 2026 · 2 revisions

Getting started

Starting the server

lu77U-MobileSec

Starts uvicorn on 127.0.0.1 and opens the dashboard in the default browser after a short delay.

Flag Effect
-v, --version Print version and exit
-V, --verbose Stream verbose analysis logs to the terminal, enable uvicorn access logs, keep intermediate scan artifacts on disk
--port N Bind a specific port (hidden from -h)
--no-browser Do not open a browser (hidden from -h)

-V changes behaviour beyond logging: the decompiled/extracted tree, the copied APK, and provider request/response and per-call metrics logs are kept in the scan folder instead of being deleted, and scan.log is written. Verbose output narrates every file the engine reads, hundreds of megabytes on a large app, so it is opt-in.

With -V, the complete log survives in the UI and at GET /api/scans/{id}/logs even for a scan that ran in a previous server process. Without it, only the WebSocket's bounded in-memory backlog exists.

Access logs for GET /api/status are filtered out, since the dashboard polls it every few seconds.

Required settings

Open Settings and set:

  1. JADX path. The absolute path to the jadx executable, e.g. /opt/homebrew/bin/jadx. Checked for existence, not executability.
  2. An AI provider. Pick the active provider, add at least one API key (optionally with a label, such as the account it belongs to), choose a model. Use Test connection before starting a scan.

POST /api/scans returns HTTP 400 with the current status object until both are satisfied. Flutter/React Native/Xamarin tool paths and the Ghidra path are optional and block nothing; see Configuration.

Optional settings worth knowing:

Setting Default Effect
Output directory ~/Documents/lu77U-MobileSec Where scan folders are written
Agent budget: steps per region 40 Turns each code region's agent may take. 0 = unbounded
Agent budget: minutes 45 Wall clock across the whole agent phase. 0 = unbounded
Agent budget: review requests 40 Requests the file review after the agents may make (max_review_parts; set in settings.json or through the API, not on the Settings page). 0 = unbounded
Max concurrent requests 2 per provider In-flight model calls. Lower it for a local Ollama, raise it for an account that can take it
Auto-resume on Re-queue scans interrupted by a server restart
Dynamic verification on Run phase 2 against a connected device when one is available
Agent memory on Pass phase 1's transcript into phase 2 as extra context
PDF generation on Offer PDF export. Turn off on a host without WeasyPrint or Edge

Multiple API keys per provider are supported. When one is exhausted mid-scan the provider rotates to the next instead of failing. Give each key a label, such as abc@gmail.com, to tell them apart: type it beside the key when adding it, or use the tag button on a stored key to add or change one later. Labels are shown only on the Settings page.

Running a scan

Two ways, both POST /api/scans:

  • Upload an .apk through the dashboard.
  • Give a local path. It must resolve inside your home directory and end in .apk. It is copied into the scan folder rather than analyzed in place.

The scan runs on a background daemon thread. Up to two scans run at once; further scans wait on a semaphore. Progress, log lines and status changes stream over a WebSocket, and every event is buffered (up to 3000 per scan) so a page reload replays the history; the complete log is also on disk.

Pausing and resuming

Action Result
Pause The worker stops at its next checkpoint and keeps everything. status: "paused", pause_reason: "user"
Resume The scan re-queues and continues from checkpoint/, skipping completed stages and regions that already reported
Stop Terminal. A partial result with the findings gathered so far is still stored (not scored)

A scan can also pause itself. When every key in the active provider's pool is out of quota, it stops with pause_reason: "provider_quota" rather than failing, keeps its result so far, and records resume_after five hours ahead. When the provider cannot be reached at all (no network, or its host is down), it stops with pause_reason: "provider_unreachable" and resume_after ten minutes ahead. With Auto-resume on, the server checks every five minutes and resumes it once that time has passed (up to 20 such resumes); you can also add a key, reconnect, and resume it yourself straight away.

The expensive part of a scan is the agent phase: several regions, one model call per turn, tens of minutes of wall clock. Pause and resume exist so that work is not lost.

If the server dies mid-scan (Ctrl+C, crash, OOM), the next startup marks that scan paused with pause_reason: "interrupted" when a usable checkpoint exists, and re-queues it automatically if Auto-resume is on. A scan that keeps being interrupted is left paused after a few attempts rather than looping.

A scan can also be stopped with POST /api/scans/{id}/stop. Cancellation is cooperative: the worker checks a flag at each progress checkpoint and raises ScanCancelled, which unwinds the pipeline and stops frida-server if it was started. Deleting a running scan cancels it, waits up to 10 seconds, then removes the folder.

What you get

Each scan produces lu77U-MobileSec-<apk-stem>-<timestamp> under the output directory:

File Contents
meta.json Status, timings, phase, progress, summary (counts by severity, score, grade, package, framework)
result.json The full result the UI renders and the reports are built from
scan.log The dashboard log feed, one <timestamp><TAB><message> line each. Verbose runs only
checkpoint/ Resume state, present only while the scan is running or paused
<apk-stem>_analysis-<timestamp>.json The engine's own export

With -V, the folder also keeps scan.log, the decompiled/extracted tree, the copied APK, and provider logs.

Reports are generated on demand from result.json at GET /api/scans/{id}/report/{json|html|pdf}. Nothing is pre-rendered, so all three formats are always offered and the HTML always matches the current stored result.

Reading the result

  • Security score and grade. Exponential decay over severity-weighted findings, so more findings always score strictly worse. weighted_finding_count is the uncompressed number to compare two scans with. See Reports.
  • Coverage notices. If the AI phase stopped early (time budget, step budget, provider quota) the report says so at the top and names the reason. Scanner findings are complete either way.
  • Gate results. Every finding carries why it sits where it does. Nothing is deleted; a finding that failed a gate is demoted, labelled, and excluded from the score. See Validation and chains.

Adding a device for dynamic verification

  1. Start an emulator or attach a device; confirm adb devices lists it.
  2. Root matters. Frida injection and CA installation both need it. Without root, phase 2 still runs but is limited to unprivileged adb commands.
  3. In the dashboard, run the per-device checks. These perform the real operations a scan performs (Frida push, start and frida-ps verification; a full HTTPS interception round trip including CA install), so they take several seconds and mean the same thing a green check in a finished scan means.

During a scan the device is chosen automatically: emulators are preferred over physical devices, first match wins. With no device, phase 2 is skipped and the reason is recorded in the result.

With a device attached, a scan installs the APK - or reuses the copy already on the device when its version and SHA-256 match - proves what it can of the static findings, then runs the on-device session: environment checks and a short UI exploration loop. Both parts spend model calls per step, so expect a scan to take noticeably longer than a static-only one.

Clone this wiki locally