From 66d0d21f69a03d968f6efc18bc94cd88f85dd922 Mon Sep 17 00:00:00 2001 From: Asquator Date: Tue, 14 Oct 2025 00:51:56 +0300 Subject: [PATCH 1/3] Enhanced cvdr.md and added common use cases --- docs/cvdr.md | 72 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 23 deletions(-) diff --git a/docs/cvdr.md b/docs/cvdr.md index 06613b33..c6ae16c2 100644 --- a/docs/cvdr.md +++ b/docs/cvdr.md @@ -9,10 +9,8 @@ remotely. It wraps [Cloud Orchestrator](cloud_orchestrator.md), to provide user-friendly interface. -Please run `cvdr --help` for advanced functionalities of `cvdr` not described -below, such as launching Cuttlefish with locally built image. - -## Download cvdr +## Install cvdr +### Debian prebuilt packages `cuttlefish-cvdremote` is available to download via `apt install` with adding the apt repository at Artifact Registry. @@ -29,21 +27,36 @@ sudo apt install cuttlefish-cvdremote cvdr --help ``` +### Manual build + +To build `cvdr` manually, please run: +```bash +git clone https://github.com/google/cloud-android-orchestration.git +cd cloud-android-orchestration # Root directory of git repository +go build ./cmd/cvdr +``` + ## Configure cvdr -Please check and modify the configuration file(`~/.config/cvdr/cvdr.toml`). +Please check and modify the configuration file (defaults to `~/.config/cvdr/cvdr.toml`). See either [build/debian/cuttlefish_cvdremote/host/etc/cvdr.toml](/build/debian/cuttlefish_cvdremote/host/etc/cvdr.toml) or [scripts/on-premises/single-server/cvdr.toml](/scripts/on-premises/single-server/cvdr.toml) as examples of how to write a configuration file. -## Use cvdr -Let's assume using the latest Cuttlefish x86_64 image enrolled in -[ci.android.com](https://ci.android.com/). +## Run CVD + + +```bash +CVDR_USER_CONFIG_PATH=/path/to/cvdr.toml ./cvdr --help +``` + +## Create CVD examples + +### Latest Cuttlefish x86_64 image enrolled in [ci.android.com](https://ci.android.com/) -Please run: ```bash cvdr \ --branch=aosp-main \ @@ -51,7 +64,32 @@ cvdr \ create ``` -Then we expect the result like below. +### Custom AOSP build + +Ensure you have completed an AOSP build as described in the [docs](https://source.android.com/docs/setup/build/building). +To start a Cuttlefish emulator based on this build, the following environment variables should be defined: +``` +export ANDROID_BUILD_TOP=/path/to/your/AOSP/sources/root +export ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/your_target" +``` +Replace the latter with the your `OUT_DIR` if you override it. + +
+ +To automatically fetch the [required images](https://cs.android.com/android/platform/superproject/+/master:device/google/cuttlefish/required_images) from your AOSP root and create an instance, please run: + +```bash +CVDR_USER_CONFIG_PATH=/path/to/cvdr.toml ./cvdr create --local_image +``` + +Alternatively, manually specify the images and create an instance: +```bash +CVDR_USER_CONFIG_PATH=/path/to/cvdr.toml ./cvdr --local_cvd_host_pkg_src="${ANDROID_PRODUCT_OUT}/dist/cvd-host_package.tar.gz --local_images_zip_src=${ANDROID_PRODUCT_OUT}/dist/your-target-img.zip" +``` +For this to work, you have to build the .zip images using `m dist` in AOSP root beforehand. + + +On success, we expect the result like below. ``` Creating Host........................................ OK Fetching main bundle artifacts....................... OK @@ -69,16 +107,4 @@ and check if the page seems like below. Also, you should be able to see the device is enrolled via `adb devices`. ![cvdr_cf_creation](resources/cvdr_cf_creation_example.png) -## Manually build and run cvdr - -To build `cvdr` manually, please run: -```bash -git clone https://github.com/google/cloud-android-orchestration.git -cd cloud-android-orchestration # Root directory of git repository -go build ./cmd/cvdr -``` - -To run `cvdr`, please run: -```bash -CVDR_USER_CONFIG_PATH=/path/to/cvdr.toml ./cvdr --help -``` +Please run `cvdr --help` for advanced functionalities of `cvdr`, including individual commands and their flags. \ No newline at end of file From 44e885231fefd2dbbebed34a26dab80c6ccaabc8 Mon Sep 17 00:00:00 2001 From: Asquator <92979391+Asquator@users.noreply.github.com> Date: Tue, 14 Oct 2025 01:07:42 +0300 Subject: [PATCH 2/3] Added newline for clarity --- docs/cvdr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cvdr.md b/docs/cvdr.md index c6ae16c2..9847a724 100644 --- a/docs/cvdr.md +++ b/docs/cvdr.md @@ -88,7 +88,7 @@ CVDR_USER_CONFIG_PATH=/path/to/cvdr.toml ./cvdr --local_cvd_host_pkg_src="${ANDR ``` For this to work, you have to build the .zip images using `m dist` in AOSP root beforehand. - +
On success, we expect the result like below. ``` Creating Host........................................ OK @@ -107,4 +107,4 @@ and check if the page seems like below. Also, you should be able to see the device is enrolled via `adb devices`. ![cvdr_cf_creation](resources/cvdr_cf_creation_example.png) -Please run `cvdr --help` for advanced functionalities of `cvdr`, including individual commands and their flags. \ No newline at end of file +Please run `cvdr --help` for advanced functionalities of `cvdr`, including individual commands and their flags. From 5388e2e3660bded829d5d65e61be1bc5ed8b0e7f Mon Sep 17 00:00:00 2001 From: Asquator <92979391+Asquator@users.noreply.github.com> Date: Sun, 26 Oct 2025 00:25:22 +0300 Subject: [PATCH 3/3] Document expected output for successful build Added expected result output for successful build. --- docs/cvdr.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/cvdr.md b/docs/cvdr.md index 9847a724..a1b74460 100644 --- a/docs/cvdr.md +++ b/docs/cvdr.md @@ -90,6 +90,7 @@ For this to work, you have to build the .zip images using `m dist` in AOSP root
On success, we expect the result like below. + ``` Creating Host........................................ OK Fetching main bundle artifacts....................... OK