Cloud development

Cloud Workstations in Google Cloud lets you launch a prebuilt Android 17 AAOS SDV development environment in your browser without downloading or compiling a 400 GB AOSP source tree. Using the public prebuilt container and Compute Engine disk image in aaos-artifacts, you can boot a dual-VM Display Safety Cuttlefish digital twin and iterate on SDV service bundles in about 30 minutes.

Before you begin

Review the following scope, hardware, and billing details before you deploy:

  • Supported workflows: Individual developers can provision a personal workstation directly from the prebuilt Android 17 artifacts on this page. For simplicity, the steps below use imperative gcloud commands in Cloud Shell, whereas platform or DevOps teams typically manage workstation infrastructure declaratively (for example, with Terraform and GitOps pipelines; if your organization adopts horizon-sdv, it can provision this workstation infrastructure centrally for your team). Organization administrators setting up shared team configurations, custom source snapshots, or from-scratch container images can proceed to Organization setup.
  • Cloud-only execution and quota: The prebuilt workstation container requires Google Cloud Workstations nested virtualization (n1-standard-32), its companion 1,000 GB regional pd-ssd persistent home disk snapshot, and regional quota in us-central1 or europe-west4 for 32 N1 vCPUs, 2,000 GB of regional SSD persistent disk (SSD_TOTAL_GB, because the 1,000 GB regional home disk is replicated across two zones), and one optional NVIDIA T4 GPU. It doesn't run on local Linux, macOS, or Windows machines. For local or self-managed Linux host builds, see Local development.
  • Included Android 17 artifacts and optional CARLA install: The prebuilt home snapshot includes a synced Android 17 AOSP checkout at ~/Workspace/aaos-26q2, compiled sdv_media_har_cf (in ~/Workspace/aaos-26q2/out, with the high availability renderer (HAR), safety monitor, and SDV Core runtime) and sdv_ivi_cf_ds (in ~/Workspace/aaos-26q2/out-ivi, with AAOS IVI and the DriverUI reference cluster app staged through DriverUIPrebuilt, overriding the default AOSP DriverUIStubApp placeholder) targets, sample service bundles from aaos-sdv-demos (under system/software_defined_vehicle/samples/car_controller), vsidlc, and Android Studio for Platform (ASfP) preconfigured at ~/Workspace/asfp-project. Because DriverUIPrebuilt is already staged in ~/Workspace/aaos-26q2/packages/apps/Car/DriverUIPrebuilt, rebuilding sdv_ivi_cf_ds on the workstation preserves DriverUI (unlike a fresh open-source AOSP checkout, where packages/apps/Car/DriverUIPrebuilt is empty and sdv_ivi_cf_ds builds DriverUIStubApp by default). To respect third-party simulator licensing, the CARLA 3D simulator isn't preinstalled in the image; you can install it on first boot with a single command (install_carla, approximately 10 minutes).
  • Cost controls and ongoing charges: The gcloud configuration on this page sets --pool-size=0 (disabling warm-pool instances while stopped), --idle-timeout=7200 (7,200 seconds, or 2 hours of inactivity before automatic shutdown), and --running-timeout=43200 (43,200 seconds, or 12 hours of maximum continuous session runtime). Stopping the workstation stops VM, GPU, and per-vCPU workstation charges, while the workstation cluster control plane (sdv-cluster), the 1,000 GB two-zone regional pd-ssd home disk (billed at twice the zonal pd-ssd rate), and sdv-android17-home-snapshot continue to accrue charges until deleted. For stop and teardown commands, see Stop or delete resources.

Environment setup

Run all setup commands in Cloud Shell inside a Google Cloud project where you have permissions to enable APIs, create and attach service accounts (roles/iam.serviceAccountUser or roles/owner), and manage Compute Engine and Cloud Workstations resources. One-time project setup takes about 30 minutes total (mostly creating sdv-cluster), while subsequent starts take 3 to 5 minutes.

