[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-21 UTC。"],[],[],null,["# Device manifest development\n\nWhen developing and releasing new devices, vendors can define and declare the\ntarget FCM version in the device manifest (DM). When upgrading the vendor image\nfor old devices, vendors can choose to implement new HAL versions and increment\nthe target FCM version.\n| **Note:** For details on terms used in this page, see [Terminology](/docs/core/architecture/vintf/fcm#terminology).\n\nDevelop new devices\n-------------------\n\nWhen defining the device target FCM version for new devices:\n\n1. Leave `DEVICE_MANIFEST_FILE` and `PRODUCT_ENFORCE_VINTF_MANIFEST` undefined.\n2. Implement HALs for the target FCM version.\n3. Write the correct device manifest file.\n4. Write the target FCM version to device manifest file.\n5. Set `DEVICE_MANIFEST_FILE`.\n6. Set `PRODUCT_ENFORCE_VINTF_MANIFEST` to `true`.\n\nRelease new devices\n-------------------\n\nWhen a new device is released, its initial target FCM version needs to be\ndetermined and declared in the device manifest as the\n\"`target-level`\" attribute in the top-level\n`\u003cmanifest\u003e` element.\n\nFor example, devices launching with Android 9 must\nhave target FCM version equal to 3 (the higher version available at this time).\nTo declare this in the device manifest: \n\n```carbon\n\u003cmanifest version=\"1.0\" type=\"device\" target-level=\"3\"\u003e\n \u003c!-- ... --\u003e\n\u003c/manifest\u003e\n```\n\nUpgrade vendor image\n--------------------\n\nWhen upgrading the vendor image for an old device, vendors can choose to\nimplement new HAL versions and increment the target FCM version.\n\n### Upgrade HALs\n\nDuring a vendor image upgrade, vendors can implement new HAL versions\nprovided that HAL name, interface name, and instance name are the same. For\nexample:\n\n- 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`.\n- 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`.\n- 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.\n\nTo summarize, given that `compatibility_matrix.2.xml` requires\naudio 2.0 and `compatibility_matrix.3.xml` requires audio 4.0, the\nrequirements are as follows:\n\n| FCM version (system) | Target FCM version (vendor) | Requirements |\n|----------------------|-----------------------------|------------------|\n| 2 (8.1) | 2 (8.1) | Audio 2.0 |\n| 3 (9) | 2 (8.1) | Audio 2.0 or 4.0 |\n| 3 (9) | 3 (9) | Audio 4.0 |\n\n### Upgrade target FCM version\n\nDuring a vendor image upgrade, vendors can also increment the target FCM\nversion to specify the targeted FCM version the upgraded vendor image can work\nwith. To bump the target FCM version of a device, vendors need to:\n\n1. Implement all new required HAL Versions for the target FCM version.\n2. Modify HAL Versions in the device manifest file.\n3. Modify the target FCM version in the device manifest file.\n4. Remove deprecated HAL versions.\n\nFor example, Google Pixel and Pixel XL devices launched with Android 7.0\nso their target FCM version must be at least legacy. However, the [device\nmanifest](https://android.googlesource.com/device/google/marlin/+/0a276ad8b98fde395ed99a4b303434800c07049e/manifest.xml#1) declares the target FCM version 2 because the vendor image has\nbeen updated to conform with `compatibility_matrix.2.xml`: \n\n```carbon\n\u003cmanifest version=\"1.0\" type=\"device\" target-level=\"2\"\u003e\n```\n\nIf vendors do not implement all required new HAL versions or do not remove\ndeprecated HAL versions, the target FCM version cannot be upgraded.\n\nFor example, Google Pixel 2 and Pixel 2 XL devices have target FCM version 2.\nWhile they do implement some HALs required by\n`compatibility_matrix.3.xml` (such as audio 4.0, health 2.0, etc.),\nthey do not remove `android.hardware.radio.deprecated@1.0`, which is\ndeprecated at FCM version 3 (Android 9). Hence, these\ndevices cannot upgrade the target FCM version to 3.\n\nMandating kernel requirements during OTA\n----------------------------------------\n\n### Updating devices from Android 9 or lower\n\n\nOn devices with Android 9 or lower, ensure the following CLs are\ncherry-picked:\n\n- [CL 722283](https://android-review.googlesource.com/722283)\n- [CL 722284](https://android-review.googlesource.com/722284)\n- [CL 722345](https://android-review.googlesource.com/722345)\n\n\nThese changes introduce the build flag\n`PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS` and leave the\nflag unset for devices launched with Android 9 or\nlower.\n\n- When updating to Android 10, OTA clients on devices running Android 9 or lower don't check kernel requirements in the OTA package correctly. These changes are needed to drop kernel requirements from the generated OTA package.\n- When updating to Android 11, it is optional to set the `PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS` build flag to check VINTF compatibility when the update package is generated.\n\n\nFor more information about this build flag, see\n[Updating devices from Android\n10](#ota-kernel-q).\n\n### Updating devices from Android 10\n\n\nAndroid 10 introduces a new build flag,\n`PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS`. For devices\nlaunched with Android 10, this flag is\nautomatically set to `true`. When the flag is set to\n`true`, a script extracts the kernel version and the kernel\nconfigurations from the installed kernel image.\n\n- When updating to Android 10, OTA update package contains kernel version and configuration. OTA clients on devices running Android 10 read this information to check compatibility.\n- When updating to Android 11, OTA package genreation reads kernel version and configuration to check compatibility.\n\nIf the script fails to extract\nthis information for your kernel image, do **one** of\nthe following:\n\n- Edit the script to support your kernel format and contribute to AOSP.\n- Set `BOARD_KERNEL_VERSION` to the kernel version and `BOARD_KERNEL_CONFIG_FILE` to the path of the built kernel configuration file `.config`. Both variables must be updated when the kernel image is updated.\n- Alternatively, set `PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS` to `false` to skip checking kernel requirements. This is not recommended because any incompatibility is hidden and is only discovered when running VTS tests after the update.\n\n\nYou can view the source code of the kernel information extraction script\n[`extract_kernel.py`](https://android.googlesource.com/platform/build/+/refs/heads/android16-release/tools/extract_kernel.py)."]]