aboutsummaryrefslogtreecommitdiff
path: root/en/devices/architecture/vintf
diff options
context:
space:
mode:
Diffstat (limited to 'en/devices/architecture/vintf')
-rw-r--r--en/devices/architecture/vintf/objects.html2
-rw-r--r--en/devices/architecture/vintf/resources.html46
2 files changed, 47 insertions, 1 deletions
diff --git a/en/devices/architecture/vintf/objects.html b/en/devices/architecture/vintf/objects.html
index 87abeedf..76d78ee0 100644
--- a/en/devices/architecture/vintf/objects.html
+++ b/en/devices/architecture/vintf/objects.html
@@ -125,7 +125,7 @@ and on the device under <code>/system/manifest.xml</code>.</p>
&lt;/interface>
&lt;/hal>
&lt;hal>
- &lt;name>android.framework.sensorservice&lt;/name>
+ &lt;name>android.frameworks.sensorservice&lt;/name>
&lt;transport>hwbinder&lt;/transport>
&lt;version>1.0&lt;/version>
&lt;interface>
diff --git a/en/devices/architecture/vintf/resources.html b/en/devices/architecture/vintf/resources.html
index 65828508..0f408a89 100644
--- a/en/devices/architecture/vintf/resources.html
+++ b/en/devices/architecture/vintf/resources.html
@@ -143,6 +143,52 @@ assemble_vintf \
-c $(TARGET_OUT_VENDOR)/manifest.xml \
</pre>
+<h4><strong>Example:</strong> Generate device manifest from fragments</h4>
+
+<p>Multiple device manifest fragments can be bundled at build time. For example:</p>
+
+<pre class="prettyprint">
+&lt;!-- device/manufacturer/device_name/manifest_common.xml -->
+&lt;manifest version="1.0" type="device">
+ &lt;!-- common HALs here -->
+&lt;/manifest>
+</pre>
+
+<pre class="prettyprint">
+&lt;!-- device/manufacturer/device_name/ir.xml -->
+&lt;manifest version="1.0" type="device">
+ &lt;hal>
+ &lt;name>android.hardware.ir&lt;/name>
+ &lt;version>1.0&lt;/version>
+ &lt;!-- other fields -->
+ &lt;/hal>
+&lt;/manifest>
+</pre>
+
+<pre class="prettyprint">
+# device/manufacturer/device_name/BoardConfig.mk
+DEVICE_MANIFEST_FILE := device/manufacturer/device_name/manifest_common.xml
+ifdef BOARD_ENABLE_IR
+ DEVICE_MANIFEST_FILE += device/manufacturer/device_name/ir.xml
+endif
+</pre>
+
+<p>Then, <code>assemble_vintf</code> adds Ir HAL to device manifest if <code>BOARD_ENABLE_IR</code>
+is defined, and omits it if <code>BOARD_ENABLE_IR</code> is not defined. The following commands
+(modified to omit implementation details) are executed to generate the device manifest:</p>
+
+<pre class="prettyprint">
+# if BOARD_ENABLE_IR is defined
+BOARD_SEPOLICY_VERS=10000.0 assemble_vintf \
+ -i device/manufacturer/device_name/manifest_common.xml:device/manufacturer/device_name/ir.xml \
+ -o $(TARGET_OUT_VENDOR)/manifest.xml
+
+# if BOARD_ENABLE_IR is not defined
+BOARD_SEPOLICY_VERS=10000.0 assemble_vintf \
+ -i device/manufacturer/device_name/manifest_common.xml \
+ -o $(TARGET_OUT_VENDOR)/manifest.xml
+</pre>
+
<p>For details, see:</p>
<pre class="devsite-terminal">assemble_vintf --help</pre>