Set environment variables and enable APIs

  1. Open Cloud Shell in your Google Cloud project.
  2. Set your project ID, region, temporary seed-disk zone, and two workstation replica zones, and enable the Compute Engine, IAM, and Cloud Workstations APIs. Public container replicas exist only in us-central1 and europe-west4, so set REGION to one of those two regions, set ZONE to any zone in REGION (used only for the temporary sdv-seed-disk), and set REPLICA_ZONES to two zones in REGION with NVIDIA T4 GPU availability (for example, us-central1-a,us-central1-b or europe-west4-a,europe-west4-b). For more information, see GPU availability by region and zone:

    export PROJECT_ID=YOUR_GCP_PROJECT_ID
    export REGION=us-central1
    export ZONE=us-central1-a
    export REPLICA_ZONES=us-central1-a,us-central1-b
    
    gcloud config set project "${PROJECT_ID}"
    gcloud services enable compute.googleapis.com iam.googleapis.com \
      workstations.googleapis.com
    

Seed a project-local home snapshot

Cloud Workstations persistent home directories initialize from a project-local Compute Engine snapshot (--pd-source-snapshot). Create a temporary seed disk from the pinned Android 17 image (sdv-asfp-public-img-20261105-094632) in aaos-artifacts, snapshot it into regional storage (--storage-location) alongside your workstation cluster, and delete the temporary disk:

gcloud compute disks create sdv-seed-disk \
  --zone="${ZONE}" \
  --image-project="aaos-artifacts" \
  --image="sdv-asfp-public-img-20261105-094632" \
  --type="pd-ssd"

gcloud compute snapshots create sdv-android17-home-snapshot \
  --source-disk="sdv-seed-disk" \
  --source-disk-zone="${ZONE}" \
  --storage-location="${REGION}"

gcloud compute disks delete sdv-seed-disk \
  --zone="${ZONE}" \
  --quiet

This step completes in about 4 minutes.

Deploy the workstation resources

  1. Create a dedicated VM service account for the workstation and grant logging and monitoring write roles. Because aaos-artifacts grants read access to allAuthenticatedUsers, attaching a service account lets Cloud Workstations authenticate container pulls automatically without cross-project IAM requests:

    gcloud iam service-accounts create sdv-ws-runner \
      --display-name="AAOS SDV Workstation Runner"
    
    gcloud projects add-iam-policy-binding "${PROJECT_ID}" \
      --member="serviceAccount:sdv-ws-runner@${PROJECT_ID}.iam.gserviceaccount.com" \
      --role="roles/logging.logWriter"
    
    gcloud projects add-iam-policy-binding "${PROJECT_ID}" \
      --member="serviceAccount:sdv-ws-runner@${PROJECT_ID}.iam.gserviceaccount.com" \
      --role="roles/monitoring.metricWriter"
    
  2. Create the workstation cluster (takes about 15 to 20 minutes once per project and region):

    gcloud workstations clusters create sdv-cluster \
      --region="${REGION}"
    
  3. Create the workstation configuration and sdv-workstation instance using the pinned Android 17 container (sdv-asfp-public:20261105-094632) and your sdv-android17-home-snapshot:

    gcloud workstations configs create sdv-android17-config \
      --cluster="sdv-cluster" \
      --region="${REGION}" \
      --replica-zones="${REPLICA_ZONES}" \
      --machine-type="n1-standard-32" \
      --accelerator-type="nvidia-tesla-t4" \
      --accelerator-count=1 \
      --enable-nested-virtualization \
      --pool-size=0 \
      --idle-timeout=7200 \
      --running-timeout=43200 \
      --service-account="sdv-ws-runner@${PROJECT_ID}.iam.gserviceaccount.com" \
      --container-custom-image="${REGION}-docker.pkg.dev/aaos-artifacts/sdv-images/sdv-asfp-public:20261105-094632" \
      --pd-disk-type="pd-ssd" \
      --pd-source-snapshot="projects/${PROJECT_ID}/global/snapshots/sdv-android17-home-snapshot"
    
    gcloud workstations create sdv-workstation \
      --cluster="sdv-cluster" \
      --config="sdv-android17-config" \
      --region="${REGION}"
    

Use Cloud Workstations

Launch the remote desktop, start the dual-VM simulation, and deploy service bundle changes.

Launch the workstation

  1. In the Google Cloud console search bar, enter Cloud Workstations and select Cloud Workstations.
  2. In the navigation menu, click Workstations.
  3. Locate sdv-workstation and click Start in the Quick actions column. Starting a stopped workstation takes about 3 to 5 minutes.
  4. After the status changes to Running, click Launch to open the Linux remote desktop in a new browser tab. If a connection error appears while the desktop service initializes, wait 30 seconds and refresh the tab.

