Device setup
testrelic device setup takes a bare machine to a booted Android emulator — no JDK, no Android Studio required — then device up boots it for WebDriver, Maestro, or adb.
testrelic device setup installs everything Android testing needs — platform tools, the
emulator, a system image, the SDK licenses, and a ready-to-boot AVD — without a JDK or an
Android Studio install. Packages come straight from dl.google.com; nothing is fetched
through sdkmanager itself.
Re-run safe
device setup plans only the gaps: on a bare machine it installs everything, on a partial
SDK it fills in what's missing, and running it again after a successful setup does nothing.
Usage
testrelic device setup # interactive — confirms the ~2 GB download and SDK license
testrelic device setup --yes # non-interactive — required in CI/scripts
testrelic device setup --api 34 # pin the system image's Android API level (default: 34)
testrelic device setup --sdk-root ~/sdk # install somewhere other than the detected/default SDK root
testrelic device setup --json # stream NDJSON progress events, one per lineOnce setup finishes, boot the device it created:
testrelic device up # boots the TestRelic_Device AVD
testrelic device up --serve # boot, then also serve WebDriver on :4723What it installs
| Step | What happens |
|---|---|
| Platform tools | adb and friends. |
| Emulator | The Android emulator binary. |
| System image | Android 14 (API 34) with Google APIs, by default — override with --api. |
| SDK licenses | Written the same way sdkmanager writes them, only after you consent. |
| Virtual device | An AVD named TestRelic_Device, hardened from field use: 4 GB RAM (2 GB causes ANR storms under an API-34 Google-APIs guest), hw.wifi=no (virtual Wi-Fi otherwise blinds --capture-network), 4 CPU cores, keyboard enabled. |
Downloads land in ~/.testrelic/cache/android, keyed by filename — an interrupted run, a
failed extract, or Studio retrying the flow never re-pays the ~1.5 GB fetch. The SDK
installs into $ANDROID_HOME when it's set, or the same platform-default location Android
Studio itself uses, so any later Android Studio install — or any other tool — finds it with
no configuration.
Flags
| Flag | Purpose |
|---|---|
--yes | Consent non-interactively to the download and the Android SDK license. Required when stdin isn't a TTY (CI, scripts, Studio) — setup fails closed without it. |
--sdk-root <path> | Install into this SDK root instead of the detected or default one. |
--api <level> | Android API level for the system image. Defaults to 34. |
--json | Stream one NDJSON SetupEvent per line on stdout, for a script or a UI to render live progress. |
Diagnose before you provision
testrelic device doctor reports exactly what's missing — SDK location, adb/emulator/aapt2,
hypervisor acceleration, and configured AVDs — before you run setup, and confirms what setup
produced afterward.
In Studio
The Live Device pane doubles as the onboarding surface: it probes for a missing SDK, a
missing AVD, or a ready device, and on a bare machine offers Install Android tooling
(~2 GB). That streams device setup --json's events into a step checklist with one
progress bar, then Boot device & serve WebDriver starts the emulator and streams its
screen live — the same pane the Live Browser uses for a
browser. See Live Device.
Next steps
Upload existing reports
Import existing Allure or JUnit test reports into TestRelic Cloud with testrelic upload — a Cloud-only command that uses a tr_live_* ingest key.
Augur — text-to-image evals
Judge your image-generation pipeline's output against approved references, compare multiple models side by side, and ground prompt phrases to image regions — all from testrelic augur.