Skip to main content

simutil_adb 1.3.0 copy "simutil_adb: ^1.3.0" to clipboard
simutil_adb: ^1.3.0 copied to clipboard

Android emulator and device APIs for SimUtil via adb.

Changelog #

1.3.0 #

  • AndroidAutomation.install runs adb install -r -t and reports the Failure [...] code. Requires simutil_core 1.3.0.
  • ScrcpySession fails a live stream with Device disconnected when the server process exits (device unplugged or adb disconnected).

1.2.0 #

  • ScrcpySession.typeText(text) / pressKey(keycode, metaState:) inject text and Android key codes over the control socket (ScrcpyProtocol.text, ScrcpyProtocol.keycode(..., metaState:)).
  • ScrcpySession options showTouches, stayAwake, turnScreenOff (ScrcpyProtocol.displayPower) and powerOffOnClose.
  • AndroidDeviceService.wipeData deletes an AVD's user data, cache and snapshots. Requires simutil_core 1.2.0.
  • ScrcpySession adds the server's own output to the scrcpy server did not start error (e.g. a version mismatch), and waits up to ~10 s (was ~5 s) for a cold emulator to start the server.

1.1.0 #

  • AndroidDeviceService.adbPath falls back to Homebrew (/opt/homebrew/bin, /usr/local/bin) and winget (%LOCALAPPDATA%\Microsoft\WinGet\Links) installs before bare adb on PATH.
  • ScrcpySession reads video on a worker isolate; attachDecoder(decode, id) / detachDecoder(id) feed a native decoder (a C decode function address) straight from that isolate. Adds the ffi dependency.
  • ScrcpySession asks the encoder for a key frame every second (video_codec_options=i-frame-interval:int=1), so a decoder that dropped frames recovers within a second instead of up to ~10 s.
  • ScrcpySession.press handles DeviceButton.volumeUp / volumeDown (ScrcpyProtocol.keyVolumeUp / keyVolumeDown).
  • AdbWirelessPairing: pairs Android 11+ devices over Wi-Fi and connects them as ip:port (pairAndConnect), including QR pairing (startQr() → QrPairingSession.payload / result()).
  • WifiDiscoveryService.watchConnectDevices() discovers _adb-tls-connect._tcp endpoints.
  • connectDevice / disconnectDevice time out after 15 s and pairDevice after 30 s (interactive priority) instead of waiting forever.
  • launchDevice(headless: true) adds AndroidDeviceService.headlessArgs (-no-window -no-audio -no-boot-anim); flags the caller also passes are not repeated.
  • deleteSimulator deletes an AVD (its .ini and data directory under avdHome).
  • watchDevices() follows adb track-devices (reconnecting when the adb server restarts) and the AVD directory, instead of polling.
  • Device listing (adb devices, emu avd name, -list-avds) runs at CommandPriority.background; launch and emu kill at interactive.
  • ScrcpySession: streams and controls a device through the user's installed scrcpy server (ScrcpyInstall.locate), exposing H.264 access units on video (60 fps by default), with recording to .mp4 (remuxed by ffmpeg when available, else .ts). requestKeyFrame() asks for a fresh key frame (at most once a second; requests in between are deferred, not dropped). Session setup commands run at CommandPriority.interactive.
  • AndroidAutomation.tapElement taps a node at its own pixel center with input tap (works on permission prompts too).
  • AndroidAutomation: relaunches apps (am force-stop, or pm clear with clearState, then monkey), types with input text (ASCII) and reads elements from uiautomator dump (parseUiautomatorDump, normalized to the wm size screen so dialogs and permission prompts map right).
  • Devices carry their Android version in platform: emulators from the AVD .ini target, booted hardware from ro.build.version.release (androidPlatformName maps API levels to versions).

1.0.1 #

  • Windows: resolves adb.exe / emulator.exe and defaults the SDK root to %LOCALAPPDATA%\Android\Sdk. New isWindows test seam on AndroidDeviceService.

1.0.0 #

  • Initial release, extracted from the simutil app.
0
likes
150
points
182
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Android emulator and device APIs for SimUtil via adb.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

ffi, multicast_dns, simutil_core

More

Packages that depend on simutil_adb