From ea448b829ef3c5eefcadcd50fdf74c873eeadd86 Mon Sep 17 00:00:00 2001
From: Android Partner Docs 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). The Device manifest file is provided by the device. It lives in the Android
-source tree at 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).
Example Device manifest: The Device manifest (provided by the device) consists of the vendor manifest
+and the ODM manifest: 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: The Framework manifest file is provided by Google and is manually generated.
-It lives in the Android source tree at Example ODM manifest: Example Framework manifest (provided by Google): The Framework manifest file (provided by Google) is manually generated and
+lives in the Android source tree at
+ Example Framework manifest:Device manifest file
-device/${VENDOR}/${DEVICE}/manifest.xml
and on the
-device at
-/vintfdata/manifest.xml
.
+Device manifest
+
+
+
+device/${VENDOR}/${DEVICE}/manifest.xml
, but multiple fragment
+files can be used. For details, see
+Generate
+DM from fragments.
+
<?xml version="1.0" encoding="UTF-8"?>
<!-- Comments, Legal notices, etc. here -->
-<manifest version="1.0" type="device">
+<manifest version="1.0" type="device" target-level="1">
<hal>
<name>android.hardware.camera</name>
<transport>hwbinder</transport>
@@ -70,6 +83,21 @@ device at
<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>
@@ -86,12 +114,47 @@ device at
</manifest>
-Framework manifest file
-system/libhidl/manifest.xml
-and on the device under /system/manifest.xml
.
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Comments, Legal notices, etc. here -->
+<manifest version="1.0" type="device">
+ <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>
+ <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
+/system/libhidl/manifest.xml
.
+
<?xml version="1.0" encoding="UTF-8"?>
@@ -133,20 +196,36 @@ and on the device under
/system/manifest.xml
.
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
manifest.version
manifest.type
device
for
device manifest file and framework
for framework manifest
file.manifest.target-level
manifest.hal
format
attribute.format
attribute.
native
: native HALs.manifest.hal.override
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
manifest.hal.version
hal
tags in a
+hal
tags in a
manifest. Format is MAJOR.MINOR
. For
examples, refer to hardware/interfaces
,
vendor/${VENDOR}/interfaces
,
@@ -195,7 +285,8 @@ 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.hal
elements with the same name, unless
+override="true"
.manifest.hal.interface
<instance>
elements.manifest.hal.fqname
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
manifest.sepolicy.version
SDK_INT.PLAT_INT
.manifest.vendor-ndk
<vendor-ndk>
entries must have
+different <version>
’s. Describes a set of VNDK snapshots
+provided by the framework.manifest.vendor-ndk.version
manifest.vendor-ndk.library
libjpeg.so
, including the prefix
+lib
and the suffix .so
. No path components are
+allowed.manifest.system-sdk.version
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:
/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./sys/fs/selinux/policyvers
(assuming selinuxfs
- is mounted at /sys/fs/selinux
).security_policyvers()
API from libselinux
gives
- you the same.ro.boot.vbmeta.avb_version
ro.boot.avb_version
The VINTF object is a system API as the
-hwservicemanager
, OTA update service, CTS DeviceInfo
,
-and others need information from this API.
android::vintf::VintfObject
android.os.VintfObject
-