Run the dual-VM simulation and CARLA

Start the Cuttlefish virtual devices (and optional CARLA simulator) before opening Android Studio for Platform so the IDE window doesn't cover the cluster displays and its JVM heap doesn't contend with initial boot:

  1. Open a terminal in the remote desktop and boot the dual-VM Display Safety Cuttlefish setup (vm0 running sdv_media_har_cf on ADB serial 0.0.0.0:6520 and vm1 running sdv_ivi_cf_ds on ADB serial 0.0.0.0:6521; run clear_2vm later if you want to stop and reset both instances):

    launch_2vm
    
  2. Open the Cuttlefish web display viewer in Chrome:

    visualize_cvd
    

    Chrome displays the AAOS IVI screen and the composited HAR and DriverUI instrument cluster side by side by default. If the displays appear stacked vertically, click the layout toggle icon in the top-right corner of the Cuttlefish web UI.

  3. (Optional) To stream live vehicle speed, RPM, and day-to-night lighting signals from the CARLA 3D simulator over SOME/IP, open a second terminal and install CARLA once onto your persistent home disk (takes about 10 minutes):

    install_carla
    
  4. After installation finishes, start CARLA and arrange the CARLA and Chrome windows side by side to observe live cluster updates:

    launch_carla
    

Modify and deploy SDV service bundles

Once the virtual devices are running, you can iterate on Rust or C++ service bundles using either ASfP or command-line tools:

  • In ASfP: Open a terminal and run asfp. ASfP opens the preconfigured ~/Workspace/asfp-project workspace on services/AirbagTester/src/main.rs (under system/software_defined_vehicle/samples/car_controller/) from the Google Automotive Partner Bootcamp (GAPB) demo bundle, with the Deploy com.android.sdv.sample.gapb run configuration selected. In the top toolbar, select Google Software-Defined Vehicle Core in the device target menu (because two Cuttlefish VMs are running), and click the green Run button next to Deploy com.android.sdv.sample.gapb to rebuild and deploy an updated APEX in under a minute. For more information, see Set up an IDE for SDV development.
  • From the command line or AI coding assistants: Run the following steps from the prebuilt AOSP checkout at ~/Workspace/aaos-26q2:

    1. Select the precompiled build environment for your target VM so Soong reuses its existing output directory (lunch_media selects sdv_media_har_cf with default out/ for vm0, and lunch_ivi selects sdv_ivi_cf_ds with OUT_DIR=out-ivi for vm1; if configuring a shell manually without these workstation helpers, export OUT_DIR before running source build/envsetup.sh and lunch):

      cd ~/Workspace/aaos-26q2
      lunch_media
      
    2. Edit your service bundle source (for example, uncomment the publish loop in services/AirbagTester/src/main.rs under system/software_defined_vehicle/samples/car_controller/), increment "version" in its apex/apex_manifest.json (for example, from 1 to 2), and build only the APEX module:

      m com.android.sdv.sample.gapb
      
    3. Stage the rebuilt .apex onto the matching Cuttlefish device serial and reboot to activate it:

      • On vm0 (sdv_media_har_cf or sdv_core_cf, serial 0.0.0.0:6520): Push $OUT/product/apex/<module>.apex to /data/mydir/ and stage it with sdv_update_manager_client:

        adb -s 0.0.0.0:6520 root && adb -s 0.0.0.0:6520 wait-for-device
        adb -s 0.0.0.0:6520 shell mkdir -p /data/mydir
        adb -s 0.0.0.0:6520 push \
          "$OUT/product/apex/com.android.sdv.sample.gapb.apex" /data/mydir/
        adb -s 0.0.0.0:6520 shell \
          /apex/com.android.sdv.sample.update_manager.client/bin/sdv_update_manager_client \
          prepare service-bundle --boot_attempts 2 \
          --apex_path /data/mydir/com.android.sdv.sample.gapb.apex
        adb -s 0.0.0.0:6520 shell \
          /apex/com.android.sdv.sample.update_manager.client/bin/sdv_update_manager_client \
          activate
        adb -s 0.0.0.0:6520 reboot
        

        After vm0 reboots, wait for ADB and finalize the staged update:

        adb -s 0.0.0.0:6520 wait-for-device && \
          adb -s 0.0.0.0:6520 root && \
          adb -s 0.0.0.0:6520 wait-for-device
        adb -s 0.0.0.0:6520 shell \
          /apex/com.android.sdv.sample.update_manager.client/bin/sdv_update_manager_client \
          status
        adb -s 0.0.0.0:6520 shell \
          /apex/com.android.sdv.sample.update_manager.client/bin/sdv_update_manager_client \
          commit
        
      • On vm1 (sdv_ivi_cf_ds, serial 0.0.0.0:6521): Run lunch_ivi first so $OUT points at out-ivi/, build your module (m <module_name>), stage the updatable IVI APEX from its target partition directory (for example, $OUT/vendor/apex/ for vendor APEXes such as com.oem.sdv.authz, or $OUT/product/apex/ for product APEXes) with adb -s 0.0.0.0:6521 install --staged "$OUT/<partition>/apex/<module_name>.apex", and reboot with adb -s 0.0.0.0:6521 reboot (or use the workstation wrapper update_apex --vm ivi <module_name>).

    For AI-assisted editing in Antigravity CLI (agy) or other coding agents that read AGENTS.md, copy the Android 17 AGENTS.md context templates into your module directory. For more information, see Fast service bundle updates during development and Add SDV context for AI assistants.

