Repository navigation
Device Acquire
Forensic acquisition of a live phone into a case directory: volatile state, system state and history, every third-party APK, optionally communications (under mandate) and shared storage, with an evidence bundle hashing every file.
| Requirement | Why |
|---|---|
| Phone connected, USB debugging on, computer authorized | see Connecting a phone |
| Phone unlocked and awake for the whole run | the phone refuses some reads while locked; set the screen timeout to the maximum |
| Battery charged or on charge | a full acquisition takes 5–10 min, more with --storage
|
Disk space: ~1–2 GB (most of it APKs), plus the size of shared storage with --storage
|
the case is written to disk as it goes |
A mandate reference for --mandate and --notification-content
|
see Legal scope |
Someone at the phone for --backup
|
the backup must be confirmed on its screen, with an empty password |
| No root | the agent is installed for a few seconds and removed; on Xiaomi it needs Install via USB and USB debugging (Security settings) (Mi account), otherwise APEX goes on without it |
apex device acquire -o ./case-42 --case-id 2026-0142 --examiner "J. Doe" --seal "SCELLÉ N°1"
apex device acquire --triage -o ./case-42-triage # volatile state only, ≈ 10 s
apex device acquire --mandate "JIRS-2026-17" --storage -o ./case-42
apex device acquire --package com.foo.bar -o ./case-42 # one app only
apex device acquire --no-bugreport --no-logcat --no-usagestats -o ./case-42 # fast| Option | Effect |
|---|---|
-o, --output <DIR> |
case directory (default ./apex_acquire) |
--case-id, --examiner, --case-notes, --seal
|
case metadata, recorded in the manifest, the report and the PV |
--phone-change <TEXT> |
a change you made to the phone, with its time (repeatable): recorded and listed in the PV |
--triage |
volatile state, remote-wipe check and identifiers only (< 1 min); no apps, no history |
--mandate <REF> |
also collect SMS, MMS (+ attachments), call log, calendar, contacts if the phone allows it, and WhatsApp and Signal backups from shared storage; the reference is recorded |
--notification-content |
notifications unredacted (titles, message previews); only under mandate |
--storage |
pull shared storage (/sdcard: photos, videos, downloads, messaging media), without Android/data and Android/obb
|
--backup |
Android backup (bu backup -all -noapk) of the apps that allow it; confirm on the phone with an empty password |
--quick |
shortest time plugged in: APKs hashed on the phone (sha256sum) instead of pulled, except the apps worth a static analysis, which are pulled: not installed from a store, without a launcher icon, or holding accessibility, device admin or notification access. No bugreport, logcat or usage-stats dump (the agent gives usage events and signing certificates). ≈ 40–60 s |
--no-agent |
do not install the APEX agent |
--package <PKG> |
acquire only this app (device state is still collected) |
--no-bugreport |
skip the bugreport (1–5 min, 10–100 MB); loses battery history and some install history |
--no-logcat, --no-usagestats, --no-screenshot
|
skip those artifacts |
--serial, --tcp, --adb-key
|
see Device |
- Clock and battery: the phone's time against the computer's (clock skew), battery level and charging state at reception.
- Remote-wipe check: accounts, device policy, connectivity. A red banner if a find-my-device service, an MDM or a device admin can erase the phone, and whether it is online. See Field procedure.
-
Volatile state: processes with their real executables, network sockets,
/data/local/tmp, a screenshot. - Identity: system properties, package lists, users and profiles, telephony identifiers (IMEI, IMSI, ICCID, line number) through read-only getters, settings.
-
APEX agent (unless
--no-agent): installed, read, uninstalled, ≈ 8 s. See APEX agent. -
History and state (not in triage): Wi-Fi, Bluetooth, app-ops (permission
use), launcher, ~25
dumpsysservices including per-app network traffic and the package manager log, shared-storage file listing, usage stats, logcat, bugreport. -
Under
--mandate: SMS, MMS and their attachments, call log, contacts, calendar, WhatsApp backups (.crypt14/.crypt15) and Signal backups (signal-*.backup) from shared storage. -
--backup,--storageif asked. -
Every third-party APK (all splits) with its
dumpsys package, including apps installed only in another user or profile; with--quick, their SHA-256 computed on the phone (apps/<pkg>/apk_sha256.txt) instead. -
Evidence bundle:
identifiers.json,manifest.json,manifest.json.sha256,audit.jsonl.
The layout is on Case directory.
A live acquisition runs commands, so the phone logs them. Beyond that, APEX
writes in three places, all listed in audit.jsonl and in the manifest's
methodology statement:
- the screenshot, written to
/data/local/tmp/apex_screen.png, pulled, deleted (--no-screenshotavoids it); - the bugreport zip, left in the shell user's bugreports directory
(
--no-bugreportavoids it); - with
--backup,/data/local/tmp/apex_backup.ab, pulled, deleted; - the APEX agent: installed, read, uninstalled. Its steps are listed
in the manifest's
phone_changesand in the PV.
Enabling developer options and USB debugging before the acquisition are your
changes: declare them with --phone-change.
| Mode | Time |
|---|---|
--triage |
≈ 6–10 s |
--quick (agent included) |
≈ 40–60 s |
full, --no-bugreport
|
≈ 1–5 min (APK count and size) |
| full | + 1–5 min for the bugreport |
--storage |
+ ≈ 1 min per few hundred MB |
App-private data (/data/data: WhatsApp, Signal, Telegram databases…) is not
readable without root. It comes from a lab extraction through
apex import. See Communications and app data
for what is reachable live and what needs an extraction.
The suspicious apps (not from a store, hidden, privileged) are pulled and get
the full static analysis; the line of each app says why it was pulled. For the
others, indicator matching still works: APK hashes from the phone, signing
certificates from the agent. Run device scan or a full
acquisition later if you need every APK.
apex verify ./case-42
apex analyze ./case-42 --iocs stalkerware.stix2
apex identifiers ./case-42
apex db ./case-42 # everything in one SQLite fileAPEX · mlab-sh/apex · This wiki is generated from the repository's wiki/ folder: edit it there, not here.
Getting started
On the phone
From an extraction
Analysis
Reporting and procedure
Static analysis
Concepts