- NAME
-
- gcloud alpha device-run sessions submit android-executable - submit a Device Run session with an Android executable job
- SYNOPSIS
-
-
gcloud alpha device-run sessions submit android-executable--device=[DEVICE,…]--executable=EXECUTABLE_PATH[--async] [--bucket-name=BUCKET_NAME] [--bugreport=BUGREPORT] [--coordinates=LATITUDE,LONGITUDE] [--dumpsys=DUMPSYS] [--executable-args=[ARG,…]] [--executable-env-vars=[KEY=VALUE,…]] [--executable-timeout=EXECUTABLE_TIMEOUT] [--flaky-test-attempts=FLAKY_TEST_ATTEMPTS] [--labels=[KEY=VALUE,…]] [--locale=LOCALE] [--location=LOCATION] [--orientation=ORIENTATION] [--other-files-to-push=[SOURCE=DEST,…]] [--paths-to-pull=[DEVICE_PATH,…]] [--video=VIDEO] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(ALPHA)Submit a Device Run session with an Android executable job. - EXAMPLES
-
To submit an Android executable session on a device with ID
my-device-id, run:gcloud alpha device-run sessions submit android-executable --device=my-device-id --executable=gs://my-bucket/my_executable --executable-args="--flag1=value1,--flag2=value2" --bucket-name=my-bucketTo submit an Android executable session asynchronously without waiting for it to complete, run:
gcloud alpha device-run sessions submit android-executable --device=my-device-id --executable=gs://my-bucket/my_executable --bucket-name=my-bucket --async - REQUIRED FLAGS
-
--device=[DEVICE,…]- Id of the device type to run the executable on. Can be repeated to specify multiple device types. A job will be created for each specified device type.
--executable=EXECUTABLE_PATH-
The path to the Android executable to run. Supports both Google Cloud Storage
(
gs://…) paths and local filesystem paths. Any local file will be uploaded to Google Cloud Storage prior to execution.
- OPTIONAL FLAGS
-
--async- Return immediately, without waiting for the operation in progress to complete.
--bucket-name=BUCKET_NAME-
The name of a Google Cloud Storage bucket to store artifacts, including local
input files and output files. If not specified, a default bucket named
gs://[PROJECT_ID]-devicerunwill be used or created.A bucket named explicitly with this flag must already exist; only the default bucket is created automatically. This flag accepts a bucket name only, without a
gs://scheme or a path.The Google Cloud Storage bucket layout will be structured as follows:
-
gs://{bucket-name}/automation/
-
inputs/
-
2026-05-29_10:13.026220_JZTM/
- my_executable
- …
-
2026-05-29_10:13.026220_JZTM/
-
sessions/
-
my-session-id1/
-
job-000/
-
execution-000/
- output.log
- …
-
execution-000/
-
job-000/
-
my-session-id1/
-
inputs/
-
gs://{bucket-name}/automation/
--bugreport=BUGREPORT-
Specify when to collect bugreport from the device.
BUGREPORTmust be one of:always,on-failure. --coordinates=LATITUDE,LONGITUDE- Specify the mock location coordinates (latitude and longitude) to set on the device before running the test. The format is latitude,longitude (e.g., 37.4220,-122.0841). Latitude must be in the range [-90.0, 90.0] and longitude must be in the range [-180.0, 180.0].
--dumpsys=DUMPSYS-
Specify when to collect dumpsys logs from the device.
DUMPSYSmust be one of:always,on-failure. --executable-args=[ARG,…]-
Arguments to pass to the executable when executing on the device. Can be
specified as a comma-separated list or by repeating the flag. Each element
becomes one argument, so a space-separated command line must be rewritten in
comma-separated form, for example
--executable-args="--input=a.tflite,--threads=4". To pass an argument that itself contains a comma, prefix the value with^SEP^to choose a different separator, for example--executable-args="^;^--shape=1,224,224,3;--threads=4". --executable-env-vars=[KEY=VALUE,…]- A dictionary of environment variables to set for the executable process on the device.
--executable-timeout=EXECUTABLE_TIMEOUT-
Specify the maximum duration allowed for the executable to run (e.g.,
10m,15m,1h). The valid range is1mto3h. If not specified, defaults to5m. It does not include any time necessary to prepare and clean up the target device. --flaky-test-attempts=FLAKY_TEST_ATTEMPTS- Specify the maximum number of execution attempts per job to handle flakiness. If not specified, defaults to 1.
--labels=[KEY=VALUE,…]- A dictionary of user-defined key-value labels to attach to the session.
--locale=LOCALE- Locale code to set on the device for the execution.
-
Location resource - Location to submit session. This represents a Cloud
resource. (NOTE) Some attributes are not given arguments in this group but can
be set in other ways.
To set the
projectattribute:-
provide the argument
--locationon the command line with a fully specified name;-
The default is
globalwith a fully specified name;-
provide the argument
--projecton the command line;-
set the property
core/project.
-
set the property
-
provide the argument
-
The default is
-
provide the argument
--location=LOCATION-
ID of the location or fully qualified identifier for the location.
To set the
locationattribute:-
provide the argument
--locationon the command line;-
The default is
global.
-
The default is
-
provide the argument
--orientation=ORIENTATION-
Orientation of the device for the execution.
ORIENTATIONmust be one of:portrait,landscape. --other-files-to-push=[SOURCE=DEST,…]- A dictionary of additional files to be pushed to the device before running the executable. The key is the source path of the file (supports both Google Cloud Storage and local paths; local files will be uploaded to Google Cloud Storage prior to execution), and the value is the destination path on the device.
--paths-to-pull=[DEVICE_PATH,…]- A list of file or directory paths to pull from the device following execution completion.
--video=VIDEO-
Specify when to record video of the device screen during the run. Accepted
values are
alwaysoron-failure.VIDEOmust be one of:always,on-failure.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.
gcloud alpha device-run sessions submit android-executable
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-09-22 UTC.