Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 1.96 KB

GettingStarted.md

File metadata and controls

63 lines (47 loc) · 1.96 KB

Getting started with Cuttlefish host tool development

You can get started with these steps to build the host tools on Debian and run a cuttlefish instance with them.

For installing the prebuilt packages instead, see the top-level README.

Install build dependencies

sudo apt install git libc6-dev libcap-dev libclang-dev libgbm-dev \
    libgcc-14-dev libopus-dev libwayland-dev libxml2 make \
    protobuf-compiler python3

Bazel itself is managed by bazelisk; tools/buildutils/installbazel.sh installs it. Alternatively, install Bazel 8.5.1 from GitHub or the apt repository.

Build cvd

cd base/cvd
bazel build //cuttlefish/package:cvd

The first build downloads and compiles all third-party dependencies and takes a while. The resulting binary is bazel-bin/cuttlefish/package/cvd.

Fetch an Android build

./bazel-bin/cuttlefish/package/cvd fetch \
    --default_build=aosp-android-latest-release/aosp_cf_x86_64_only_phone-userdebug \
    --target_directory=/tmp/cf

This downloads the device images and matching host tools from ci.android.com.

Start the device

./bazel-bin/cuttlefish/package/cvd create \
    --host_path=/tmp/cf --product_path=/tmp/cf

--host_path and --product_path point at the fetched host tools and device images respectively. Once booted, connect with adb connect localhost:6520 or open https://localhost:8443 to interact with the device over WebRTC.

Next steps

  • Developing cvd: running tests, generating compile_commands.json.
  • Host tools migration notes.
  • tools/buildutils/build_packages.sh builds the Debian packages, which are what we release; base/debian/control is the source of truth for their dependencies.