diff options
author | Android Partner Docs <noreply@android.com> | 2018-08-08 13:50:33 -0700 |
---|---|---|
committer | Clay Murphy <claym@google.com> | 2018-08-08 14:05:32 -0700 |
commit | ea448b829ef3c5eefcadcd50fdf74c873eeadd86 (patch) | |
tree | 34c2647a8d8c2dffdbcdac2c5ba11d41d1426da8 /en/devices/architecture/vintf/objects.html | |
parent | 19a77ba572d415186ce503e4bf8be87fe45d08eb (diff) | |
download | source.android.com-ea448b829ef3c5eefcadcd50fdf74c873eeadd86.tar.gz |
Docs: Changes to source.android.com
- 207940242 One more fix: add header for Television Requirements. by Gina Dimino <gdimino@google.com>
- 207936055 Update health README link. by Android Partner Docs <noreply@android.com>
- 207929938 Errata run for Android 9 CDD. by Gina Dimino <gdimino@google.com>
- 207897850 Fix typos in Develop and Configure index pages by Kenneth Lau <kennethlau@google.com>
- 207813977 Devsite localized content from translation request 958913. by Android Partner Docs <noreply@android.com>
- 207813949 Devsite localized content from translation request 953118. by Android Partner Docs <noreply@android.com>
- 207813941 Devsite localized content from translation request 961934. by Android Partner Docs <noreply@android.com>
- 207813934 Devsite localized content from translation request 552632. by Android Partner Docs <noreply@android.com>
- 207813463 Update line numbers in links by Kenneth Lau <kennethlau@google.com>
- 207796341 Fixing the URL for the CDD link in versions file. by Gina Dimino <gdimino@google.com>
- 207779392 Fix incorrect link by Kenneth Lau <kennethlau@google.com>
- 207777680 Update build numbers for 2018/08 releases by Android Partner Docs <noreply@android.com>
- 207775888 Update links to AOSP by Kenneth Lau <kennethlau@google.com>
- 207769948 Update links to AOSP by Kenneth Lau <kennethlau@google.com>
- 207763826 Clarify system for HIDL passthrough loading. by Android Partner Docs <noreply@android.com>
- 207733156 Fixing malformed links in html for kernel patches, adding... by Heidi von Markham <hvm@google.com>
- 207650104 Remove link by Heidi von Markham <hvm@google.com>
- 207640627 Tags for Android P. by Android Partner Docs <noreply@android.com>
- 207626815 Making link absolute by Clay Murphy <claym@google.com>
- 207611166 Add Background Restrictions into Release Notes. by Christina Nguyen <cqn@google.com>
- 207606267 Fixing unclosed tag, reformatting for clarity by Heidi von Markham <hvm@google.com>
- 207604244 Fix malformed link by Clay Murphy <claym@google.com>
- 207598416 adding subscript by Heidi von Markham <hvm@google.com>
- 207595049 Fix link in section 3.5.1. by Gina Dimino <gdimino@google.com>
- 207590813 Fix broken link due to file path change by Christina Nguyen <cqn@google.com>
- 207588930 Update Power nav to include changes to mgmt page (broken ... by Christina Nguyen <cqn@google.com>
- 207588102 Separate out the Power Management article into "Applicati... by Christina Nguyen <cqn@google.com>
- 207583000 Fix broken links in HAL interface section by Kenneth Lau <kennethlau@google.com>
- 207582699 Put index files in place as redirects are not taking hold by Clay Murphy <claym@google.com>
- 207575443 P release notes: fix bad links, remove "P release" by Mark Hecomovich <mheco@google.com>
- 207574657 Fix link typo from release notes to Carrier ID page by Christina Nguyen <cqn@google.com>
- 207559561 Integrate SAC next branch into mainline for Android P/9 p... by Mark Hecomovich <mheco@google.com>
- 207559252 Publish links to July localized versions within Japanese ... by Clay Murphy <claym@google.com>
- 207122872 Devsite localized content from translation request 958912. by Android Partner Docs <noreply@android.com>
- 207122854 Devsite localized content from translation request 961384. by Android Partner Docs <noreply@android.com>
- 207007888 Add blurb about the SystemUpdateSampler app on SAC so use... by Christina Nguyen <cqn@google.com>
- 206862073 Update Camera HAL testing page by Kenneth Lau <kennethlau@google.com>
- 206805870 Devsite localized content from translation request 960240. by Android Partner Docs <noreply@android.com>
- 206805861 Devsite localized content from translation request 954945. by Android Partner Docs <noreply@android.com>
PiperOrigin-RevId: 207940242
Change-Id: I3dee204c744e2e6062ac56810b88aefabf84636a
Diffstat (limited to 'en/devices/architecture/vintf/objects.html')
-rw-r--r-- | en/devices/architecture/vintf/objects.html | 212 |
1 files changed, 142 insertions, 70 deletions
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 @@ <html devsite> <head> - <title>VINTF Object Data</title> + <title>Manifests</title> <meta name="project_path" value="/_project.yaml" /> <meta name="book_path" value="/_book.yaml" /> </head> @@ -21,26 +21,39 @@ limitations under the License. --> -<p>A VINTF object aggregates data from -<a href="#device-manifest-file">device manifest</a> and -<a href="#framework-manifest-file">framework manifest</a> files (XML) and from -the device itself at <a href="#runtime-data">runtime</a>. Both manifests share a -format, although not all elements apply to both (for details on the schema, see -<a href="#manifest-file-schema">Manifest file schema</a>).</p> - -<h2 id="device-manifest-file">Device manifest file</h2> -<p>The Device manifest file is provided by the device. It lives in the Android -source tree at <code>device/${VENDOR}/${DEVICE}/manifest.xml</code> and on the -device at -<code><a href="https://android.googlesource.com/platform/system/libhidl/+/master/vintfdata/manifest.xml" class="external">/vintfdata/manifest.xml</a></code>. +<p>A VINTF object aggregates data from <a href="#device-manifest-file">device +manifest</a> and <a href="#framework-manifest-file">framework manifest</a> files +(XML) and from the device itself at <a href="#runtime-data">runtime</a>. Both +manifests share a format, although not all elements apply to both (for details +on the schema, see <a href="#manifest-file-schema">Manifest file schema</a>). </p> -<p>Example Device manifest:</p> +<h2 id="device-manifest-file">Device manifest</h2> +<p>The Device manifest (provided by the device) consists of the vendor manifest +and the ODM manifest:</p> + +<ul> +<li>The vendor manifest specifies HALs, VNDK versions, etc. common to an SoC. It +is recommended to be placed in the Android source tree at +<code>device/${VENDOR}/${DEVICE}/manifest.xml</code>, but multiple fragment +files can be used. For details, see +<a href="/devices/architecture/vintf/resources.html#manifest-fragments">Generate +DM from fragments</a>. +</li> +<li>The ODM manifest overrides the vendor manifest and lists HALs specific to +the product.</li> +</ul> + +<p>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).</p> + +<p>Example vendor manifest:</p> <pre class="prettyprint"> <?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> </pre> -<h2 id="framework-manifest-file">Framework manifest file</h2> -<p>The Framework manifest file is provided by Google and is manually generated. -It lives in the Android source tree at <code>system/libhidl/manifest.xml</code> -and on the device under <code>/system/manifest.xml</code>.</p> +<p>Example ODM manifest:</p> -<p>Example Framework manifest (provided by Google):</p> +<pre class="prettyprint"> +<?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> +</pre> + +For more details, see <a href="/devices/architecture/vintf/dm">DM +Development</a>. + +<h2 id="framework-manifest-file">Framework manifest</h2> +<p>The Framework manifest file (provided by Google) is manually generated and +lives in the Android source tree at +<code><a href="https://android.googlesource.com/platform/system/libhidl/+/master/manifest.xml" class="external">/system/libhidl/manifest.xml</a></code>. +</p> + +<p>Example Framework manifest:</p> <pre class="prettyprint"> <?xml version="1.0" encoding="UTF-8"?> @@ -133,20 +196,36 @@ and on the device under <code>/system/manifest.xml</code>.</p> <instance>default</instance> </interface> </hal> + <vendor-ndk> + <version>27</version> + </vendor-ndk> + <system-sdk> + <version>27</version> + </system-sdk> </manifest> </pre> <h2 id="manifest-file-schema">Manifest file schema</h2> +<p>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 +<code><a href="/devices/architecture/vintf/resources.html#assemble_vintf">assemble_vintf</a></code> +at build time. "Required" tags must be present in the corresponding files on the +device.</p> + <dl> <dt><code>?xml</code></dt> <dd>Optional. Only provides information to the XML parser.</dd> <dt><code>manifest.version</code></dt> -<dd>Required. Version of <strong>this</strong> manifest. Describes the elements -expected in the manifest. Unrelated to XML version.</dd> +<dd>Required. Meta-version of <strong>this</strong> manifest. Describes the +elements expected in the manifest. Unrelated to XML version.</dd> <dt><code>manifest.type</code></dt> <dd>Required. Type of this manifest. It has value <code>device</code> for device manifest file and <code>framework</code> for framework manifest file.</dd> +<dt><code>manifest.target-level</code></dt> +<dd>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.</dd> <dt><code>manifest.hal</code></dt> <dd>Optional, can repeat. A single HAL (HIDL or native, such as GL), depending on the <code>format</code> attribute.</dd> @@ -157,6 +236,17 @@ depending on the <code>format</code> attribute.</dd> <li><code>native</code>: native HALs.</li> </ul> </dd> +<dt><code>manifest.hal.override</code></dt> +<dd>Optional. Value can be one of: + <ul> + <li><code>true</code>: override other <code><hal></code> elements with + the same <code><name></code> and major version. If no + <code><version></code> or <code><fqname></code> are in this + <code><hal></code> element, then this HAL is disabled.</li> + <li><code>false</code>: do not override other <code><hal></code> elements + with the same <code><name></code> and major version.</li> + </ul> +</dd> <dt><code>manifest.hal.name</code></dt> <dd>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: </ul> </dd> <dt><code>manifest.hal.version</code></dt> -<dd>Required, can repeat. A version for the <code>hal</code> tags in a +<dd>Optional, can repeat. A version for the <code>hal</code> tags in a manifest. Format is <code><var>MAJOR</var>.<var>MINOR</var></code>. For examples, refer to <code>hardware/interfaces</code>, <code>vendor/${VENDOR}/interfaces</code>, @@ -195,7 +285,8 @@ system/hardware/interfaces</code>. HIDL and native HALs may use multiple version fields as long as they represent <strong>distinct major versions</strong>, 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 <code>hal</code> elements with the same name.</dd> +This applies for all <code>hal</code> elements with the same name, unless +<code>override="true"</code>.</dd> <dt><code>manifest.hal.interface</code></dt> <dd>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.</dd> <dd>Required, can repeat. Instance name of the interface. Can have multiple instances for an interface but no duplicated <code><instance></code> elements.</dd> +<dt><code>manifest.hal.fqname</code></dt> +<dd>Optional, can repeat. An alternative way to specify an instance for the HAL +with name <code>manifest.hal.name</code>. Format is +<code>@<var>MAJOR</var>.<var>MINOR</var>::<var>INTERFACE</var>/<var>INSTANCE</var></code>. +For devices upgrading from Android 8.0, this cannot be used to declare +instances required by the compatibility matrix.</dd> <dt><code>manifest.sepolicy</code></dt> <dd>Required. Contains all sepolicy-related entries.</dd> <dt><code>manifest.sepolicy.version</code></dt> -<dd>Required for device manifest. Declares sepolicy version. It has the -format <var>SDK_INT</var>.<var>PLAT_INT</var>.</dd> +<dd>Required for device manifest. Declares SELinux version. It has the +format <code><var>SDK_INT</var>.<var>PLAT_INT</var></code>.</dd> +<dt><code>manifest.vendor-ndk</code></dt> +<dd>Required, can repeat; required for framework manifest. Must not be present +in the device manifest. Multiple <code><vendor-ndk></code> entries must have +different <code><version></code>’s. Describes a set of VNDK snapshots +provided by the framework.</dd> +<dt><code>manifest.vendor-ndk.version</code></dt> +<dd>Required. It is a positive integer representing the version of the VNDK +snapshot.</dd> +<dt><code>manifest.vendor-ndk.library</code></dt> +<dd>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. <code>libjpeg.so</code>, including the prefix +<code>lib</code> and the suffix <code>.so</code>. No path components are +allowed.</dd> +<dt><code>manifest.system-sdk.version</code></dt> +<dd>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.</dd> </dl> -<h2 id=runtime-data>Runtime data</h2> -<p>Some information required for the device manifest can be collected only at -runtime. Information is available via -<code>::android::vintf::VintfObject::GetRuntimeInfo()</code> and includes the -following:</p> - -<ul> -<li>Kernel information, including: - <ul> - <li><code>/proc/config.gz</code>. Zipped full kernel configuration that needs - to be read at runtime and converted to a queryable object.</li> - <li><code>/proc/version</code>. Information available through - <code>uname()</code> system call.</li> - <li><code>/proc/cpuinfo</code>. Format may be different for 32-bit and 64-bit - machine.</li> - <li>policydb version - <ul> - <li><code>/sys/fs/selinux/policyvers</code> (assuming <code>selinuxfs</code> - is mounted at <code>/sys/fs/selinux</code>).</li> - <li><code>security_policyvers()</code> API from <code>libselinux</code> gives - you the same.</li> - </ul> - </li> - </ul> -<li>static libavb version, including: - <ul> - <li>bootloader system property: <code>ro.boot.vbmeta.avb_version</code></li> - <li>init/fs_mgr system property: <code>ro.boot.avb_version</code></li> - </ul> -</li> -</ul> - -<h2 id="queryable-api">Queryable API</h2> -<p>The VINTF object is a system API as the -<code>hwservicemanager</code>, OTA update service, CTS <code>DeviceInfo</code>, -and others need information from this API.</p> - -<ul> -<li>C++ queryable API is in -<a href="https://android.googlesource.com/platform/system/libvintf/+/master/include/vintf/VintfObject.h" class="external"><code>android::vintf::VintfObject</code></a></li> -<li>Java queryable API is in -<a href="https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/os/VintfObject.java" class="external"><code>android.os.VintfObject</code></a> -</ul> - </body> </html> + |