List, start, and stop Android emulators (AVDs) and iOS simulators.
Backs mix mob.emulators. Pure-ish — each function shells out to emulator,
adb, or xcrun simctl exactly once and returns a parsed result. UI-shape
decisions (formatting, colors, exit codes) live in the Mix task.
Naming
Android calls them "emulators", iOS calls them "simulators". This module
uses "emulator" for the cross-platform concept (configured-but-runnable
virtual device) and reserves "simulator" for iOS-specific descriptions in
the help text. The struct's :platform field disambiguates.
Summary
Functions
Returns all configured Android AVDs, including whether each is currently
running. Returns {:error, reason} when the Android SDK isn't reachable.
Returns all installed iOS simulators (across runtimes) marked with their
current state. Returns {:error, reason} on a non-macOS host or when
xcrun isn't available.
Starts an Android AVD by name. Returns :ok once the emulator process is
spawned (it boots in the background; adb wait-for-device is the caller's
responsibility if they need to know when it's ready).
Boots an iOS simulator by UDID and brings the Simulator.app to focus. No-op-with-success if the sim is already booted.
Shuts down a running Android emulator by adb serial (e.g. "emulator-5554").
Shuts down a booted iOS simulator by UDID. Pass the literal string "all"
to shut down every booted simulator at once (xcrun simctl shutdown all).
Types
Functions
Returns all configured Android AVDs, including whether each is currently
running. Returns {:error, reason} when the Android SDK isn't reachable.
Returns all installed iOS simulators (across runtimes) marked with their
current state. Returns {:error, reason} on a non-macOS host or when
xcrun isn't available.
Starts an Android AVD by name. Returns :ok once the emulator process is
spawned (it boots in the background; adb wait-for-device is the caller's
responsibility if they need to know when it's ready).
Boots an iOS simulator by UDID and brings the Simulator.app to focus. No-op-with-success if the sim is already booted.
Shuts down a running Android emulator by adb serial (e.g. "emulator-5554").
Shuts down a booted iOS simulator by UDID. Pass the literal string "all"
to shut down every booted simulator at once (xcrun simctl shutdown all).