From ea448b829ef3c5eefcadcd50fdf74c873eeadd86 Mon Sep 17 00:00:00 2001 From: Android Partner Docs Date: Wed, 8 Aug 2018 13:50:33 -0700 Subject: Docs: Changes to source.android.com - 207940242 One more fix: add header for Television Requirements. by Gina Dimino - 207936055 Update health README link. by Android Partner Docs - 207929938 Errata run for Android 9 CDD. by Gina Dimino - 207897850 Fix typos in Develop and Configure index pages by Kenneth Lau - 207813977 Devsite localized content from translation request 958913. by Android Partner Docs - 207813949 Devsite localized content from translation request 953118. by Android Partner Docs - 207813941 Devsite localized content from translation request 961934. by Android Partner Docs - 207813934 Devsite localized content from translation request 552632. by Android Partner Docs - 207813463 Update line numbers in links by Kenneth Lau - 207796341 Fixing the URL for the CDD link in versions file. by Gina Dimino - 207779392 Fix incorrect link by Kenneth Lau - 207777680 Update build numbers for 2018/08 releases by Android Partner Docs - 207775888 Update links to AOSP by Kenneth Lau - 207769948 Update links to AOSP by Kenneth Lau - 207763826 Clarify system for HIDL passthrough loading. by Android Partner Docs - 207733156 Fixing malformed links in html for kernel patches, adding... by Heidi von Markham - 207650104 Remove link by Heidi von Markham - 207640627 Tags for Android P. by Android Partner Docs - 207626815 Making link absolute by Clay Murphy - 207611166 Add Background Restrictions into Release Notes. by Christina Nguyen - 207606267 Fixing unclosed tag, reformatting for clarity by Heidi von Markham - 207604244 Fix malformed link by Clay Murphy - 207598416 adding subscript by Heidi von Markham - 207595049 Fix link in section 3.5.1. by Gina Dimino - 207590813 Fix broken link due to file path change by Christina Nguyen - 207588930 Update Power nav to include changes to mgmt page (broken ... by Christina Nguyen - 207588102 Separate out the Power Management article into "Applicati... by Christina Nguyen - 207583000 Fix broken links in HAL interface section by Kenneth Lau - 207582699 Put index files in place as redirects are not taking hold by Clay Murphy - 207575443 P release notes: fix bad links, remove "P release" by Mark Hecomovich - 207574657 Fix link typo from release notes to Carrier ID page by Christina Nguyen - 207559561 Integrate SAC next branch into mainline for Android P/9 p... by Mark Hecomovich - 207559252 Publish links to July localized versions within Japanese ... by Clay Murphy - 207122872 Devsite localized content from translation request 958912. by Android Partner Docs - 207122854 Devsite localized content from translation request 961384. by Android Partner Docs - 207007888 Add blurb about the SystemUpdateSampler app on SAC so use... by Christina Nguyen - 206862073 Update Camera HAL testing page by Kenneth Lau - 206805870 Devsite localized content from translation request 960240. by Android Partner Docs - 206805861 Devsite localized content from translation request 954945. by Android Partner Docs PiperOrigin-RevId: 207940242 Change-Id: I3dee204c744e2e6062ac56810b88aefabf84636a --- en/devices/architecture/vintf/objects.html | 212 +++++++++++++++++++---------- 1 file changed, 142 insertions(+), 70 deletions(-) (limited to 'en/devices/architecture/vintf/objects.html') diff --git a/en/devices/architecture/vintf/objects.html b/en/devices/architecture/vintf/objects.html index c7ab09fd..a5e34a2c 100644 --- a/en/devices/architecture/vintf/objects.html +++ b/en/devices/architecture/vintf/objects.html @@ -1,6 +1,6 @@ - VINTF Object Data + Manifests @@ -21,26 +21,39 @@ limitations under the License. --> -

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 -/vintfdata/manifest.xml. +

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:

+

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 overrides the vendor manifest and lists HALs specific to +the product.
  • +
+ +

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">
+<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

-

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 ODM manifest:

-

Example Framework manifest (provided by Google):

+
+<?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

+

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"?>
@@ -133,20 +196,36 @@ and on the device under /system/manifest.xml.

<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. Version of this manifest. Describes the elements -expected in the manifest. Unrelated to XML 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.
@@ -157,6 +236,17 @@ depending on the format attribute.
  • 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: @@ -185,7 +275,7 @@ provided. Value can be one of:
    manifest.hal.version
    -
    Required, can repeat. A version for the hal tags in a +
    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, @@ -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.
    +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 @@ -207,56 +298,37 @@ must be distinct.
    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 sepolicy version. It has the -format SDK_INT.PLAT_INT.
    +
    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.
    -

    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.

    - - - + -- cgit v1.2.3