Android 17.0.0 release 1
Merge cherrypicks of ['googleplex-android-review.googlesource.com/39311166'] into 26Q2-release.

Change-Id: I57a31d8654c2c49a09a2d5604e724891b7bf32b3
tree: e14929ebca46a86c712d6100018a11a7306edc8c
  1. .prebuilt_info/
  2. cuttlefish_multi_tenancy/
  3. doc/
  4. prebuilts/
  5. sdv_arm64/
  6. sdv_base/
  7. sdv_cf/
  8. sdv_core_arm64/
  9. sdv_core_base/
  10. sdv_core_cf/
  11. sdv_core_perf_cf/
  12. sdv_core_tiny_cf/
  13. sdv_har_arm64/
  14. sdv_ivi_arm64/
  15. sdv_ivi_base/
  16. sdv_ivi_cf/
  17. sdv_media_arm64/
  18. sdv_media_base/
  19. sdv_media_cf/
  20. vvmtruststore_preprovisioned/
  21. AndroidProducts.mk
  22. METADATA
  23. modules.blocklist
  24. OWNERS
  25. PREUPLOAD.cfg
  26. README.md
  27. TEST_MAPPING
README.md

SDV lunch targets

This directory contains Makefiles used to define SDV lunch targets.

Hierarchy

SDV makefiles diagram

Inheritable lunch targets

OEM-defined targets are intended to derive from those base targets as needed. OEM targets are intended to directly inherit from one SDV “base” target, and a “vendor” target.

SDV “base” targets

  • sdv_base is the base for lunch targets that need to communicate with the SDV system using SDV communications stack.

  • sdv_core_base is the base for lunch targets that need the full set of SDV Core services.

  • sdv_media_base is the base for lunch targets that, aside from SDV Core services, also require media API support.

  • sdv_ivi_base is the base for AAOS IVI lunch targets capable of communicating with SDV services on other VMs.

Vendor targets

  • sdv_cf contains Cuttlefish-specific functionality specific to SDV Core-derived targets. Note that it's not used by sdv_ivi_cf.

Sample targets

sdv_core_cf, sdv_media_cf and sdv_ivi_cf are examples of the complete SDV targets derived from the ones above.

Configuration overrides

Downstream lunch targets can provide their own configuration for some SDV components defined by SDV “base” targets.

See sdv_core_cf/sdv_core_cf.mk for an example of injecting custom target-specific configuration.

Custom OEM partitions

To build a sample OEM partition and run SDV with it mounted on /oem_ab:

source build/envsetup.sh
lunch sdv_core_cf-trunk_staging-userdebug
m
cvd create --custom_partition_path=$OUT/oem_ab.img

Configuration

To create a custom partition image:

  • See sdv_core_base/oem_ab/oem_ab.mk and sdv_core_base/oem_ab/Android.bp for defining a custom partition.
  • The custom disk image is automatically built when running m.

To mount the custom partition with Cuttlefish:

  • In BoardConfig.mk, add the partition mount point to BOARD_ROOT_EXTRA_FOLDERS to ensure it exists in the root filesystem.

    See sdv_core_cf/BoardConfig.mk for an example of setting up the /oem_ab directory.

  • Add an fstab entry for the partition. The custom partition will be visible to the VM as /dev/block/by-name/custom.

    See sdv_core_cf/fstab.sdv for an example of mounting the oem_ab_metadata partition to the /oem_ab_metadata path on the device.

  • Set up SELinux policy rules for the new partition contents, and allow init to mount it. See sdv_core_base/oem_ab/sepolicy/oem_ab/private/oem_ab.te and sdv_core_base/oem_ab/sepolicy/oem_ab/private/file_contexts.

  • Build sdv_core_cf target with lunch sdv_core_cf-trunk_staging-userdebug && m.

  • Run Cuttlefish and pass the custom partition image when starting.

    cvd create --custom_partition_path=$OUT/oem_ab.img
    

The VM will boot and expose the OEM partition contents under /oem_ab path.