Clipboard access

The remote desktop streams over Selkies WebRTC and syncs with your browser clipboard. Grant clipboard permission in your browser if prompted, and then use standard copy and paste shortcuts (or Ctrl+Shift+C, Ctrl+Shift+V, or right-click Paste inside the Linux terminal) to transfer text between your local machine and the workstation. If your browser blocks automatic clipboard sync, open the Selkies sidebar from the left edge of the viewport to copy and paste text manually.

Desktop navigation and applications

The workstation runs a lightweight Openbox and tint2 desktop rather than GNOME, with Antigravity IDE snapped to the left side of the screen and an initial terminal window open on the right. To open additional terminals or applications, right-click an empty area of the desktop (for example, select Terminal emulator), switch windows from the tint2 panel bar, or launch tools from the terminal (asfp, visualize_cvd, or antigravity-ide).

Stop or delete resources

Stop your workstation after each session to pause VM and GPU compute billing, or delete all provisioned resources when you finish your evaluation:

  • Stop the workstation between sessions (preserves /home): In the Google Cloud console, open Cloud Workstations > Workstations, locate sdv-workstation, and click Stop under Quick actions (or set your project and region and run gcloud workstations stop in Cloud Shell):

    export PROJECT_ID=YOUR_GCP_PROJECT_ID
    export REGION=us-central1
    
    gcloud config set project "${PROJECT_ID}"
    gcloud workstations stop sdv-workstation \
      --cluster="sdv-cluster" \
      --config="sdv-android17-config" \
      --region="${REGION}"
    

    With --pool-size=0, stopping sdv-workstation stops Compute Engine VM, NVIDIA T4 GPU, and per-vCPU workstation management charges. The workstation cluster control plane (sdv-cluster), the workstation's 1,000 GB two-zone regional pd-ssd home disk (billed at twice the zonal pd-ssd rate), and sdv-android17-home-snapshot continue to incur charges until you delete them.

  • Delete all evaluation resources (stops all charges): When you no longer need the workstation or its /home files, run the following commands in Cloud Shell (because sdv-android17-config uses the default DELETE persistent disk reclaim policy, deleting sdv-workstation automatically deletes its 1,000 GB regional pd-ssd home disk):

    export PROJECT_ID=YOUR_GCP_PROJECT_ID
    export REGION=us-central1
    
    gcloud config set project "${PROJECT_ID}"
    gcloud workstations delete sdv-workstation \
      --cluster="sdv-cluster" \
      --config="sdv-android17-config" \
      --region="${REGION}" \
      --quiet
    
    gcloud workstations configs delete sdv-android17-config \
      --cluster="sdv-cluster" \
      --region="${REGION}" \
      --quiet
    
    gcloud workstations clusters delete sdv-cluster \
      --region="${REGION}" \
      --quiet
    
    gcloud compute snapshots delete sdv-android17-home-snapshot \
      --quiet
    
    gcloud iam service-accounts delete \
      "sdv-ws-runner@${PROJECT_ID}.iam.gserviceaccount.com" \
      --quiet
    

    For more information, see Delete resources.

Next steps

Continue exploring AAOS SDV based on your role: