Manifests

A VINTF object aggregates data from device manifest and framework manifest files (XML) and from the device itself at runtime. Both manifests share a format, although not all elements apply to both (for details on the schema, see Manifest file schema).

Device manifest

The Device manifest (provided by the device) consists of the vendor manifest and the ODM manifest.

  • The vendor manifest specifies HALs, VNDK versions, etc. common to an SoC. It is recommended to be placed in the Android source tree at device/VENDOR/DEVICE/manifest.xml, but multiple fragment files can be used. For details, see Generate DM from fragments.
  • The ODM manifest lists HALs specific to the product. VINTF Object loads the ODM manifest as follows:
    1. If SKU is defined (where SKU is the value of the property ro.boot.product.hardware.sku), /odm/etc/vintf/manifest_SKU.xml
    2. /odm/etc/vintf/manifest.xml
    3. If SKU is defined, /odm/etc/manifest_SKU.xml
    4. /odm/etc/manifest.xml
  • VINTF Object loads the device manifest as follows:
    1. If /vendor/etc/vintf/manifest.xml exists, combine the following:
      1. /vendor/etc/vintf/manifest.xml
      2. optional vendor manifest fragments
      3. optional ODM manifest
      4. optional ODM manifest fragments
    2. If ODM manifest exists, combine ODM manifest with optional ODM manifest fragments.
    3. /vendor/manfiest.xml (legacy, no fragments)
    Note that:
    • On legacy devices, the legacy vendor manifest and ODM manifest are used. The ODM manifest may completely override the legacy vendor manifest.
    • On devices launched with Android 9, the ODM manifest is combined with vendor manifest.
    • When combining a list of manifests, manifests that appear later in the list may override tags in manifests that appear earlier in the list, provided that the tags in the later manifest has attribute override="true". For example, ODM manifest may override some <hal> tags from vendor manifest. See documentation for attribute override below.

This setup enables multiple products with the same board to share the same vendor image (which provides common HALs) yet have different ODM images (which specify product-specific HALs).

Example vendor manifest:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Comments, Legal notices, etc. here -->
<manifest version="1.0" type="device" target-level="1">
    <hal>
        <name>android.hardware.camera</name>
        <transport>hwbinder</transport>
        <version>3.4</version>
        <interface>
            <name>ICameraProvider</name>
            <instance>legacy/0</instance>
            <instance>proprietary/0</instance>
        </interface>
    </hal>
    <hal>
        <name>android.hardware.nfc</name>
        <transport>hwbinder</transport>
        <version>1.0</version>
        <version>2.0</version>
        <interface>
            <name>INfc</name>
            <instance>nfc_nci</instance>
        </interface>
    </hal>
    <hal>
        <name>android.hardware.nfc</name>
        <transport>hwbinder</transport>
        <version>2.0</version>
        <interface>
            <name>INfc</name>
            <instance>default</instance>
        </interface>
    </hal>
    <hal>
        <name>android.hardware.drm</name>
        <transport>hwbinder</transport>
        <version>1.0</version>
        <interface>
            <name>ICryptoFactory</name>
            <instance>default</instance>
        </interface>
        <interface>
            <name>IDrmFactory</name>
            <instance>default</instance>
        </interface>
        <fqname>@1.1::ICryptoFactory/clearkey</fqname>
        <fqname>@1.1::IDrmFactory/clearkey</fqname>
    </hal>
    <hal format="native">
        <name>EGL</name>
        <version>1.1</version>
    </hal>
    <hal format="native">
        <name>GLES</name>
        <version>1.1</version>
        <version>2.0</version>
        <version>3.0</version>
    </hal>
    <sepolicy>
        <version>25.0</version>
    </sepolicy>
</manifest>

Example ODM manifest:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Comments, Legal notices, etc. here -->
<manifest version="1.0" type="device">
    <!-- camera 3.4 in vendor manifest is ignored -->
    <hal override="true">
        <name>android.hardware.camera</name>
        <transport>hwbinder</transport>
        <version>3.5</version>
        <interface>
            <name>ICameraProvider</name>
            <instance>legacy/0</instance>
        </interface>
    </hal>
    <!-- NFC is disabled -->
    <hal override="true">
        <name>android.hardware.nfc</name>
        <transport>hwbinder</transport>
    </hal>
    <hal>
        <name>android.hardware.power</name>
        <transport>hwbinder</transport>
        <version>1.1</version>
        <interface>
            <name>IPower</name>
            <instance>default</instance>
        </interface>
    </hal>
</manifest>
For more details, see DM Development.

Framework manifest

The Framework manifest file (provided by Google) is manually generated and lives in the Android source tree at /system/libhidl/manifest.xml.

