Device Manifest Development

When developing and releasing new devices, vendors can define and declare the Target FCM Version in the device manifest (DM). When upgrading the vendor image for old devices, vendors can choose to implement new HAL versions and increment the Target FCM Version.

Developing new devices

When defining the device Target FCM Version for new devices:

  1. Leave DEVICE_MANIFEST_FILE and PRODUCT_ENFORCE_VINTF_MANIFEST undefined.
  2. Implement HALs for the Target FCM Version.
  3. Write the correct device manifest file.
  4. Write the Target FCM Version to device manifest file.
  5. Set DEVICE_MANIFEST_FILE.
  6. Set PRODUCT_ENFORCE_VINTF_MANIFEST to true.

Releasing new devices

When a new device is released, its initial Target FCM Version needs to be determined and declared in the device manifest as the "target-level" attribute in the top-level <manifest> element.

For example, devices launching with Android 9 must have Target FCM Version equal to 3 (the higher version available at this time). To declare this in the device manifest:

<manifest version="1.0" type="device" target-level="3">
    <!-- ... -->
</manifest>

Upgrading vendor image

When upgrading the vendor image for an old device, vendors can choose to implement new HAL versions and increment the Target FCM Version.

Upgrading HALs

During a vendor image upgrade, vendors can implement new HAL versions provided that HAL name, interface name, and instance name are the same. For example:

  • Google Pixel 2 and Pixel 2 XL devices released with Target FCM Version 2, which implemented the required audio 2.0 HAL android.hardware.audio@2.0::IDeviceFactory/default.
  • For the audio 4.0 HAL that released with Android 9, Google Pixel 2 and Pixel 2 XL devices can use a full OTA to upgrade to the 4.0 HAL, which implements android.hardware.audio@4.0::IDeviceFactory/default.
  • Even though the compatibility_matrix.2.xml specifies audio 2.0 only, the requirement on a vendor image with Target FCM Version 2 has been loosened because the Android 9 framework (FCM Version 3) considers audio 4.0 a replacement of audio 2.0 HAL in terms of functionality.

To summarize, given that compatibility_matrix.2.xml requires audio 2.0 and compatibility_matrix.3.xml requires audio 4.0, the requirements are as follows:

FCM Version (System) Target FCM Version (Vendor) Requirements
2 (8.1) 2 (8.1) Audio 2.0
3 (9) 2 (8.1) Audio 2.0 or 4.0
3 (9) 3 (9) Audio 4.0

Upgrading Target FCM Version

During a vendor image upgrade, vendors can also increment the Target FCM Version to specify the targeted FCM Version the upgraded vendor image can work with. To bump the Target FCM Version of a device, vendors need to:

  1. Implement all new required HAL Versions for the Target FCM Version.
  2. Modify HAL Versions in the device manifest file.
  3. Modify the Target FCM Version in the device manifest file.
  4. Remove deprecated HAL versions.
  5. For devices launched with Android 9 or lower, cherry-pick these CLs before generating OTA update packages:

For example, Google Pixel and Pixel XL devices launched with Android 7.0 so their Target FCM Version must be at least legacy. However, the device manifest declares the Target FCM Version 2 because the vendor image has been updated to conform with compatibility_matrix.2.xml:

<manifest version="1.0" type="device" target-level="2">

If vendors do not implement all required new HAL versions or do not remove deprecated HAL versions, the Target FCM Version cannot be upgraded.

For example, Google Pixel 2 and Pixel 2 XL devices have Target FCM Version 2. While they do implement some HALs required by compatibility_matrix.3.xml (such as audio 4.0, health 2.0, etc.), they do not remove android.hardware.radio.deprecated@1.0, which is deprecated at FCM Version 3 (Android 9). Hence, these devices cannot upgrade the Target FCM Version to 3.