Adb Device Manager
Complete reference for device selection, auto-detection, and manual connection via IP address.
DeviceManager Singleton
The single source of truth for which device to target. All ADB commands in the system build their argument list using DeviceManager.instance.adbArgs.
| Property | Type | Description |
|---|---|---|
deviceId | String? | Resolved target: Serial, "ip:port", or "-d" |
isUsb | bool | Indicates if a USB device is currently targeted |
isWifi | bool | Indicates if a Wi-Fi device is connected |
adbArgs | List<String> | Argument list prepended to commands |
Auto-Detection Logic
graph TD
AppLaunch[Application Launched] --> Detect[Auto-Detect Devices]
Detect --> Zero[0 Found]
Detect --> One[1 Found]
Detect --> Many[2+ Found]
Zero --> Picker[Open ADB Manager Dialog]
One --> Start[Target Device Automatically]
Many --> Picker
ADB Manager Dialog
The dialog appears during pre-boot or after a connection error. It provides an immediate list of devices found via adb devices and allows for custom IP entry.
- USB Devices: Shown with specialized icon and serial number.
- Wi-Fi Devices: Identified by port 5555 and IP address.
- Connect via IP: Allows manual port targeting for non-standard configurations.
IP Connection Flow
When typing an IP, the system auto-appends :5555 if no port is specified. Success triggers an immediate Navigator.pop(deviceId) to the boot sequence.