VINTF Object Data

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 file

The Device manifest file is provided by the device. It lives in the Android source tree at device/${VENDOR}/${DEVICE}/manifest.xml and on the device at /vendor/manifest.xml.

Example Device manifest:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Comments, Legal notices, etc. here -->
<manifest version="1.0" type="device">
    <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 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>

Framework manifest file

The Framework manifest file is provided by Google and is manually generated. It lives in the Android source tree at system/libhidl/manifest.xml and on the device under /system/manifest.xml.

Example Framework manifest (provided by Google):

<?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>
</manifest>

Manifest file schema

?xml
Optional. Only provides information to the XML parser.
manifest.version
Required. 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.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.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
Required, 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.
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.sepolicy
Required. Contains all sepolicy-related entries.
manifest.sepolicy.version
Required for device manifest. Declares sepolicy version. It has the format SDK_INT.PLAT_INT.

Runtime data

Some information required for the device manifest can be collected only at runtime. Information is available via ::android::vintf::VintfObject::GetRuntimeInfo() and includes the following:

  • Kernel information, including:
    • /proc/config.gz. Zipped full kernel configuration that needs to be read at runtime and converted to a queryable object.
    • /proc/version. Information available through uname() system call.
    • /proc/cpuinfo. Format may be different for 32-bit and 64-bit machine.
    • policydb version
      • /sys/fs/selinux/policyvers (assuming selinuxfs is mounted at /sys/fs/selinux).
      • security_policyvers() API from libselinux gives you the same.
  • static libavb version, including:
    • bootloader system property: ro.boot.vbmeta.avb_version
    • init/fs_mgr system property: ro.boot.avb_version

Queryable API

The VINTF object is a system API as the hwservicemanager, OTA update service, CTS DeviceInfo, and others need information from this API.