Repository navigation
Connecting a Phone
Every apex device … command talks to the phone over ADB (Android Debug
Bridge), as the non-root shell user. Nothing is installed on the phone.
| On the phone | Why |
|---|---|
| Unlocked (the owner's code) | to enable USB debugging and accept the computer's key; Android also refuses some reads while locked |
| Developer options enabled | Settings → About phone → tap Build number (MIUI: MIUI version) 7 times, then enter the code |
| USB debugging on | Settings → System → Developer options → USB debugging (MIUI: Additional settings → Developer options) |
| A data cable | a charge-only cable shows no device at all |
| On the computer | Why |
|---|---|
No adb server running |
it holds the USB interface: adb kill-server
|
| Linux: udev rules installed | see Installation |
Enabling developer options and USB debugging changes the phone's settings: note it in the procès-verbal (see Field procedure).
- Plug the phone in and run any device command, for example
apex device listen. - On the phone, accept Allow USB debugging? and tick Always allow from this computer.
- APEX creates its key at
~/.android/adbkeyon first use (the same path asadb), so the prompt appears only once per phone. If the phone has not answered after a few seconds, APEX says it is waiting.
If the phone asks for a USB mode, choose File transfer. Some phones only show the debugging prompt in that mode.
apex device listen # waits, then prints "Device connected (SERIAL)"
apex device listen --timeout 60 # give up after 60 s (exit code 1)apex device listen prints every connected serial. Pick one with
--serial <SERIAL> on any device command:
apex device acquire --serial LJSKNB6HTKVSOVJF -o ./case-42Without --serial, APEX refuses to guess when more than one phone is plugged in.
Legacy ADB over TCP, unencrypted. Only on a network you control.
- Connect the phone over USB once and switch ADB to TCP with the Android
platform tools:
adb tcpip 5555(APEX has no command for this step), thenadb kill-server. - Unplug, find the phone's IP address (Settings → Wi-Fi → network details).
-
apex device acquire --tcp 192.168.1.20 -o ./case-42(port 5555 by default, orHOST:PORT).
Android 11+ Wireless debugging (pairing code, TLS) is not supported.
--adb-key <PATH> uses another private key, for example a key per examiner
or per case. The phone asks for authorization again for a new key.
- The phone should stay unlocked and awake during an acquisition: set the screen timeout to the maximum, or keep touching it. A locked phone answers most commands but refuses some.
- Keep it charged (an acquisition records the battery level at reception).
- Isolate it from the network as soon as the remote-wipe check allows (see Field procedure): airplane mode, or a Faraday bag with the cable through a filtered port.
See Troubleshooting if the phone is not found or the connection fails.
APEX · 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