Overview of podcvd
mainpodcvd is a CLI binary designed to provide an interface identical to cvd. Its primary purpose is to create Cuttlefish instance groups on container instances, preventing interference between different host environments.repository·main·Indexed 20 days ago
https://github.com/google/android-cuttlefishHost-side utilities for preparing Linux hosts to boot configurable Android Virtual Devices (AVDs). Includes documentation on the Cuttlefish CLI (cvd), host filesystem setup via assemble_cvd, device lifecycle management with run_cvd and cvd_internal_start, and specialized components like the gnss_grpc_proxy for location data, secure_env for TEE emulation, and WebRTC browser endpoints for display streaming. Also covers building and deploying Cuttlefish via Bazel, Docker, and Podman.
podcvd is a CLI binary designed to provide an interface identical to cvd. Its primary purpose is to create Cuttlefish instance groups on container instances, preventing interference between different host environments.run_cvd command acts as an init-style manager for all processes associated with running a specific Cuttlefish Android device. It is responsible for orchestrating the lifecycle of the Cuttlefish instance, ensuring that all related processes are managed as a single unit.The gnss_grpc_proxy is a virtual device location data manager that serves a gRPC interface. It is designed to manage and provide GNSS (Global Navigation Satellite System) location data to a Cuttlefish virtual device.
End-users typically interact with this service through specialized client executables rather than calling the gRPC interface directly. The primary clients are:
cvd_import_locations: Used to import a sequence of location points into the service.cvd_update_location: Used to set a new fixed location for the device.secure_env is a host process that acts as a substitute for a Trusted Execution Environment (TEE). It is used to run backing implementations of Android Hardware Abstraction Layers (HALs) that typically require a TEE environment.
Specifically, it supports:
webRTC host process, which delegates signing operations to secure_env.secure_env via virtio-console channels connected to FIFO files on the host.secure_env via virtio-console channels connected to FIFO files on the host.During the boot process, the u-boot bootloader writes device image information into the Keymint channel to prepare the environment with the authenticated version number of the operating system.
The Cuttlefish command-line interface (CLI) is architected as a split system consisting of a thin client and a persistent background server process. This server process is responsible for tracking user state.
When a user executes a command via the client, the request is processed by handler classes. These handlers can implement complex workflows by delegating tasks to other handler classes using the CommandSequenceExecutor mechanism.
register and deregister messages to the ADB server. This ensures that the ADB server is correctly informed of when a Cuttlefish device becomes available or is removed, allowing standard ADB commands to interact with the virtual device.When performing bulk operations (e.g., "create 10 instances" or "remove groups A, B, and C"), you must execute commands in parallel by default to avoid severe performance degradation.
Exceptions (Execute Sequentially):
group_name (state dependency).clear.secure_env host process is established through virtio-console channels. These channels are connected to FIFO files located on the host system.The Cuttlefish CLI configuration is organized into a hierarchical UI structure composed of various categories. These categories group related configuration parameters and classes, allowing users to manage different aspects of the virtual device through a structured interface.
Key configuration categories include:
Use podcvd to orchestrate the lifecycle of Cuttlefish instances.
Critical Rules:
podcvd manages all ADB connections automatically. Do not use external ADB tools or MCP servers to connect to these instances, as it will cause system conflicts.cvd: podcvd and standard cvd do not share state. Do not mix them. Instances created with cvd will not appear in podcvd fleet, and vice versa.podcvd create, you must capture the returned "group_name" from the JSON response. This name is required for subsequent operations like stop, start, or remove using the --group_name=<group_name> flag."Starting". Wait for the status to transition to "Running" via podcvd fleet before attempting to use ADB or performing teardown operations.PODCVD_CLIENT_ID="<client_id>" podcvd create --vhost_user_vsock=true --report_anonymous_usage_stats=nYou can download the Debian installer image from the Google Artifact Registry. Use the ARM_OS_IMAGE_VERSION environment variable to specify the desired version (e.g., unstable). The image is downloaded as a compressed preseed-mini.iso.xz file.
ARM_OS_IMAGE_VERSION=unstable # Modify the version if it's needed.
wget -O preseed-mini.iso.xz "https://artifactregistry.googleapis.com/download/v1/projects/android-cuttlefish-artifacts/locations/us/repositories/gigabyte-ampere-server-installer/files/debian-installer:${ARM_OS_IMAGE_VERSION}:preseed-mini.iso.xz:download?alt=media"