Skip to content

Android phones and tablets

AutoMobile drives Android devices and emulators through the Android SDK and adb. Install the SDK before you start; the installer reports what is missing.

Get a device

  • Call getAndroid to acquire a device. Pass avdName to boot a named Android Virtual Device, or deviceId for a device that is already running. With neither and no requires, getAndroid returns the running device your session already holds. Otherwise it picks a phone: a running phone emulator first, else it cold-boots a configured phone AVD. requires narrows that phone choice. Only panels above 1, posture, screenRound or vehicle.motion picks another form factor instead. If there is no device to pick, the error tells you to call listDeviceImages and pass one of the names as avdName. See the FAQ.
  • Call listDevices to see devices, and listDeviceImages to see the system images you can boot. See Listing device images.
  • A device your session holds takes calls only from that session. See Device ownership.

When getAndroid fails

  • Right after a cold boot, adb install can fail with no reason while the package manager starts. getAndroid retries that install within automationReadyTimeoutMs. This covers a first install and an upgrade of an older CtrlProxy.
  • If the call still fails after it cold-booted an emulator, the error message ends with deviceLeft and a next step:
  • deviceLeft: shutdown: the call is stopping the emulator it cold-booted.
  • deviceLeft: booted: the emulator is still running.
  • deviceLeft: unknown: the call could not confirm the emulator’s state.
  • A device that was already running before the call is left running, and the error does not add deviceLeft.
  • The next step is to call getAndroid again with the same avdName (or the same arguments when you passed none).

Android-only tools and features

Shared with iOS

Most tools work the same on both platforms. These guides cover both:

The Platforms column in Tools shows which devices each tool drives.

Other Android form factors