Example Framework manifest:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Comments, Legal notices, etc. here -->
<manifest version="1.0" type="framework">
    <hal>
        <name>android.hidl.allocator</name>
        <transport>hwbinder</transport>
        <version>1.0</version>
        <interface>
            <name>IAllocator</name>
            <instance>ashmem</instance>
        </interface>
    </hal>
    <hal>
        <name>android.hidl.memory</name>
        <transport arch="32+64">passthrough</transport>
        <version>1.0</version>
        <interface>
            <name>IMapper</name>
            <instance>ashmem</instance>
        </interface>
    </hal>
    <hal>
        <name>android.hidl.manager</name>
        <transport>hwbinder</transport>
        <version>1.0</version>
        <interface>
            <name>IServiceManager</name>
            <instance>default</instance>
        </interface>
    </hal>
    <hal>
        <name>android.frameworks.sensorservice</name>
        <transport>hwbinder</transport>
        <version>1.0</version>
        <interface>
            <name>ISensorManager</name>
            <instance>default</instance>
        </interface>
    </hal>
    <vendor-ndk>
        <version>27</version>
    </vendor-ndk>
    <system-sdk>
        <version>27</version>
    </system-sdk>
</manifest>

Manifest file schema

This section describes the meaning of these XML tags. Some "required" tags can be missing from the source file in Android source tree and written by assemble_vintf at build time. "Required" tags must be present in the corresponding files on the device.

?xml
Optional. Only provides information to the XML parser.
manifest.version
Required. Meta-version of this manifest. Describes the elements expected in the manifest. Unrelated to XML version.
manifest.type
Required. Type of this manifest. It has value device for device manifest file and framework for framework manifest file.
manifest.target-level
Required for device manifest. Specifies the Framework Compatibility Matrix Version (FCM Version) that this device manifest is targeted to be compatible with. This is also called the Shipping FCM Version of the device.
manifest.hal
Optional, can repeat. A single HAL (HIDL or native, such as GL), depending on the format attribute.
manifest.hal.format
Optional. Value can be one of:
  • hidl: HIDL HALs. This is the default.
  • native: native HALs.
manifest.hal.override
Optional. Value can be one of:
  • true: override other <hal> elements with the same <name> and major version. If no <version> or <fqname> are in this <hal> element, then this HAL is disabled.
  • false: do not override other <hal> elements with the same <name> and major version.
manifest.hal.name
Required. Fully-qualified package name of HAL. Multiple HAL entries can use the same name. Examples:
  • android.hardware.camera (HIDL HAL)
  • GLES (native HAL, requires name only)
manifest.hal.transport
Required when manifest.hal.format == "hidl". Must NOT be present otherwise. States what transport will be used when an interface from this package is queried from service manager. Value can be one of:
  • hwbinder: binderized mode
  • passthrough: passthrough mode
manifest.hal.transport.arch
Required for passthrough and must not be present for hwbinder. Describes the bitness of the passthrough service being provided. Value can be one of:
  • 32: 32-bit mode
  • 64: 64-bit mode
  • 32+64: both
manifest.hal.version
Optional, can repeat. A version for the hal tags in a manifest. Format is MAJOR.MINOR. For examples, refer to hardware/interfaces, vendor/${VENDOR}/interfaces, framework/hardware/interfaces, or system/hardware/interfaces.

HIDL and native HALs may use multiple version fields as long as they represent distinct major versions, with only one minor version per major version provided. For example, 3.1 and 3.2 cannot coexist, but 1.0 and 3.4 can. This applies for all hal elements with the same name, unless override="true".
manifest.hal.interface
Required, can repeat without duplicates. State an interface in the package that has an instance name. There can be multiple <interface> elements in a <hal>; names must be distinct.
manifest.hal.interface.name
Required. Name of the interface.
manifest.hal.interface.instance
Required, can repeat. Instance name of the interface. Can have multiple instances for an interface but no duplicated <instance> elements.
manifest.hal.fqname
Optional, can repeat. An alternative way to specify an instance for the HAL with name manifest.hal.name. Format is @MAJOR.MINOR::INTERFACE/INSTANCE. For devices upgrading from Android 8.0, this cannot be used to declare instances required by the compatibility matrix.
manifest.sepolicy
Required. Contains all sepolicy-related entries.
manifest.sepolicy.version
Required for device manifest. Declares SELinux version. It has the format SDK_INT.PLAT_INT.
manifest.vendor-ndk
Required, can repeat; required for framework manifest. Must not be present in the device manifest. Multiple <vendor-ndk> entries must have different <version>’s. Describes a set of VNDK snapshots provided by the framework.
manifest.vendor-ndk.version
Required. It is a positive integer representing the version of the VNDK snapshot.
manifest.vendor-ndk.library
Optional, can repeat, without duplicates. Describes a set of VNDK libraries provided by the framework for this VNDK vendor snapshot. The value is the filename of a library, e.g. libjpeg.so, including the prefix lib and the suffix .so. No path components are allowed.
manifest.system-sdk.version
Optional, can repeat, without duplicates; used only by the framework manifest. Describes a set of System SDK versions provided by the framework to vendor apps.