Create a Cuttlefish hybrid device

This page describes how to create a Cuttlefish hybrid device (CHD).

A CHD is a hybrid virtual Cuttlefish device, which runs a physical device's system image instead of a Cuttlefish system image on the device's HALs. This offers the following advantages:

  • Early development and testing: CHDs allow for early development and testing of next-generation system software before the physical hardware is available.

  • Scalability: CHDs facilitate easier expansion of development and testing capacity.

Create a CHD

To create a CHD, do the following:

  1. Generate the target files for the Cuttlefish device and the physical device using make dist.

  2. Combine the two target files into a CHD target file and generate the CHD images from the CHD target file by running the build_cf_hybrid_device.py script as follows.

    python3 tools/treble/cuttlefish/build_cf_hybrid_device.py \
      --framework_target_files_zip <physical_device_target_files.zip> \
      --vendor_target_files_zip <cuttlefish_device_target_files.zip> \
      --otatools_zip <cuttlefish_otatools.zip> \
      --target chd \
      --output_dir <output_directory>
    

    This script combines the two target files into a CHD target file using merge_target_files and generates the CHD images from the CHD target file using img_from_target_files.