aboutsummaryrefslogtreecommitdiff
path: root/en/devices/architecture/vintf/objects.html
diff options
context:
space:
mode:
Diffstat (limited to 'en/devices/architecture/vintf/objects.html')
-rw-r--r--en/devices/architecture/vintf/objects.html212
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">
&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;!-- Comments, Legal notices, etc. here -->
-&lt;manifest version="1.0" type="device">
+&lt;manifest version="1.0" type="device" target-level="1">
&lt;hal>
&lt;name>android.hardware.camera&lt;/name>
&lt;transport>hwbinder&lt;/transport>
@@ -70,6 +83,21 @@ device at
&lt;instance>default&lt;/instance>
&lt;/interface>
&lt;/hal>
+ &lt;hal>
+ &lt;name>android.hardware.drm&lt;/name>
+ &lt;transport>hwbinder&lt;/transport>
+ &lt;version>1.0&lt;/version>
+ &lt;interface>
+ &lt;name>ICryptoFactory&lt;/name>
+ &lt;instance>default&lt;/instance>
+ &lt;/interface>
+ &lt;interface>
+ &lt;name>IDrmFactory&lt;/name>
+ &lt;instance>default&lt;/instance>
+ &lt;/interface>
+ &lt;fqname>@1.1::ICryptoFactory/clearkey&lt;/fqname>
+ &lt;fqname>@1.1::IDrmFactory/clearkey&lt;/fqname>
+ &lt;/hal>
&lt;hal format="native">
&lt;name>EGL&lt;/name>
&lt;version>1.1&lt;/version>
@@ -86,12 +114,47 @@ device at
&lt;/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">
+&lt;?xml version="1.0" encoding="UTF-8"?>
+&lt;!-- Comments, Legal notices, etc. here -->
+&lt;manifest version="1.0" type="device">
+ &lt;hal override="true">
+ &lt;name>android.hardware.camera&lt;/name>
+ &lt;transport>hwbinder&lt;/transport>
+ &lt;version>3.5&lt;/version>
+ &lt;interface>
+ &lt;name>ICameraProvider&lt;/name>
+ &lt;instance>legacy/0&lt;/instance>
+ &lt;/interface>
+ &lt;/hal>
+ &lt;hal override="true">
+ &lt;name>android.hardware.nfc&lt;/name>
+ &lt;transport>hwbinder&lt;/transport>
+ &lt;/hal>
+ &lt;hal>
+ &lt;name>android.hardware.power&lt;/name>
+ &lt;transport>hwbinder&lt;/transport>
+ &lt;version>1.1&lt;/version>
+ &lt;interface>
+ &lt;name>IPower&lt;/name>
+ &lt;instance>default&lt;/instance>
+ &lt;/interface>
+ &lt;/hal>
+&lt;/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">
&lt;?xml version="1.0" encoding="UTF-8"?>
@@ -133,20 +196,36 @@ and on the device under <code>/system/manifest.xml</code>.</p>
&lt;instance>default&lt;/instance>
&lt;/interface>
&lt;/hal>
+ &lt;vendor-ndk>
+ &lt;version>27&lt;/version>
+ &lt;/vendor-ndk>
+ &lt;system-sdk>
+ &lt;version>27&lt;/version>
+ &lt;/system-sdk>
&lt;/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>&lt;hal></code> elements with
+ the same <code>&lt;name></code> and major version. If no
+ <code>&lt;version></code> or <code>&lt;fqname></code> are in this
+ <code>&lt;hal></code> element, then this HAL is disabled.</li>
+ <li><code>false</code>: do not override other <code>&lt;hal></code> elements
+ with the same <code>&lt;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>&lt;instance&gt;</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>&lt;vendor-ndk></code> entries must have
+different <code>&lt;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>
+