Loading...
Loading...
Runs automated, non-interactive jobs on remote Android devices with Developer Device Platform (DDP) Device Run using `gcloud beta device-run sessions`: native Android executables or shell scripts (for example CLI tools, custom runners, test harnesses or benchmarks) and Android instrumentation tests, on one or many devices, then waits for completion and collects per-device outputs and logs. Use when running a binary or test suite on remote devices without an interactive connection. Don't use it for interactive device reservations, adb tunnels or screen streaming (use developer-device-platform-basics), or for local devices.
npx skill4agent add google/skills developer-device-platform-device-run[!WARNING] Developer Device Platform (DDP) is currently in Preview. Thecommands might change without notice.gcloud beta device-run
| The user wants to... | Use |
|---|---|
| Run a native binary or shell script on remote devices | This skill ( |
| Run an Android instrumentation test APK on remote devices | This skill ( |
| Reserve a device, connect with adb, stream the screen | |
| Extend or cancel an interactive device lease | |
| Work with a device connected over USB | Neither (not DDP) |
developer-device-platform-basicsdeveloper-device-platform-basicsdeveloper-device-platform-basicsdeveloper-device-platform-basicsgcloud beta device-run ... --helpgcloudbetagcloudgcloud --version
gcloud beta device-run sessions submit android-executable --help >/dev/nullbetagcloud components install betagcloud components update...@...iam.gserviceaccount.comNo service account scopes specified--update-adc--no-launch-browsergcloud auth list --filter=status:ACTIVE --format="value(account)"
gcloud auth login --update-adcexport PROJECT_ID=$(gcloud config get project)
# Only if the user asks to switch:
gcloud config set project PROJECT_IDgcloud billing projects describe "${PROJECT_ID}" \
--format="value(billingEnabled)"gcloud services enable devicerun.googleapis.com --project="${PROJECT_ID}"roles/devicerun.adminroles/serviceusage.serviceUsageConsumerroles/viewerroles/storage.objectViewer--bucket-namegs://${PROJECT_ID}-devicerun:.google--elgoog-devicerunResult filessubmitdescribe--bucket-namegs://gs://<bucket>/automation/--devicefrankel-36--executable--test--target-app--other-files-to-pushgs://automation/inputs/<timestamp>/gs://${PROJECT_ID}--asyncjob-NNNgs://--executable-timeout--instrumentation-timeout5m1m3h--executable-args^SEP^--executable--executable-env-varsexportgs://gs://--labelspurpose=smoke,build=1234devicestreaming.googleapis.comdeviceSessions