Merge "Update build numbers for LMY47Z"
diff --git a/src/accessories/accessories_toc.cs b/src/accessories/accessories_toc.cs
index 654ff7b..a30f860 100644
--- a/src/accessories/accessories_toc.cs
+++ b/src/accessories/accessories_toc.cs
@@ -30,7 +30,18 @@
</a>
</div>
<ul>
- <li><a href="<?cs var:toroot ?>accessories/headset-spec.html">Headset specification</a></li>
+ <li class="nav-section">
+ <div class="nav-section-header">
+ <a href="<?cs var:toroot ?>accessories/headset/index.html">
+ <span class="en">Headset</span>
+ </a>
+ </div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>accessories/headset/specification.html">Specification</a></li>
+ <li><a href="<?cs var:toroot ?>accessories/headset/requirements.html">Requirements</a></li>
+ <li><a href="<?cs var:toroot ?>accessories/headset/testing.html">Testing</a></li>
+ </ul>
+ </li>
</ul>
</li>
<li class="nav-section">
diff --git a/src/accessories/audio.jd b/src/accessories/audio.jd
index 5e2d32c..7a259a1 100644
--- a/src/accessories/audio.jd
+++ b/src/accessories/audio.jd
@@ -32,7 +32,7 @@
<h2 id="audio-over-35mm">Audio over 3.5 mm headset connector</h2>
<p>Many Android-based devices include a 3.5 mm (“mini”) headset connector. In
addition to the traditional stereo output and mono input features, the <a
-href="headset-spec.html">Wired audio headset specification</a> defines standard
+href="headset/specification.html">Wired audio headset specification</a> defines standard
impedances and functions so a range of Android devices and headsets can inter-operate.</p>
<h2 id="audio-over-usb">Audio over USB</h2>
diff --git a/src/accessories/headset/images/button_configuration.png b/src/accessories/headset/images/button_configuration.png
new file mode 100644
index 0000000..52a0750
--- /dev/null
+++ b/src/accessories/headset/images/button_configuration.png
Binary files differ
diff --git a/src/accessories/headset/images/button_icons.png b/src/accessories/headset/images/button_icons.png
new file mode 100644
index 0000000..e7b695a
--- /dev/null
+++ b/src/accessories/headset/images/button_icons.png
Binary files differ
diff --git a/src/accessories/headset/images/button_spacing.png b/src/accessories/headset/images/button_spacing.png
new file mode 100644
index 0000000..2bc6cdf
--- /dev/null
+++ b/src/accessories/headset/images/button_spacing.png
Binary files differ
diff --git a/src/accessories/images/headset-circuit1.png b/src/accessories/headset/images/headset-circuit1.png
similarity index 100%
rename from src/accessories/images/headset-circuit1.png
rename to src/accessories/headset/images/headset-circuit1.png
Binary files differ
diff --git a/src/accessories/images/headset-circuit2.png b/src/accessories/headset/images/headset-circuit2.png
similarity index 100%
rename from src/accessories/images/headset-circuit2.png
rename to src/accessories/headset/images/headset-circuit2.png
Binary files differ
diff --git a/src/accessories/headset/images/icon_sizing.png b/src/accessories/headset/images/icon_sizing.png
new file mode 100644
index 0000000..8bfd128
--- /dev/null
+++ b/src/accessories/headset/images/icon_sizing.png
Binary files differ
diff --git a/src/accessories/headset/images/media_four.png b/src/accessories/headset/images/media_four.png
new file mode 100644
index 0000000..128dba0
--- /dev/null
+++ b/src/accessories/headset/images/media_four.png
Binary files differ
diff --git a/src/accessories/headset/images/media_one.png b/src/accessories/headset/images/media_one.png
new file mode 100644
index 0000000..3f9d4db
--- /dev/null
+++ b/src/accessories/headset/images/media_one.png
Binary files differ
diff --git a/src/accessories/headset/images/media_three.png b/src/accessories/headset/images/media_three.png
new file mode 100644
index 0000000..5f1105c
--- /dev/null
+++ b/src/accessories/headset/images/media_three.png
Binary files differ
diff --git a/src/accessories/headset/images/media_two.png b/src/accessories/headset/images/media_two.png
new file mode 100644
index 0000000..3b1e26c
--- /dev/null
+++ b/src/accessories/headset/images/media_two.png
Binary files differ
diff --git a/src/accessories/headset/images/microphone.png b/src/accessories/headset/images/microphone.png
new file mode 100644
index 0000000..1b19015
--- /dev/null
+++ b/src/accessories/headset/images/microphone.png
Binary files differ
diff --git a/src/accessories/headset/images/telephony_four.png b/src/accessories/headset/images/telephony_four.png
new file mode 100644
index 0000000..bea091e
--- /dev/null
+++ b/src/accessories/headset/images/telephony_four.png
Binary files differ
diff --git a/src/accessories/headset/images/telephony_one.png b/src/accessories/headset/images/telephony_one.png
new file mode 100644
index 0000000..0760f25
--- /dev/null
+++ b/src/accessories/headset/images/telephony_one.png
Binary files differ
diff --git a/src/accessories/headset/images/telephony_three.png b/src/accessories/headset/images/telephony_three.png
new file mode 100644
index 0000000..b2c8e29
--- /dev/null
+++ b/src/accessories/headset/images/telephony_three.png
Binary files differ
diff --git a/src/accessories/headset/images/telephony_two.png b/src/accessories/headset/images/telephony_two.png
new file mode 100644
index 0000000..1ba31e2
--- /dev/null
+++ b/src/accessories/headset/images/telephony_two.png
Binary files differ
diff --git a/src/accessories/headset/index.jd b/src/accessories/headset/index.jd
new file mode 100644
index 0000000..d66c6ac
--- /dev/null
+++ b/src/accessories/headset/index.jd
@@ -0,0 +1,29 @@
+page.title=Android Audio Headset
+@jd:body
+
+<!--
+ Copyright 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<p>This section describes the development and testing of the Android headset
+accessory interface. This documentation presents the interface guidelines for the
+Android headset inline remote.</p>
+
+<p>The goal is to maintain certain standards for consistency and design while
+allowing for freedom in design expression. If you choose to implement a
+dedicated Android headset accessory, please follow these guidelines to ensure
+your headset is compatible with devices following the recommendations in the <a
+href="{@docRoot}compatibility/android-cdd.pdf">Android Compatibility Definition
+Document (CDD)</a>.</p>
diff --git a/src/accessories/headset/requirements.jd b/src/accessories/headset/requirements.jd
new file mode 100644
index 0000000..f8ed1e9
--- /dev/null
+++ b/src/accessories/headset/requirements.jd
@@ -0,0 +1,189 @@
+page.title=Headset Requirements
+@jd:body
+
+<!--
+ Copyright 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol id="auto-toc">
+ </ol>
+ </div>
+</div>
+
+<h2 id=media>Media</h2>
+
+<p>If a user connects a headset to the device while playing media, the audio
+output (sound) should be heard only via the headset.</p>
+
+<p>For example, while playing media with the <a
+href="https://github.com/googlesamples/android-UniversalMusicPlayer">open
+source</a> <a
+href="https://android-developers.blogspot.com/2015/03/a-new-reference-app-for-multi-device.html">Universal
+Music Player</a>, pressing the play/pause button should pause playback.
+Pressing the same button when media is paused should resume playback.</p>
+
+<p>If the headset has volume control buttons: </p>
+
+<ul>
+ <li> Pressing the volume-up button should increase the volume incrementally each
+time the button is pressed until maximum volume is reached. If the volume-up
+button is pressed and held, the volume should gradually increase to maximum
+volume setting.
+ <li> Pressing the volume-down button should decrease the volume incrementally each
+time the button is pressed until entirely muted. If the volume-down button is
+pressed and held, the volume should gradually decrease to silent.
+ <li> Pressing the volume-up button when in a muted state should increase the volume
+one notch at a time starting from silent.
+</ul>
+
+<p><strong>Recommended for Apps</strong>: On disconnecting the headset, sound output should stop and playback should
+pause. On reconnecting, playback should not start again unless the user presses
+the play button. Upon pressing play, sound output should again be limited to
+the headset.</p>
+
+<h3 id=one_button>One button</h3>
+
+<img src="images/media_one.png" width="80%" alt="Button functions for one-button headsets handling a media stream.">
+</span>
+
+<p class="img-caption"><strong>Figure 1.</strong> Button functions for one-button headsets handling a media stream.</p>
+
+<h3 id=two_buttons>Two buttons</h3>
+
+<img src="images/media_two.png" alt="Button functions for two-button headsets handling a media stream.">
+
+<p class="img-caption"><strong>Figure 2.</strong> Button functions for two-button headsets handling a media stream.</p>
+
+<h3 id=three_buttons>Three buttons</h3>
+
+<img src="images/media_three.png" alt="Button functions for three-button headsets handling a media stream.">
+
+<p class="img-caption"><strong>Figure 3.</strong> Button functions for three-button headsets handling a media stream.</p>
+
+<h3 id=four_buttons>Four buttons</h3>
+
+<img src="images/media_four.png" alt="Button functions for four-button headsets handling a media stream.">
+
+<p class="img-caption"><strong>Figure 4.</strong> Button functions for four-button headsets handling a media stream.</p>
+
+<h2 id=telephony>Telephony</h2>
+
+
+<p>If a user connects a headset to the device while a call is in progress, the
+conversation should continue on the headset. The call should not get
+disconnected, and the microphone should not be muted. If present, volume
+buttons should behave identically to media playback.</p>
+
+<p>Pressing the play/pause button while a phone call is in progress should toggle
+the microphone state between muted and unmuted. If a user receives calls while
+using the headset, the voice assistance button should allow handling of those
+calls:</p>
+
+<ul>
+ <li> While in a phone call, pressing quickly on the play/pause button should mute
+the microphone. And if pressed quickly again, the microphone should un-mute.
+ <li> While in a phone call, a long press on the play/pause button should end the
+telephone call.
+ <li> While receiving a phone call, pressing quickly on the play/pause button should
+accept the call.
+ <li> While receiving a phone call, a long press on the play/pause button should
+reject the call.
+</ul>
+
+<h3 id=one_button>One button</h3>
+
+<img src="images/telephony_one.png" alt="Button functions for one-button headsets handling a phone call.">
+
+<p class="img-caption"><strong>Figure 5.</strong> Button functions for one-button headsets handling a phone call. </p>
+
+<h3 id=two_buttons>Two buttons</h3>
+
+<img src="images/telephony_two.png" alt="Button functions for two-button headsets handling a phone call.">
+
+<p class="img-caption"><strong>Figure 6.</strong> Button functions for two-button headsets handling a phone call. </p>
+
+<h3 id=three_buttons>Three buttons</h3>
+
+<img src="images/telephony_three.png" alt="Button functions for three-button headsets handling a phone call.">
+
+<p class="img-caption"><strong>Figure 7.</strong> Button functions for three-button headsets handling a phone call. </p>
+
+<h3 id=four_buttons>Four buttons</h3>
+
+<img src="images/telephony_four.png" alt="Button functions for four-button headsets handling a phone call.">
+<p class="img-caption"><strong>Figure 8.</strong> Button functions for four-button headsets handling a phone call. </p>
+
+<h2 id=voice_assistance>Voice assistance</h2>
+
+<p>The voice assistance button is a new inline control standard for consistently
+and conveniently accessing a voice search feature from any approved wearable
+audio device. By pressing the button defined here, users will hear the two-tone
+signature <a href="http://en.wikipedia.org/wiki/Earcon">earcon</a> indicating that the device is listening and ready to receive the query.</p>
+
+<p>Whether embedded into a multi-function button or highlighted as a single
+button, it should always be quickly accessible, ergonomically correct, and
+placed intuitively as described in the following section.</p>
+
+<h2 id=buttons_and_function_mapping>Buttons and function mapping recommendations</h2>
+
+<p>The following diagrams depict the acceptable configuration of the Android voice
+assistance button.</p>
+
+<h3 id=options>Options</h3>
+
+<img src="images/button_configuration.png" alt="Button configuration options.">
+
+<p class="img-caption"><strong>Figure 9.</strong> Button configuration options. </p>
+
+<p>Buttons should always be front facing and spaced out so they can be easily
+located by touch only.</p>
+
+<h3 id=spacing>Spacing</h3>
+
+<p>Buttons must be more than 5mm and must have at least 5mm distance between
+buttons. For four-button headsets, there must be at least 9mm of space between
+button D and the cluster of other buttons. </p>
+
+<img src="images/button_spacing.png" alt="Button spacing requirements">
+
+<p class="img-caption"><strong>Figure 10.</strong> Button spacing requirements.</p>
+
+<h3 id=icon>Icon</h3>
+
+<p>In the following diagram, A is unlabeled or labeled with a dot. B is labeled
+with a + or an arrow pointing up. C is labeled with a - or an arrow pointing
+down. D is labeled with the selected button icon.</p>
+
+<img src="images/button_icons.png" alt="Button icon requirements">
+<p class="img-caption"><strong>Figure 11.</strong> Button icon requirements. </p>
+
+<h3 id=sizing>Sizing</h3>
+
+<p>The following diagram shows the ratio of button icon to the space around it.</p>
+
+<img src="images/icon_sizing.png" alt="Voice search button icon sizing requirements">
+
+<p class="img-caption"><strong>Figure 12.</strong> Voice search button icon sizing requirements. </p>
+
+<h3 id=microphone_port>Microphone port</h3>
+
+<p>The microphone should never be obstructed when operating the buttons. Place the
+port away from finger interface area.</p>
+
+<img src="images/microphone.png" alt="MIcrophone placement">
+
+<p class="img-caption"><strong>Figure 13.</strong> Microphone placement. </p>
diff --git a/src/accessories/headset-spec.jd b/src/accessories/headset/specification.jd
similarity index 98%
rename from src/accessories/headset-spec.jd
rename to src/accessories/headset/specification.jd
index 572bb12..d1616b1 100644
--- a/src/accessories/headset-spec.jd
+++ b/src/accessories/headset/specification.jd
@@ -1,4 +1,4 @@
-page.title=Wired audio headset specification (v1.1)
+page.title=Wired Audio Headset Specification (v1.1)
@jd:body
<!--
@@ -80,7 +80,7 @@
<tr>
<td>Function D</td>
<td>Optional</td>
- <td>Reserved (Nexus devices use this to launch Google voice search)
+ <td>Reserved (Nexus devices use this to launch Voice Assist)
</td>
</tr>
</table>
@@ -407,4 +407,4 @@
<td>Required</td>
<td>Line In (high) > 5 Kohm</td>
</tr>
-</table>
\ No newline at end of file
+</table>
diff --git a/src/accessories/headset/testing.jd b/src/accessories/headset/testing.jd
new file mode 100644
index 0000000..c66d4f0
--- /dev/null
+++ b/src/accessories/headset/testing.jd
@@ -0,0 +1,112 @@
+page.title=Testing
+@jd:body
+
+<!--
+ Copyright 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol id="auto-toc">
+ </ol>
+ </div>
+</div>
+
+<h2 id=headset_insertion>Headset insertion</h2>
+
+<ol>
+ <li> Start with the Android device turned off.
+ <li> Plug in the headset.
+ <li> Turn the device on.
+ <li> Unlock.
+ <li> Open the <a
+ href="https://github.com/googlesamples/android-UniversalMusicPlayer">open
+ source</a> <a
+ href="https://android-developers.blogspot.com/2015/03/a-new-reference-app-for-multi-device.html">Universal
+ Music Player</a>.
+ <li> Press the DUT volume buttons to maximize media volume.
+ <li> Start playing music and verify audio comes out of the headset.
+ <li> While Music is playing, disconnect the headset and verify music stops.
+ <li> Reconnect the headset, start playing music again, and verify audio comes out of
+the headset.
+</ol>
+
+<h2 id=volume_buttons>Volume buttons</h2>
+
+<ol>
+ <li> Play music and ensure it is coming out of the headset.
+ <li> Press (“short press”) on the volume-down button. Then verify the volume panel
+displays the media volume decrease by one notch and the volume output is
+reduced as expected.
+ <li> Long press on the volume-down button. Then verify the volume panel shows media
+volume going all the way down and volume output is reduced gradually to muted.
+ <li> Press on the volume-up button. Then verify the volume panel displays the media
+volume go up one notch and the volume output is increased as expected.
+ <li> Long press on the volume-up button. Then verify the volume panel shows the
+media volume go all the way up to maximum and the volume output is increased as
+expected.
+</ol>
+
+<h2 id=play_pause_for_music>Play/pause for music</h2>
+
+<p>Press quickly on the play/pause button and verify music stops playing out of
+the headset. If music was not already playing, then it should start playing out
+of the headset.</p>
+
+<h2 id=play_pause_for_telephony>Play/pause for telephony</h2>
+
+<ol>
+ <li> Make a phone call.
+ <li> Press quickly on the play/pause button while in the call.
+ <li> Verify the microphone mutes. And if you press quickly again, the microphone
+should un-mute.
+ <li> While still in the call, long press on the play/pause button.
+ <li> Verify the long press ends the telephone call
+ <li> Receive a phone call on the Android device.
+ <li> Press quickly on the play/pause button while the phone is ringing and verify
+the call is accepted.
+ <li> Receive another phone call on the Android device.
+ <li> Long press on the play/pause button while the phone is ringing and verify the
+call is rejected.
+</ol>
+
+<h2 id=play_pause_for_voice_actions_microphone>Play/pause for voice actions + microphone</h2>
+
+<ol>
+ <li> Open the screen on your Android device, unlock it, and go to the home screen.
+ <li> Long press on the play/pause button.
+ <li> Verify:
+ <ol>
+ <li> you hear a beep after which you should be able to make a voice search query,
+such as “What time is it?”
+ <li> you hear a response, such as “The time is ...”
+ </ol>
+ </ol>
+
+<h2 id=voice_button_for_voice_actions_microphone>Voice button for voice actions + microphone</h2>
+
+<ol>
+ <li> Open the screen on your Android device, unlock it, and go to the home screen.
+ <li> Short press on the voice button.
+ <li> Verify:
+ <ol>
+ <li> you hear a beep after which you should be able to make a search query, such as
+“What time is it?”
+ <li> you hear a response, such as “The time is ...”
+ </ol>
+ </ol>
+
+<p><strong>Important</strong>: A press on the voice button can launch launch any search app, for example
+Google search.</p>
diff --git a/src/accessories/index.jd b/src/accessories/index.jd
index d30c0ce..23ff067 100644
--- a/src/accessories/index.jd
+++ b/src/accessories/index.jd
@@ -29,7 +29,7 @@
<p>Android supports local on-device audio and remote off-device audio
over a wired 3.5 mm headset jack, USB connection, or Bluetooth.
Manufacturers should see the <a
- href="{@docRoot}accessories/headset-spec.html">wired audio headset
+ href="{@docRoot}accessories/headset/specification.html">wired audio headset
specification</a>, while users may learn how to <a
href="https://support.google.com/nexus/answer/6127700">record and play
back audio using USB host mode</a>.</p>
diff --git a/src/devices/bluetooth.jd b/src/devices/bluetooth.jd
index 8677b7d..a1ec72f 100644
--- a/src/devices/bluetooth.jd
+++ b/src/devices/bluetooth.jd
@@ -26,12 +26,12 @@
<img style="float: right; margin: 0px 15px 15px 15px;" src="images/ape_fwk_hal_bluetooth.png" alt="Android Bluetooth HAL icon"/>
-<p>Android provides a default Bluetooth stack, BlueDroid, that is divided into two layers: The Bluetooth Embedded System (BTE), which implements the core Bluetooth functionality and the Bluetooth Application Layer (BTA), which communicates with Android framework applications.</p>
+<p>Android provides a default Bluetooth stack that is divided into two layers: The Bluetooth Embedded System (BTE), which implements the core Bluetooth functionality, and the Bluetooth Application Layer (BTA), which communicates with Android framework applications.</p>
<p>To fully leverage the <a href="http://developer.android.com/about/versions/android-5.0.html#BluetoothBroadcasting">Bluetooth Low Energy APIs</a> added in Android 5.0, you should implement the <a href="Android-5.0-Bluetooth-HCI-Reqs.pdf">Android 5.0 Bluetooth HCI Requirements</a>.</p>
<h2 id="architecture">Architecture</h2>
-<p>A Bluetooth system service communicates with the Bluetooth stack through JNI and with applications through Binder IPC. The system service provides developers access to various Bluetooth profiles. The following diagram shows the general structure of the Bluetooth stack:
+<p>A Bluetooth system service communicates with the Bluetooth stack through JNI and with applications through Binder IPC. The system service provides developers with access to various Bluetooth profiles. The following diagram shows the general structure of the Bluetooth stack:
</p>
<img src="images/ape_fwk_bluetooth.png" alt="Android Bluetooth architecture" id="figure1" />
@@ -41,7 +41,7 @@
<dl>
<dt>Application framework</dt>
- <dd>At the application framework level is the app's code, which utilizes the <a
+ <dd>At the application framework level is application code, which utilizes the <a
href="http://developer.android.com/reference/android/bluetooth/package-summary.html">android.bluetooth</a>
APIs to interact with the Bluetooth hardware. Internally, this code calls the Bluetooth process through
the Binder IPC mechanism.</dd>
@@ -61,16 +61,16 @@
<dt>HAL</dt>
<dd>The hardware abstraction layer defines the standard interface that the <a
href="http://developer.android.com/reference/android/bluetooth/package-summary.html">android.bluetooth</a> APIs
- and Bluetooth process calls into and that you must implement to have your Bluetooth hardware
- function correctly. The header files for the Bluetooth HAL is located
- in the <code>hardware/libhardware/include/hardware/bluetooth.h</code> and
+ and Bluetooth process call into and that you must implement to have your Bluetooth hardware
+ function correctly. The header file for the Bluetooth HAL
+ is <code>hardware/libhardware/include/hardware/bluetooth.h</code>. Additionally, please review all of the
<code>hardware/libhardware/include/hardware/bt_*.h</code> files.
</dd>
<dt>Bluetooth stack</dt>
<dd>The default Bluetooth stack is provided for you and is located in
- <code>external/bluetooth/bluedroid</code>. The stack implements the generic Bluetooth HAL as well
- as customizes it with extensions and configuration changes.
+ <code>system/bt</code>. The stack implements the generic Bluetooth HAL and
+ customizes it with extensions and configuration changes.
</dd>
<dt>Vendor extensions</dt>
@@ -80,13 +80,17 @@
</dl>
-
<h2 id="implementing">Implementing the HAL</h2>
-<p>The Bluetooth HAL is located in the <code>hardware/libhardware/include/hardware/</code> directory. Please see that directory for the <strong>complete set</strong> of files, which include but are not limited to the following:
-</p>
+<p>The Bluetooth HAL is located in <code>/hardware/libhardware/include/hardware/bluetooth.h</code>.
+Thus, the <code>bluetooth.h</code> file contains the basic interface for the Bluetooth stack, and you must implement its functions.</p>
+
+<p>Profile-specific files are located in the same directory. For details, see the <a
+href="{@docRoot}devices/halref/dir_6b11132f1a015b03f2670f21bef1d871.html">HAL File Reference</a>.</p>
+
+<p>The following is a <strong>partial</strong> list of the profile-related
+files. For the <strong>complete set</strong>, see the <code>/hardware/libhardware/include/hardware/</code> directory:</p>
<ul>
- <li><code>bluetooth.h</code>: Includes the interface definition for the Bluetooth hardware on the device.</li>
<li><code>bt_av.h</code>: Includes the interface definition for the A2DP profile.</li>
<li><code>bt_gatt.h</code>, <code>bt_gatt_client.h</code>, and <code>bt_gatt_server.h</code>: These include the interface definition for the GATT profile.</li>
<li><code>bt_hf.h</code>: Includes the interface definition for the HFP profile.</li>
@@ -100,22 +104,18 @@
<p>Keep in mind that your Bluetooth implementation is not constrained to the features
and profiles exposed in the HAL. You can find the default implementation located
- in the BlueDroid Bluetooth stack in the <code>external/bluetooth/bluedroid</code> directory,
+ in the Bluetooth stack in the <code>system/bt</code> directory,
which implements the default HAL and also extra features and customizations.</p>
-</p>
-<h2>Customizing the BlueDroid Stack</h2>
-<p>If you are using the default BlueDroid stack, but want to make a few customizations, you can
- do the following things:</p>
-
+<h2 id="customizing">Customizing the Native Bluetooth Stack</h2>
+<p>If you are using the default Bluetooth stack, but want to make a few customizations, you can
+ do the following:</p>
<ul>
<li>Custom Bluetooth profiles - If you want to add Bluetooth profiles that do not have
- HAL interfaces provided by Android, you must supply an SDK add-on download to make the profile available to app developers,
- make the APIs available in the Bluetooth system process app (<code>packages/apps/Bluetooth</code>), and add them
- to the BlueDroid stack (<code>external/bluetooth/bluedroid</code>).</li>
+ HAL interfaces provided by Android, you must supply an SDK add-on download to make the profile available to app developers, make the APIs available in the Bluetooth system process app (<code>packages/apps/Bluetooth</code>), and add them to the default stack (<code>system/bt</code>).</li>
<li>Custom vendor extensions and configuration changes - You can add things such as extra AT commands or device-specific configuration changes
- by creating a <code>libbt-vendor</code> module. See the <code>vendor/broadcom/libbt-vendor</code> directory
+ by creating a <code>libbt-vendor</code> module. See the <code>/hardware/broadcom/libbt</code> directory
for an example.</li>
<li>Host Controller Interface (HCI) - You can provide your own HCI by creating a <code>libbt-hci</code> module, which
is mainly used for debug tracing. See the <code>external/bluetooth/hci</code> directory for an example.</li>
diff --git a/src/devices/images/ape_fwk_bluetooth.png b/src/devices/images/ape_fwk_bluetooth.png
index c79fe5b..7a8ba54 100644
--- a/src/devices/images/ape_fwk_bluetooth.png
+++ b/src/devices/images/ape_fwk_bluetooth.png
Binary files differ
diff --git a/src/devices/index.jd b/src/devices/index.jd
index e433f1c..a09d10c 100644
--- a/src/devices/index.jd
+++ b/src/devices/index.jd
@@ -1,4 +1,4 @@
-page.title=Android Interfaces
+page.title=Android Interfaces and Architecture
@jd:body
<!--
@@ -40,8 +40,6 @@
<a href="{@docRoot}compatibility/index.html">Compatibility</a>.
</p>
-<h2 id="Android system architecture">Android system architecture</h2>
-
<p>
Before porting Android to your hardware, take a moment to understand the Android
system architecture at a high level. Because your drivers and the HAL interact
@@ -53,7 +51,7 @@
<p class="img-caption"><strong>Figure 1.</strong> Android System Architecture</p>
-<h3 id="Application framework">Application framework</h3>
+<h2 id="Application framework">Application framework</h2>
<p>
The application framework is used most often by application developers. As a
hardware developer, you should be aware of developer APIs as many map directly
@@ -61,7 +59,7 @@
implementing drivers.
</p>
-<h3 id="Binder IPC">Binder IPC</h3>
+<h2 id="Binder IPC">Binder IPC</h2>
<p>
The Binder Inter-Process Communication (IPC) mechanism allows the application
framework to cross process boundaries and call into the Android system services
@@ -70,7 +68,7 @@
the developer and things appear to "just work."
</p>
-<h3 id="System services">System services</h3>
+<h2 id="System services">System services</h2>
<p>
Functionality exposed by application framework APIs communicates with system
services to access the underlying hardware. Services are modular, focused
@@ -80,11 +78,14 @@
in playing and recording media).
</p>
-<h3 id="Hardware Abstraction Layer">Hardware abstraction layer (HAL)</h3>
+<h2 id="Hardware Abstraction Layer">Hardware abstraction layer (HAL)</h2>
<p>
-The HAL is a standard interface that allows the Android system to call into the
-device driver layer while being agnostic about the lower-level implementations
-of drivers and hardware.
+The hardware abstraction layer (HAL) defines a standard interface for hardware
+vendors to implement and allows Android to be agnostic about lower-level driver
+implementations. The HAL allows you to implement functionality without
+affecting or modifying the higher level system. HAL implementations are
+packaged into modules (<code>.so</code>) file and loaded by the Android system
+at the appropriate time.
</p>
<img src="images/ape_fwk_hal.png">
@@ -102,7 +103,95 @@
by the contract defined in each hardware-specific HAL interface.
</p>
-<h3 id="Linux kernel">Linux Kernel</h3>
+<h3 id="structure">Standard HAL structure</h3>
+<p>
+ Each hardware-specific HAL interface has properties that are defined in
+ <code>hardware/libhardware/include/hardware/hardware.h</code>, which
+ guarantee that HALs have a predictable structure.
+ This interface allows the Android system to load the correct versions of your
+ HAL modules in a consistent way. There are two general components
+ that a HAL interface consists of: a module and a device.
+</p>
+<p>
+ A module represents your packaged HAL implementation, which is stored as a shared library (<code>.so file</code>). It contains
+ metadata such as the version, name, and author of the module, which helps Android find and load it correctly. The
+ <code>hardware/libhardware/include/hardware/hardware.h</code> header file defines a
+ struct, <code>hw_module_t</code>, that represents a module and contains information such as
+ the module version, author, and name.</p>
+
+ <p>In addition, the <code>hw_module_t</code> struct contains
+ a pointer to another struct, <code>hw_module_methods_t</code>, that contains a pointer to
+ an "open" function for the module. This open function is used to initate communication with
+ the hardware that the HAL is serving as an abstraction for. Each hardware-specific HAL usually
+ extends the generic <code>hw_module_t</code> struct with additional information
+ for that specific piece of hardware. For example in the camera HAL, the <code>camera_module_t</code> struct
+ contains a <code>hw_module_t</code> struct along with other camera-specific function pointers:
+</p>
+
+<pre>
+typedef struct camera_module {
+ hw_module_t common;
+ int (*get_number_of_cameras)(void);
+ int (*get_camera_info)(int camera_id, struct camera_info *info);
+} camera_module_t;
+</pre>
+
+<p>When you implement a HAL and create the module struct, you must name it
+ <code>HAL_MODULE_INFO_SYM</code>. For instance, here is an example from the Nexus 9 audio HAL:</p>
+<pre>
+struct audio_module HAL_MODULE_INFO_SYM = {
+ .common = {
+ .tag = HARDWARE_MODULE_TAG,
+ .module_api_version = AUDIO_MODULE_API_VERSION_0_1,
+ .hal_api_version = HARDWARE_HAL_API_VERSION,
+ .id = AUDIO_HARDWARE_MODULE_ID,
+ .name = "NVIDIA Tegra Audio HAL",
+ .author = "The Android Open Source Project",
+ .methods = &hal_module_methods,
+ },
+};
+</pre>
+<p>
+ A device abstracts the actual hardware of your product. For example, an audio module can contain
+ a primary audio device, a USB audio device, or a Bluetooth A2DP audio device. A device
+ is represented by the <code>hw_device_t</code> struct. Like a module, each type of device
+ defines a more-detailed version of the generic <code>hw_device_t</code> that contains
+ function pointers for specific features of the hardware. For example, the
+ <code>audio_hw_device_t</code> struct type contains function pointers to audio device operations:
+</p>
+
+<pre>
+struct audio_hw_device {
+ struct hw_device_t common;
+
+ /**
+ * used by audio flinger to enumerate what devices are supported by
+ * each audio_hw_device implementation.
+ *
+ * Return value is a bitmask of 1 or more values of audio_devices_t
+ */
+ uint32_t (*get_supported_devices)(const struct audio_hw_device *dev);
+ ...
+};
+typedef struct audio_hw_device audio_hw_device_t;
+</pre>
+
+<p>
+ In addition to these standard properties, each hardware-specific HAL interface can define more of its
+ own features and requirements. See the <a href="{@docRoot}devices/halref/index.html">HAL reference documentation</a>
+ as well as the individual instructions for each HAL for more information on how to implement a specific interface.
+</p>
+
+<h3 id="modules">HAL modules</h3>
+<p>HAL implementations are built into modules (<code>.so</code>) files and are dynamically linked by Android when appropriate.
+ You can build your modules by creating <code>Android.mk</code> files for each of your HAL implementations
+ and pointing to your source files. In general, your shared libraries must be named in a certain format, so that
+ they can be found and loaded properly. The naming scheme varies slightly from module to module, but they follow
+ the general pattern of: <code><module_type>.<device_name></code>.</p>
+
+ <p>For more information about setting up the build for each HAL, see its respective documentation.</p>
+
+<h2 id="Linux kernel">Linux kernel</h2>
<p>
Developing your device drivers is similar to developing a typical Linux device
driver. Android uses a version of the Linux kernel with a few special additions
@@ -115,4 +204,4 @@
You can use any version of the kernel as long as it supports the required
features (such as the binder driver). However, we recommend using the latest
version of the Android kernel. For details on the latest Android kernel, see <a href="{@docRoot}source/building-kernels.html" >Building Kernels</a>.
-</p>
\ No newline at end of file
+</p>
diff --git a/src/devices/tech/security/implement.jd b/src/devices/tech/security/implement.jd
index 6b9c80e..2a7c890 100644
--- a/src/devices/tech/security/implement.jd
+++ b/src/devices/tech/security/implement.jd
@@ -160,7 +160,7 @@
<li>Where possible, root code <strong>should</strong> be isolated from untrusted data and
accessed via IPC. For example, reduce root functionality to a small Service
accessible via Binder and expose the Service with signature permission to an
-an application with low or no privileges to handle network traffic.</li>
+application with low or no privileges to handle network traffic.</li>
<li>Root processes <strong>must not</strong> listen on a network socket.</li>
<li>Root processes <strong>must not</strong> provide a general-purpose runtime for
applications. (e.g. a Java VM)</li>
diff --git a/src/source/building-running.jd b/src/source/building-running.jd
index 239ebe6..d9eb0bf 100644
--- a/src/source/building-running.jd
+++ b/src/source/building-running.jd
@@ -2,7 +2,7 @@
@jd:body
<!--
- Copyright 2013 The Android Open Source Project
+ Copyright 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -24,20 +24,10 @@
</div>
</div>
-The following instructions to build the Android source tree apply to all branches, including <code>master</code>.
+<p>The following instructions to build the Android source tree apply to all
+branches, including <code>master</code>. The basic sequence of build commands
+is as follows:</p>
-<h2 id="choosing-a-branch">Choosing a Branch</h2>
-<p>Some of the requirements for your build environment are determined by which
-version of the source code you plan to compile. See
-<a href="build-numbers.html">Codenames, Tags, and Build Numbers</a> for a full listing of branches you may
-choose from. You may also choose to download and build the latest source code
-(called <code>master</code>), in which case you will simply omit the branch specification
-when you initialize the repository.</p>
-<p>Once you have selected a branch, follow the appropriate instructions below to
-set up your build environment.</p>
-
-
-<p>The basic sequence of build commands is as follows:</p>
<h2 id="initialize">Initialize</h2>
<p>Initialize the environment with the <code>envsetup.sh</code> script. Note
that replacing <code>source</code> with <code>.</code> (a single dot) saves a few characters,
@@ -47,6 +37,7 @@
<p>or</p>
<pre><code>$ . build/envsetup.sh
</code></pre>
+
<h2 id="choose-a-target">Choose a Target</h2>
<p>Choose which target to build with <code>lunch</code>. The exact configuration can be passed as
an argument. For example, the following command:</p>
@@ -55,34 +46,9 @@
<p>refers to a complete build for the emulator, with all debugging enabled.</p>
<p>If run with no arguments <code>lunch</code> will prompt you to choose a target from the menu. </p>
<p>All build targets take the form <code>BUILD-BUILDTYPE</code>, where the <code>BUILD</code> is a codename
-referring to the particular feature combination. Here's a partial list:</p>
-<table>
-<thead>
-<tr>
-<th>Build name</th>
-<th>Device</th>
-<th>Notes</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td>aosp_arm</td>
-<td>ARM emulator</td>
-<td>AOSP, fully configured with all languages, apps, input methods</td>
-</tr>
-<tr>
-<td>aosp_maguro</td>
-<td>maguro</td>
-<td>AOSP, running on Galaxy Nexus GSM/HSPA+ ("maguro")</td>
-</tr>
-<tr>
-<td>aosp_panda</td>
-<td>panda</td>
-<td>AOSP, running on PandaBoard ("panda")</td>
-</tr>
-</tbody>
-</table>
-<p>and the BUILDTYPE is one of the following:</p>
+referring to the particular feature combination.</p>
+
+<p>The BUILDTYPE is one of the following:</p>
<table>
<thead>
<tr>
@@ -107,7 +73,8 @@
</table>
<p>For more information about building for and running on actual hardware, see
<a href="building-devices.html">Building for Devices</a>.</p>
-<h2 id="build-the-code">Build the Code</h2>
+
+<h2 id="build-the-code">Build the code</h2>
<p>Build everything with <code>make</code>. GNU make can handle parallel
tasks with a <code>-jN</code> argument, and it's common to use a number of
tasks N that's between 1 and 2 times the number of hardware
diff --git a/src/source/configure-products.jd b/src/source/configure-products.jd
new file mode 100644
index 0000000..01fc788
--- /dev/null
+++ b/src/source/configure-products.jd
@@ -0,0 +1,382 @@
+page.title=Configuring the Products
+@jd:body
+
+<!--
+ Copyright 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol id="auto-toc">
+ </ol>
+ </div>
+</div>
+
+<p>Use the information in this page to create the Makefiles for your device and product.</p>
+
+<h2 id="build-layers">Understand Build Layers</h2>
+
+<p>The build hierarchy includes the abstraction layers that correspond to the
+physical makeup of a device. These layers are described in the table below.
+Each layer relates to the one above it in a one-to-many relationship. For
+example, an architecture can have more than one board and each board can have
+more than one product. You may define an element in a given layer as a
+specialization of an element in the same layer, thus eliminating copying and
+simplifying maintenance.</p>
+
+<table>
+ <tbody><tr>
+ <th>Layer</th>
+ <th>Example</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>Product</td>
+ <td>myProduct, myProduct_eu, myProduct_eu_fr, j2, sdk</td>
+ <td><p>The product layer defines the feature specification of a shipping product such as the modules to build,
+ locales supported, and the configuration for various locales. In other words, this is the name of the
+ overall product. Product-specific variables are defined in product definition Makefiles. A product
+ can inherit from other product definitions,
+ which simplifies maintenance. A common method is to create a base product that contains features that apply
+ for all products, then creating product variants based on that base product. For example, you can have
+ two products that differ only by their radios (CDMA vs GSM) inherit from the same base product that does not define a radio.
+</td>
+
+ </tr>
+ <tr>
+ <td>Board/Device</td>
+ <td>sardine, trout, goldfish</td>
+ <td>The device/board layer represents the physical layer of plastic on the
+ device (i.e. the industrial design of the device). For example, North American
+ devices probably include QWERTY keyboards whereas devices sold in France
+ probably include AZERTY keyboards. This layer also represents the bare
+ schematics of a product. These include the peripherals on the board and their
+ configuration. The names used are merely codes for different board/device configurations.</td>
+ </tr>
+<tr>
+ <td>Arch</td>
+ <td>arm, x86, mips, arm64, x86_64, mips64</td>
+ <td>The architecture layer describes the processor configuration and ABI (Application Binary Interface) running on the board. </td>
+ </tr>
+</table>
+
+<h2 id="build-variants">Use Build Variants</h2>
+
+<p>When building for a particular product, it's often useful to have minor
+variations on what is ultimately the final release build. In a module
+definition, the module can specify tags with <code>LOCAL_MODULE_TAGS</code>,
+which can be one or more values of <code>optional</code> (default),
+<code>debug</code>, <code>eng</code>.</p>
+
+<p>If a module doesn't specify a tag (by <code>LOCAL_MODULE_TAGS</code>), its
+tag defaults to <code>optional</code>. An optional module is installed only if
+it is required by product configuration with <code>PRODUCT_PACKAGES</code>.
+
+<p>These are the currently-defined build variants:</p>
+
+<table border=1>
+<tr>
+ <td>
+ <code>eng<code>
+ </td>
+ <td>
+ This is the default flavor.
+ <ul>
+ <li>Installs modules tagged with: <code>eng</code> and/or <code>debug</code>.
+ <li>Installs modules according to the product definition files, in addition to tagged modules.</li>
+ <li><code>ro.secure=0</code>
+ <li><code>ro.debuggable=1</code>
+ <li><code>ro.kernel.android.checkjni=1</code>
+ <li><code>adb</code> is enabled by default.
+ </td>
+</tr>
+<tr>
+ <td>
+ <code>user<code>
+ </td>
+ <td>
+ This is the flavor intended to be the final release bits.
+ <ul>
+ <li>Installs modules tagged with <code>user</code>.</li>
+ <li>Installs modules according to the product definition files, in addition to tagged modules.</li>
+ <li><code>ro.secure=1</code> </li>
+ <li><code>ro.debuggable=0</code> </li>
+ <li><code>adb</code> is disabled by default.</li>
+ </td>
+</tr>
+<tr>
+ <td>
+ <code>userdebug<code>
+ </td>
+ <td>
+ The same as <code>user</code>, except:
+ <ul>
+ <li>Also installs modules tagged with <code>debug</code>.
+ <li><code>ro.debuggable=1</code>
+ <li><code>adb</code> is enabled by default.
+ </td>
+</tr>
+</table>
+
+<h2 id="build-a-product">Build a Product</h2>
+
+<p>
+There are many ways to organize the source files for your device. We'll briefly
+go over how the Nexus 6 implementation was organized as an example, but you can
+organize your source files and build the way you see fit.
+</p>
+<p>
+Nexus 6 was implemented with a main device configuration named
+<code>shamu</code>. From this device configuration, a product is created with a
+product definition Makefile that declares product-specific information about
+the device such as the name and model. You can view the
+<code>device/moto/shamu</code> directory to see how all of this is setup.
+</p>
+<h3 id="makefiles">Write the Makefiles</h2>
+<p>
+ The following steps describe how to set up product Makefiles in a way similar
+to that of the Nexus 6 product line:
+</p>
+<ol>
+ <li>Create a <code>device/<company_name>/<device_name></code> directory for your
+ product. For example, <code>device/moto/shamu</code>. This directory will contain source code
+ for your device along with the Makefiles to build them.
+ </li>
+
+ <li>Create a <code>device.mk</code> Makefile that declares the files and modules needed for the
+ device. For an example, see <code>device/moto/shamu/device.mk</code>.
+ </li>
+
+ <li>Create a product definition Makefile to create a specific product based on the device. The
+ following Makefile is taken from <code>device/moto/shamu/aosp_shamu.mk</code> as an example.
+ Notice the product is inheriting from the
+ <code>device/moto/shamu/device.mk</code> and
+ <code>vendor/moto/shamu/device-vendor.mk</code> files via the Makefile while
+ also declaring the product-specific information such as name, brand, and model.
+
+<pre>
+# Inherit from the common Open Source product configuration
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
+
+PRODUCT_NAME := aosp_shamu
+PRODUCT_DEVICE := shamu
+PRODUCT_BRAND := Android
+PRODUCT_MODEL := AOSP on Shamu
+PRODUCT_MANUFACTURER := motorola
+PRODUCT_RESTRICT_VENDOR_FILES := true
+
+$(call inherit-product, device/moto/shamu/device.mk)
+$(call inherit-product-if-exists, vendor/moto/shamu/device-vendor.mk)
+
+PRODUCT_NAME := aosp_shamu
+
+PRODUCT_PACKAGES += \
+ Launcher3
+</pre>
+
+ <p>
+ See <a href="#prod-def">Product Definition Variables</a> for additional product-specific
+ variables you can add to your Makefiles.
+ </p>
+ </li>
+
+ <li>Create an <code>AndroidProducts.mk</code> file that points to the product's Makefiles. In
+ this example, only the product definition Makefile is needed. The example below is from
+ <code>device/moto/shamu/AndroidProducts.mk</code>:
+ <pre>
+#
+# This file should set PRODUCT_MAKEFILES to a list of product makefiles
+# to expose to the build system. LOCAL_DIR will already be set to
+# the directory containing this file.
+#
+# This file may not rely on the value of any variable other than
+# LOCAL_DIR; do not use any conditionals, and do not look up the
+# value of any variable that isn't set in this file or in a file that
+# it includes.
+#
+
+PRODUCT_MAKEFILES := \
+ $(LOCAL_DIR)/aosp_shamu.mk
+</pre>
+ </li>
+
+ <li>Create a <code>BoardConfig.mk</code> Makefile that contains board-specific configurations.
+ For an example, see <code>device/moto/shamu/BoardConfig.mk</code>.
+ </li>
+
+ <li>Create a <code>vendorsetup.sh</code> file to add your product (a "lunch combo") to the build
+ along with a <a href="#build-variants">build variant</a> separated by a dash. For example:
+<pre>
+add_lunch_combo <product_name>-userdebug
+</pre>
+ </li>
+
+ <li>At this point, you can create more product variants based on the same device.
+ </li>
+
+</ol>
+<h3 id="prod-def">Set Product Definition Variables</h3>
+<p>
+ Product-specific variables are defined in the product's Makefile. Variables maintained in a
+ product definition files include:
+</p>
+<table>
+ <tbody>
+ <tr>
+ <th>
+ Parameter
+ </th>
+ <th>
+ Description
+ </th>
+ <th>
+ Example
+ </th>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_AAPT_CONFIG
+ </td>
+ <td>
+ <code>aapt</code> configurations to use when creating packages
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_BRAND
+ </td>
+ <td>
+ The brand (e.g., carrier) the software is customized for, if any
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_CHARACTERISTICS
+ </td>
+ <td>
+ <code>aapt</code> characteristics to allow adding variant-specific resources to a package.
+ </td>
+ <td>
+ tablet,nosdcard
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_COPY_FILES
+ </td>
+ <td>
+ List of words like <code>source_path:destination_path</code>. The file at the source path
+ should be copied to the destination path when building this product. The rules for the copy
+ steps are defined in config/Makefile
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_DEVICE
+ </td>
+ <td>
+ Name of the industrial design. This is also the board name, and the build system uses it to locate the <code>BoardConfig.mk.</code>
+ </td>
+ <td>
+ <code>tuna</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_LOCALES
+ </td>
+ <td>
+ A space-separated list of two-letter language code, two-letter country code pairs that
+ describe several settings for the user, such as the UI language and time, date and currency
+ formatting. The first locale listed in PRODUCT_LOCALES is used as the product's default locale.
+ </td>
+ <td>
+ <code>en_GB de_DE es_ES fr_CA</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_MANUFACTURER
+ </td>
+ <td>
+ Name of the manufacturer
+ </td>
+ <td>
+ <code>acme</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_MODEL
+ </td>
+ <td>
+ End-user-visible name for the end product
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_NAME
+ </td>
+ <td>
+ End-user-visible name for the overall product. Appears in the Settings > About screen.
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_OTA_PUBLIC_KEYS
+ </td>
+ <td>
+ List of Over the Air (OTA) public keys for the product
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_PACKAGES
+ </td>
+ <td>
+ Lists the APKs and modules to install.
+ </td>
+ <td>
+ <code>Calendar Contacts</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_PACKAGE_OVERLAYS
+ </td>
+ <td>
+ Indicate whether to use default resources or add any product specific overlays
+ </td>
+ <td>
+ <code>vendor/acme/overlay</code>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ PRODUCT_PROPERTY_OVERRIDES
+ </td>
+ <td>
+ List of system property assignments in the format "key=value"
+ </td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
diff --git a/src/source/source_toc.cs b/src/source/source_toc.cs
index b707b43..cbe8191 100644
--- a/src/source/source_toc.cs
+++ b/src/source/source_toc.cs
@@ -40,6 +40,7 @@
<ul>
<li><a href="<?cs var:toroot ?>source/initializing.html">Initializing the Build Environment</a></li>
<li><a href="<?cs var:toroot ?>source/downloading.html">Downloading the Source</a></li>
+ <li><a href="<?cs var:toroot ?>source/configure-products.html">Configuring the Products</a></li>
<li><a href="<?cs var:toroot ?>source/building-running.html">Building and Running</a></li>
<li><a href="<?cs var:toroot ?>source/building-devices.html">Building for Devices</a></li>
<li><a href="<?cs var:toroot ?>source/building-kernels.html">Building Kernels</a></li>
diff --git a/src/source/using-repo.jd b/src/source/using-repo.jd
index 61d40eb..e1d1f0e 100644
--- a/src/source/using-repo.jd
+++ b/src/source/using-repo.jd
@@ -42,6 +42,13 @@
<pre><code>repo help <em><COMMAND></em>
</code></pre>
+<p>For example, the following command yields a description and list of options
+for the <code>init</code> argument of Repo, which initializes Repo in the
+current directory. (See <a href="#init">init</a> for more details.)</p>
+<pre><code>repo help init
+</code></pre>
+
+
<h2 id="init">init</h2>
<pre><code>$ repo init -u <em><URL></em> [<em><OPTIONS></em>]
</code></pre>