simutil_adb library

Android emulator and device APIs for SimUtil via adb.

Lists AVDs and hardware, launches the emulator, and handles wireless adb connect / adb pair, and streams/controls devices through scrcpy (ScrcpySession).

import 'package:simutil_adb/simutil_adb.dart';
import 'package:simutil_core/simutil_core.dart';

final adb = AndroidDeviceService(CommandExec());
final avds = await adb.getSimulators();

Classes

AdbConnectResult
Result of adb connect or adb pair.
AdbWirelessPairing
Pairs and connects Android 11+ devices over Wi-Fi (wireless debugging) the way Android Studio does: adb pair, then find the phone's _adb-tls-connect._tcp endpoint on the same host and adb connect it, so it shows up as an ip:port device.
AndroidAutomation
DeviceAutomation for Android emulators and devices through adb: install installs, monkey launches, input text types and uiautomator dump reads the accessibility tree.
AndroidDeviceService
Android emulators and hardware devices via adb and the SDK emulator.
LogcatHelper
Parsing, filtering, and path detection for Android logcat lines.
MdnsWifiDiscoveryService
mDNS implementation of WifiDiscoveryService.
QrPairingSession
One QR pairing attempt: the phone scans payload in Developer options › Wireless debugging › Pair device with QR code, then advertises a pairing endpoint named serviceName.
ScrcpyInstall
The user's scrcpy install: the server jar and the version it expects.
ScrcpySession
Streams and controls an Android device with the user's scrcpy server.
WifiDiscoveryService
Discovers ADB wireless pairing endpoints on the local network.
WifiPairingDevice
An ADB wireless pairing endpoint discovered via mDNS.
WirelessConnectRequest
User-supplied host (and optional pairing code) for wireless ADB.
WirelessPairingInfo
Wireless debugging details for an Android 11+ device.

Enums

AndroidQuickLaunchOption
Preset extra args for launching an Android emulator.
LogcatLevel
Parsed Android log severity levels.

Functions

androidPlatformName(String? target) → String
Android 15 for an SDK target such as android-35 (or 35); the API level when the version is not known yet; plain Android without one.
parseUiautomatorDump(String xml, {(int, int)? screen}) → List<UiElement>
Elements from uiautomator dump XML, normalized to the screen size in portrait pixels (swapped when the dump is rotated). Without it the root node's bounds stand in, which is only right when the top window fills the screen (a dialog or permission prompt does not). Nodes without label, text or id are dropped.

Typedefs

MdnsClientFactory = MDnsClient Function()
Builds an MDnsClient, used to inject fakes in tests.