Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
---
title: Set up Google Developer Device Platform
description: Understand DDP's device catalog, automation, streaming, and agent workflows, then configure the project and connection tools.
weight: 2
layout: learningpathall
---

## About the platform

Google Developer Device Platform (DDP) gives you access to real Android devices through Google Cloud, without buying and maintaining your own device farm. You can try a new feature across different phone models and Android versions, compare its performance, and check how games and other graphics applications look and respond on each device.

Google's [DDP agent skill](https://docs.cloud.google.com/developer-device-platform/agent-skill) lets you describe that work in natural language. Your coding agent can select a device configuration, reserve a phone, connect through Android Debug Bridge (ADB), and install the tools your experiment needs. It handles the commands and connection details while you choose what to test and approve access and spending.

The agent sends experiment commands to the remote phone, where they run on real hardware. It can inspect the screen, interact with your app, and collect screenshots and measurements for you to review.

The Device Catalog helps you or your agent find an available device and confirm streaming support. Device Streaming provides the interactive connection, and Device Run supports automated tests and executables. See the [DDP overview](https://docs.cloud.google.com/developer-device-platform/overview) for more about these capabilities.

You'll prepare your workstation and apply this workflow to a small TinyStories experiment on a remote Pixel 11. The agent checks Arm SVE2 support, compares a CPU baseline with an optimized kernel path, and reports the measured performance.

## Know which tools run where

Your development computer runs the coding agent, Google's DDP skill, and the Google Cloud CLI. Python and ADB keep it connected to the phone, and scrcpy opens the phone's screen in a desktop window. Screenshots, logs, and the final report are saved on your computer.

The remote Pixel does the model work. Inside Termux, an Android terminal environment, the agent downloads llama.cpp and the TinyStories model, builds the code with Clang, checks the phone's Arm features, and runs the benchmark.

## Check and install the local tools

With the Google Cloud CLI already installed, check the other tools in the terminal your coding agent will use:

```bash
python3 --version
node --version
npm --version
npx --version
curl --version
adb version
```

You need Python 3.10 or later, a supported Node.js LTS release with npm and npx, curl, and Android platform-tools (`adb`). Python runs Google's ADB forwarder, npx installs the agent skill, curl downloads files, and ADB runs commands on the remote phone.

If a command isn't found or the version is too old, use the instructions for your operating system below. Run the installation steps only for the tools you need. A full Android Studio installation or host NDK isn't required.

{{< tabpane-normal >}}
{{< tab header="Linux (Ubuntu 26.04)" >}}

Install Python with virtual-environment support, curl, and ADB. Git is used by the Node Version Manager and scrcpy installation steps:

```bash
sudo apt update
sudo apt install -y python3 python3-venv curl adb ca-certificates git
```

If you need Node.js, install [Node Version Manager (nvm)](https://github.com/nvm-sh/nvm#installing-and-updating), load it into this terminal, and install the current LTS release. This also installs npm and npx:

```bash
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
. "$NVM_DIR/nvm.sh"
nvm install --lts
```

On other Linux distributions, install the equivalent Python, virtual-environment, curl, and ADB packages with your distribution's package manager.

{{< /tab >}}
{{< tab header="macOS" >}}

Use [Homebrew](https://brew.sh/) to install any missing tools. If Homebrew isn't installed, follow its installation instructions first and complete the steps it prints to add `brew` to your `PATH`.

Install Python, Node.js (which includes npm and npx), and curl:

```bash
brew install python node curl
```

Install Android platform-tools to provide ADB:

```bash
brew install --cask android-platform-tools
```

{{< /tab >}}
{{< /tabpane-normal >}}

Repeat the version checks after installation. Each command should print a version and exit successfully. If you installed Node.js with nvm, restart your coding agent from a terminal that can find `node`, `npm`, and `npx`.

DDP's CLI commands use the beta component. Install it before continuing:

```bash
gcloud components install beta
```

If your package-managed CLI disables the component manager, follow [Google's component installation instructions](https://docs.cloud.google.com/sdk/docs/components) for your installation method.

## Install scrcpy to view and control the phone

[scrcpy](https://github.com/Genymobile/scrcpy) displays an Android device in a desktop window and lets you control it with your keyboard and mouse. Install it on your development computer before reserving a phone. Use a local desktop session so the viewer can open a window.

{{< tabpane-normal >}}
{{< tab header="Linux (Ubuntu 26.04)" >}}

The upstream project marks Ubuntu's packaged scrcpy version as obsolete. The following commands build scrcpy 5.0.1 using its [upstream Linux installation procedure](https://github.com/Genymobile/scrcpy/blob/v5.0.1/doc/linux.md). These commands use Ubuntu 26.04, which provides the required SDL3 packages for Arm64 and x86-64 hosts. For another distribution or release, follow the upstream instructions for its dependencies.

Install the viewer's runtime and build dependencies:

```bash
sudo apt update
sudo apt install -y ffmpeg libsdl3-0 adb wget va-driver-all \
gcc git pkg-config meson ninja-build libsdl3-dev \
libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \
libswresample-dev libusb-1.0-0 libusb-1.0-0-dev libv4l-dev libdrm-dev
```

Clone the release into a dedicated directory and run its installer. The script downloads and verifies a prebuilt Android server, builds the desktop client, and uses `sudo` to install it:

```bash
mkdir -p "$HOME/ddp-tools"
git clone --branch v5.0.1 --depth 1 https://github.com/Genymobile/scrcpy.git "$HOME/ddp-tools/scrcpy"
cd "$HOME/ddp-tools/scrcpy"
./install_release.sh
```

{{< /tab >}}
{{< tab header="macOS" >}}

Install the viewer using the [upstream Homebrew instructions](https://github.com/Genymobile/scrcpy/blob/master/doc/macos.md). It uses the ADB installation from the previous section:

```bash
brew install scrcpy
```

{{< /tab >}}
{{< /tabpane-normal >}}

Confirm that the viewer is available:

```bash
scrcpy --version
```

You'll open the viewer after the agent connects to the reserved phone and returns its ADB serial.

## Create the agent workspace

Create a directory for the agent and evidence:

```bash
mkdir -p "$HOME/ddp-first-device/results"
cd "$HOME/ddp-first-device"
```

For a concrete agent example, use [Google Antigravity](/install-guides/antigravity/), which is named in [Google's DDP agent documentation](https://docs.cloud.google.com/developer-device-platform/agent-skill). Start it in this directory so the agent can run the local tools, install the project skill, and save screenshots and reports under `results/`.

## Prepare the Google Cloud project

Using the Google account associated with your CLI setup, open the [Google Cloud console](https://console.cloud.google.com/) and select a development project with billing enabled.

{{% notice Note %}}
DDP Device Streaming requires project access beyond signing in to Google Cloud. Before reserving a phone, confirm that your account has the roles in [Google's DDP quickstart](https://docs.cloud.google.com/developer-device-platform/quickstart#required-roles): Viewer, Device Run Admin, Device Streaming Admin, and Service Usage Consumer, or equivalent permissions supplied by your administrator. Device Streaming sessions incur charges; review the current price before approving a reservation.
{{% /notice %}}

Enabling APIs also requires `serviceusage.services.enable`, for example through Service Usage Admin. Having permission to view a project doesn't establish permission to reserve a device or edit IAM.

In your workspace terminal, replace the example project ID:

```bash
export PROJECT_ID="YOUR_PROJECT_ID"
gcloud auth login
gcloud config set project "$PROJECT_ID"
gcloud auth application-default login
gcloud auth application-default set-quota-project "$PROJECT_ID"
```

Complete the sign-in and consent steps yourself. The CLI uses its signed-in account for catalog requests. Google's Python streaming client uses Application Default Credentials (ADC), which are configured separately. Use the intended account for both.

Enable the services required by the quickstart:

```bash
gcloud services enable \
devicerun.googleapis.com \
devicestreaming.googleapis.com \
testing.googleapis.com \
--project="$PROJECT_ID"
```

The command waits for API activation to finish. On success, the output is similar to:

```output
Operation "operations/OPERATION_ID" finished successfully.
```

The operation ID varies. If the APIs are already enabled, the command can return successfully without printing a message. You'll confirm the enabled-service list on the next page.

The Cloud Testing API is required by Device Streaming during Preview. If your organization manages API activation centrally, ask the administrator to enable them.

## What you've accomplished and what's next

You've identified DDP's capabilities, prepared the workstation tools, and configured a Google Cloud project and credentials. Next, you'll verify that the CLI can reach the platform and inspect a device configuration without reserving it.
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: Verify the CLI and discover a remote device
description: Check your Google Cloud identity, project, credentials, and enabled services, then find the Pixel 11 configuration for your device session.
weight: 3
layout: learningpathall
---

## Verify the account, project, and ADC

In the workspace terminal from setup, check the active account, project, and Application Default Credentials (ADC):

```bash
gcloud auth list --filter=status:ACTIVE --format='value(account)'
gcloud config get-value project
gcloud auth application-default print-access-token >/dev/null
```

Check that the first two commands show your intended account and project. The final command should exit successfully; its output is deliberately discarded so an access token doesn't appear in your terminal or screenshots. This checks that ADC can obtain a token, rather than just that a credential file exists.

CLI authentication, ADC authentication, and project permissions are separate checks. Successful sign-in doesn't grant new roles.

## Verify the enabled services

List the APIs enabled in your project:

```bash
gcloud services list --enabled --project="$PROJECT_ID" \
--format='value(config.name)'
```

The output must include `devicerun.googleapis.com`, `devicestreaming.googleapis.com`, and `testing.googleapis.com`. Other enabled APIs can also appear.

## Find the Pixel 11 configuration

Query the device catalog and filter the results to Pixel 11. Select a few fields to keep the output readable:

```bash
gcloud beta device-run devices list \
--project="$PROJECT_ID" \
--filter='displayName~"^Pixel 11$"' \
--format='table(name.segment(-1):label=ID,displayName:label=NAME,modelCode:label=MODEL,hardwareType:label=HARDWARE_TYPE,products():label=PRODUCTS)'
```

The output is similar to:

```output
ID NAME MODEL HARDWARE_TYPE PRODUCTS
cubs-37 Pixel 11 cubs PHYSICAL Automation, Streaming
```

This example identifies a physical Pixel 11 with model code `cubs` and streaming support. On the next page, the agent looks up the current configuration for you, so you don't need to copy catalog IDs or Android API levels into your prompt. Catalog results can change; if no row appears, remove `--filter` to inspect other configurations and review an alternative with your agent.

Use the [interactive device catalog](https://docs.cloud.google.com/developer-device-platform/device-catalog) to inspect the same information visually. The example below shows **Pixel 11**, model `cubs`, API level `37`, with physical hardware and streaming support:

![Google DDP catalog filtered to cubs, showing Pixel 11 with ID cubs-37, physical hardware, Android API level 37, and Streaming support. Use these fields to identify a configuration the agent can request.#center](images/ddp-pixel11-catalog.jpg "Inspect the model, OS, hardware type, and Streaming support before reservation")

Inspect that entry from the CLI if it's currently available:

```bash
gcloud beta device-run devices describe cubs-37 \
--project="$PROJECT_ID" --format=json > results/device-catalog.json
python3 -m json.tool results/device-catalog.json
```

The catalog ID is `cubs-37`; the session request uses model code `cubs` and API level `37` separately. The CLI description can omit the OS version, so retain the catalog's OS value too. Check that the entry includes `arm64-v8a` and `DEVICE_STREAMING`. Availability and supported configurations can change.

The catalog helps you select a device and OS configuration. After connecting, the agent also checks the Arm features available to applications, including SVE2, before choosing the model's optimized kernel path. Keep the catalog selection, runtime feature check, and kernel execution check as separate observations in the report.

## What you've accomplished and what's next

You've checked authentication, project configuration, service activation, and catalog access, and identified the Pixel 11 configuration. Next, you'll give these working tools to the agent and have it connect to the chosen phone.
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Ask the agent to connect to a phone
description: Install Google's DDP skill, describe the phone you want, approve the cost, and let the agent connect and display its screen.
weight: 4
layout: learningpathall
---

## Install the DDP agent skill

In the workspace from platform setup, install the skill from [Google's DDP agent documentation](https://docs.cloud.google.com/developer-device-platform/agent-skill):

```bash
npx skills add https://github.com/google/skills --skill developer-device-platform-basics
```

Choose your coding agent and a project-local installation. Start a fresh agent session in this workspace so it discovers the skill, and confirm that `developer-device-platform-basics` appears among its available skills.

The skill teaches the agent how to find and reserve a device, manage the session, and establish the connection. You can now describe the phone you want in natural language.

## Ask for a phone and its screen

With your agent using the Google Cloud project you verified on the previous page, give it this prompt:

```text
Use the DDP skill and my configured Google Cloud project to connect
to a Pixel 11 with the latest stable Android version available.
Keep the session within 20 minutes and US$3, ask me to approve the
cost, and show me the phone's screen with scrcpy.
```

The agent can look up the current device configuration, check availability, and prepare the connection. You don't need to translate your request into catalog IDs, Android API levels, or connection commands. If the requested phone or Android version isn't available, the agent should explain the options before reserving an alternative.

{{% notice Note %}}
As with all prompts, you may need to provide more details depending on the agent you're using. The reference experiment in this Learning Path used GPT-6.1 Sol in High mode. Other agents and reasoning settings haven't been tested. Describe any missing behavior or error to your agent so it can investigate.
{{% /notice %}}

## Approve the reservation

The DDP skill asks for explicit approval before creating a billable session. Review the project, phone, Android version, duration, and estimated cost that the agent proposes. Check [Google's current DDP price](https://cloud.google.com/products/developer-device-platform#pricing), then answer the agent's approval question. If the proposed session would exceed your budget, reduce the duration before approving it.

Keep the approval to one session within the prompt's limits. The agent should set the expiration, connect to the reserved phone, and report when the session ends. Complete any sign-in or consent steps yourself.

The agent handles the reservation and connection through Google's DDP skill. Keep it running while you use the phone.

## Try the connected phone

The scrcpy window should show the reserved phone's current screen. Check that the agent's reported model and Android version match the reservation you approved.

Click to tap, drag to swipe, and use your keyboard to type into a text field. Try opening the app drawer and returning to the home screen. The agent can also save and inspect a screenshot through the same connection:

<img src="/learning-paths/mobile-graphics-and-gaming/google-ddp-get-started/images/ddp-connected-phone.jpg" width="240" alt="Home screen of the remote Pixel 11 captured through its exact ADB connection. Seeing the phone screen confirms the screenshot route works before the agent starts interacting with Termux." title="Inspect a real screenshot from the reserved phone" class="content-uploaded-image centered" />
<span class="content-image-caption centered">Inspect a real screenshot from the reserved phone</span>

If the screen doesn't appear or control doesn't work, describe what happened to the agent. It can inspect the connection, correct the viewer settings, and try again within the existing session. You can review its observations without managing ports or issuing device commands yourself.

## See what the agent handled

Your request gave the agent a device, an outcome, and spending limits. It translated that into device discovery, a reservation, a connection, and a working screen. Its report should include the session expiration and the location of a saved screenshot, along with enough device information to confirm that it connected to the phone you approved.

Keep the same agent conversation open for the TinyStories experiment on the next page. The agent will use this connection to install the tools, choose compatible Arm optimizations, measure their effect, and release the phone.

If you stop here, ask the agent to release this session and confirm that it has ended. Closing the viewer alone doesn't release the reservation.

## What you've accomplished and what's next

You've installed the DDP skill, requested a phone in natural language, approved its cost, and interacted with the remote device. Next, you'll describe an Arm performance experiment and let the agent handle its setup and measurements.
Loading
Loading