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 connectoradb 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._tcpendpoint on the same host andadb connectit, so it shows up as anip:portdevice. - AndroidAutomation
-
DeviceAutomationfor Android emulators and devices through adb:installinstalls,monkeylaunches,input texttypes anduiautomator dumpreads the accessibility tree. - AndroidDeviceService
-
Android emulators and hardware devices via
adband 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 15for an SDKtargetsuch asandroid-35(or35); the API level when the version is not known yet; plainAndroidwithout one. -
parseUiautomatorDump(
String xml, {(int, int)? screen}) → List< UiElement> -
Elements from
uiautomator dumpXML, normalized to thescreensize 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.