aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Partner Docs <noreply@android.com>2018-05-14 13:22:16 -0700
committerClay Murphy <claym@google.com>2018-05-14 14:52:17 -0700
commitacab5f65ac9673faf39d4b64d0937a7cfb69dddd (patch)
tree4bb7614a9743af97c0fbcad8f35e2b837a130a30
parent93b256109ebf25a3880bb32aec9a3a2b7b8dd247 (diff)
downloadsource.android.com-acab5f65ac9673faf39d4b64d0937a7cfb69dddd.tar.gz
Docs: Changes to source.android.com
- 196556741 Automated g4 rollback of changelist 195735838. by Android Partner Docs <noreply@android.com> - 196537805 Correct link for A-70986337 by Danielle Roberts <daroberts@google.com> - 196536907 Update broken link to point to new source by Christina Nguyen <cqn@google.com> - 196524339 Devsite localized content from translation request 4637e6... by Android Partner Docs <noreply@android.com> - 196524319 Devsite localized content from translation request 987838... by Android Partner Docs <noreply@android.com> - 196524157 Devsite localized content from translation request 324901... by Android Partner Docs <noreply@android.com> - 196524148 Devsite localized content from translation request fc3d82... by Android Partner Docs <noreply@android.com> - 196524135 Devsite localized content from translation request b68270... by Android Partner Docs <noreply@android.com> - 196342804 Add May 2018 security bulletins and build numbers to News by Clay Murphy <claym@google.com> - 196309016 Updating end-user UI paths for battery optimizations. by Heidi von Markham <hvm@google.com> - 196286488 Add Modular Kernel Requirements to News section by Clay Murphy <claym@google.com> - 196278207 Update ambient capabilities page by Kenneth Lau <kennethlau@google.com> - 196267757 Added AOSP links to May bulletins. by Android Partner Docs <noreply@android.com> - 196042172 Scott Bauer ack change per tkensinger@ request by Android Partner Docs <noreply@android.com> - 196039262 Updating the 8.0 CDD. by Gina Dimino <gdimino@google.com> - 195856571 Replace preview links with the redirect, permanent links. by Android Partner Docs <noreply@android.com> - 195829803 Devsite localized content from translation request 6036d9... by Android Partner Docs <noreply@android.com> - 195823927 Devsite localized content from translation request ecf40b... by Android Partner Docs <noreply@android.com> PiperOrigin-RevId: 196556741 Change-Id: Ia1830213d5e90bb80da0c241834d3c07538ea63a
-rw-r--r--en/_index.yaml37
-rw-r--r--en/compatibility/8.0/android-8.0-cdd.html1764
-rw-r--r--en/devices/tech/config/ambient.html89
-rw-r--r--en/devices/tech/config/filesystem.html12
-rw-r--r--en/devices/tech/connect/data-saver.html9
-rw-r--r--en/devices/tech/display/adaptive-icons.html37
-rw-r--r--en/devices/tech/display/retail-mode.html2
-rw-r--r--en/devices/tech/power/mgmt.html23
-rw-r--r--en/devices/tv/index.html2
-rw-r--r--en/security/bulletin/2017-08-01.html2
-rw-r--r--en/security/bulletin/2018-05-01.html30
-rw-r--r--en/security/bulletin/pixel/2018-05-01.html29
-rw-r--r--en/security/encryption/index.html2
-rw-r--r--en/security/overview/app-security.html56
-rw-r--r--en/setup/start/build-numbers.html6
-rw-r--r--zh-cn/_book.yaml2
-rw-r--r--zh-cn/compatibility/vts/multi-device-testing.html169
-rw-r--r--zh-cn/compatibility/vts/shell-commands.html112
-rw-r--r--zh-cn/compatibility/vts/test-templates.html273
-rw-r--r--zh-cn/devices/automotive/camera-hal.html4
-rw-r--r--zh-cn/devices/graphics/build-tests.html6
-rw-r--r--zh-cn/devices/graphics/index.html4
-rw-r--r--zh-cn/devices/storage/index.html2
-rw-r--r--zh-cn/devices/tech/admin/provision.html2
-rw-r--r--zh-cn/devices/tech/connect/block-numbers.html2
-rw-r--r--zh-cn/devices/tech/dalvik/gc-debug.html2
-rw-r--r--zh-cn/devices/tech/datausage/kernel-overview.html6
-rw-r--r--zh-cn/devices/tech/debug/sanitizers.html2
-rw-r--r--zh-cn/devices/tech/display/adaptive-icons.html37
-rw-r--r--zh-cn/devices/tech/ota/ab/index.html11
-rw-r--r--zh-cn/devices/tech/power/component.html2
-rw-r--r--zh-cn/devices/tv/index.html4
-rw-r--r--zh-cn/license.html2
-rw-r--r--zh-cn/security/bulletin/pixel/2017.html30
-rw-r--r--zh-cn/security/encryption/full-disk.html4
-rw-r--r--zh-cn/setup/build/building-kernels.html267
-rw-r--r--zh-cn/setup/build/building.html165
-rw-r--r--zh-cn/setup/build/devices.html302
-rw-r--r--zh-cn/setup/build/downloading.html192
-rw-r--r--zh-cn/setup/build/initializing.html334
-rw-r--r--zh-cn/setup/build/jack.html258
-rw-r--r--zh-cn/setup/build/known-issues.html56
-rw-r--r--zh-cn/setup/build/requirements.html134
-rw-r--r--zh-cn/setup/build/running.html380
-rw-r--r--zh-cn/setup/community.html4
-rw-r--r--zh-cn/setup/contribute/code-style.html464
-rw-r--r--zh-cn/setup/contribute/index.html40
-rw-r--r--zh-cn/setup/contribute/life-of-a-bug.html90
-rw-r--r--zh-cn/setup/contribute/life-of-a-patch.html30
-rw-r--r--zh-cn/setup/contribute/read-bug-reports.html863
-rw-r--r--zh-cn/setup/contribute/report-bugs.html238
-rw-r--r--zh-cn/setup/contribute/submit-patches.html144
-rw-r--r--zh-cn/setup/contribute/view-patches.html90
-rw-r--r--zh-cn/setup/develop/64-bit-builds.html156
-rw-r--r--zh-cn/setup/develop/index.html342
-rw-r--r--zh-cn/setup/develop/new-device.html317
-rw-r--r--zh-cn/setup/develop/repo.html280
-rw-r--r--zh-cn/setup/start/brands.html104
-rw-r--r--zh-cn/setup/start/build-numbers.html2402
-rw-r--r--zh-cn/setup/start/codelines.html106
-rw-r--r--zh-cn/setup/start/faqs.html166
-rw-r--r--zh-cn/setup/start/licenses.html62
-rw-r--r--zh-cn/setup/start/roles.html80
-rw-r--r--zh-cn/setup/start/site-updates.html476
64 files changed, 10099 insertions, 1219 deletions
diff --git a/en/_index.yaml b/en/_index.yaml
index 0ba2105f..8a243a8b 100644
--- a/en/_index.yaml
+++ b/en/_index.yaml
@@ -69,31 +69,30 @@ landing_page:
image_path: /images/android_stack.png
- heading: News
items:
- - heading: hikey960 Vendor Partition
+ - heading: May Security Bulletins
description: >
- HiKey960 documentation now includes the vendor partition. And CTS
- Setup now notes the property <code>ro.product.first_api_level</code>
- should be unset (removed) rather than set to 0.
+ The May 2018 Android and Pixel/Nexus Security Bulletins have been
+ published along with links to associated fixes and new build numbers
+ to support the May security release.
buttons:
- - label: April 11th, 2018
- path: /setup/build/devices
- - heading: Bluetooth Low Energy
+ - label: May 9th, 2018
+ path: /security/bulletin/2018-05-01
+ - heading: Modular Kernel Requirements
description: >
- Implementation instructions have been published for Bluetooth Low
- Energy. And Debian is now noted as used along with Ubuntu for testing
- Android builds.
+ Modular kernel requirements have been relaxed to remove the restriction
+ on mounting only certain partitions in the first stage of
+ <code>init</code>.
buttons:
- - label: April 10th, 2018
- path: /devices/bluetooth/ble
- - heading: ccache, Valgrind, and Jack No More
+ - label: May 2nd, 2018
+ path: /devices/architecture/kernel/modular-kernels
+ - heading: HiKey960 Vendor Partition
description: >
- Android engineering is now recommending against use of ccache.
- Similarly, use AddressSanitizer over Valgrind and avoid the Jack
- toolchain as Android has added support for Java 8 language features
- directly into the current javac and dx set of tools.
+ HiKey960 documentation now includes the vendor partition. And CTS
+ Setup now notes the property <code>ro.product.first_api_level</code>
+ should be unset (removed) and not set to 0.
buttons:
- - label: April 5th, 2018
- path: /devices/tech/debug/asan
+ - label: April 11th, 2018
+ path: /setup/build/devices
- classname: devsite-landing-row-100 tf-row-centered
items:
- buttons:
diff --git a/en/compatibility/8.0/android-8.0-cdd.html b/en/compatibility/8.0/android-8.0-cdd.html
index 30b613dd..3758d0d9 100644
--- a/en/compatibility/8.0/android-8.0-cdd.html
+++ b/en/compatibility/8.0/android-8.0-cdd.html
@@ -1,10 +1,10 @@
-<html devsite="" xmlns="http://www.w3.org/1999/xhtml">
+<html devsite="">
<head>
<title>
Android 8.0 Compatibility Definition
</title>
- <meta name="project_path" value="/_project.yaml" />
- <meta name="book_path" value="/_book.yaml" />
+ <meta name="project_path" value="/_project.yaml">
+ <meta name="book_path" value="/_book.yaml">
</head>
<body>
<!--
@@ -53,7 +53,7 @@
1.1.1. Requirements by Device Type
</h4>
<p>
- <a href="#2_device_types">Section 2</a> contains all the MUST and STRONGLY RECOMMENDED requirements that apply to a specific device type. Each subsection of <a href="#2_device_types">Section 2</a> is dedicated to a specific device type.
+ <a href="#2_device_types">Section 2</a> contains all of the requirements that apply to a specific device type. Each subsection of <a href="#2_device_types">Section 2</a> is dedicated to a specific device type.
</p>
<p>
All the other requirements, that universally apply to any Android device implementations, are listed in the sections after <a href="#2_device_types">Section 2</a>. These requirements are referenced as "Core Requirements" in this document.
@@ -76,7 +76,7 @@
Each ID is defined as below:
</p>
<ul>
- <li>Device Type ID (see more on <a href="#2_device_types">2. Device Types</a>)
+ <li>Device Type ID (see more on <a href="#2_device_types">2. Device Types</a>
<ul>
<li>C: Core (Requirements that are applied to any Android device implementations)
</li>
@@ -86,7 +86,7 @@
</li>
<li>A: Android Automotive implementation
</li>
- <li>W: Android Watch implementation
+ <li>Tab: Android Tablet implementation
</li>
</ul>
</li>
@@ -105,6 +105,16 @@
</ul>
</li>
</ul>
+ <h4 id="1_1_3_requirement_id_in_section_2">
+ 1.1.3. Requirement ID in Section 2
+ </h4>
+ <p>
+ The Requirement ID in <a href="#2_device_types">Section 2</a> starts with the corresponding section ID that is followed by the Requirement ID described above.
+ </p>
+ <ul>
+ <li>The ID in <a href="#2_device_types">Section 2</a> consists of : Section ID / Device Type ID - Condition ID - Requirement ID (e.g. 7.4.3/A-0-1).
+ </li>
+ </ul>
<h2 id="2_device_types">
2. Device Types
</h2>
@@ -148,150 +158,70 @@
2.2.1. Hardware
</h4>
<p>
- <strong>Screen Size (Section 7.1.1.1)</strong>
- </p>
- <p>
Handheld device implementations:
</p>
<ul>
- <li>[H-0-1] MUST have a screen at least 2.5 inches in physical diagonal size.<sup>*</sup>
+ <li>[<a href="#7_1_display_and_graphics">7.1</a>.1.1/H-0-1] MUST have a screen at least 2.5 inches in physical diagonal size.
</li>
- </ul>
- <p>
- <strong>Screen Density (Section 7.1.1.3)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>[H-SR] Are STRONGLY RECOMMENDED to provide users an affordance to change the display size.
+ <li>[<a href="#7_1_display_and_graphics">7.1</a>.1.3/H-SR] Are STRONGLY RECOMMENDED to provide users an affordance to change the display size.(Screen Density)
</li>
- </ul>
- <p>
- <strong>Legacy Application Compatibility Mode (Section 7.1.5)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>[H-0-1] MUST include support for legacy application compatibility mode as implemented by the upstream Android open source code. That is, device implementations MUST NOT alter the triggers or thresholds at which compatibility mode is activated, and MUST NOT alter the behavior of the compatibility mode itself.
+ <li>[<a href="#7_1_display_and_graphics">7.1</a>.5/H-0-1] MUST include support for legacy application compatibility mode as implemented by the upstream Android open source code. That is, device implementations MUST NOT alter the triggers or thresholds at which compatibility mode is activated, and MUST NOT alter the behavior of the compatibility mode itself.
</li>
- </ul>
- <p>
- <strong>Keyboard (Section 7.2.1)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>[H-0-1] MUST include support for third-party Input Method Editor (IME) applications.
+ <li>[<a href="#7_2_input_devices">7.2</a>.1/H-0-1] MUST include support for third-party Input Method Editor (IME) applications.
</li>
- </ul>
- <p>
- <strong>Navigation Keys (Section 7.2.3)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>
- <p>
- [H-0-1] MUST provide the Home, Recents, and Back functions.
- </p>
+ <li>[<a href="#7_2_input_devices">7.2</a>.3/H-0-1] MUST provide the Home, Recents, and Back functions.
</li>
- <li>
- <p>
- [H-0-2] MUST send both the normal and long press event of the Back function (<a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK"><code>KEYCODE_BACK</code></a>) to the foreground application.
- </p>
+ <li>[<a href="#7_2_input_devices">7.2</a>.3/H-0-2] MUST send both the normal and long press event of the Back function (<a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK"><code>KEYCODE_BACK</code></a>) to the foreground application.
</li>
- </ul>
- <p>
- <strong>Touchscreen Input (Section 7.2.4)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>[H-0-1] MUST support touchscreen input.
+ <li>[<a href="#7_2_input_devices">7.2</a>.4/H-0-1] MUST support touchscreen input.
</li>
- </ul>
- <p>
- <strong>Accelerometer (Section 7.3.1)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>[H-SR] Are STRONGLY RECOMMENDED to include a 3-axis accelerometer.
+ <li>[<a href="#7_3_sensors">7.3</a>.1/H-SR] Are STRONGLY RECOMMENDED to include a 3-axis accelerometer.
</li>
</ul>
<p>
If Handheld device implementations include a 3-axis accelerometer, they:
</p>
<ul>
- <li>[H-1-1] MUST be able to report events up to a frequency of at least 100 Hz.
+ <li>[<a href="#7_3_sensors">7.3</a>.1/H-1-1] MUST be able to report events up to a frequency of at least 100 Hz.
</li>
</ul>
<p>
- <strong>Gyroscope (Section 7.3.4)</strong>
- </p>
- <p>
If Handheld device implementations include a gyroscope, they:
</p>
<ul>
- <li>[H-1-1] MUST be able to report events up to a frequency of at least 100 Hz.
+ <li>[<a href="#7_3_sensors">7.3</a>.4/H-1-1] MUST be able to report events up to a frequency of at least 100 Hz.
</li>
</ul>
<p>
- <strong>Proximity Sensor (Section 7.3.8 )</strong>
- </p>
- <p>
Handheld device implementations that can make a voice call and indicate any value other than <code>PHONE_TYPE_NONE</code> in <code>getPhoneType</code>:
</p>
<ul>
- <li>SHOULD include a proximity sensor.
+ <li>[<a href="#7_3_sensors">7.3</a>.8/H] SHOULD include a proximity sensor.
</li>
</ul>
<p>
- <strong>Pose Sensor (Section 7.3.12)</strong>
- </p>
- <p>
Handheld device implementations:
</p>
<ul>
- <li>Are RECOMMENDED to support pose sensor with 6 degrees of freedom.
+ <li>[<a href="#7_3_sensors">7.3</a>.12/H-SR] Are RECOMMENDED to support pose sensor with 6 degrees of freedom.
</li>
- </ul>
- <p>
- <strong>Bluetooth (Section 7.4.3)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>SHOULD include support for Bluetooth and Bluetooth LE.
+ <li>[<a href="#7_4_data_connectivity">7.4</a>.3/H]SHOULD include support for Bluetooth and Bluetooth LE.
</li>
</ul>
<p>
- <strong>Data Saver (Section 7.4.7)</strong>
- </p>
- <p>
If Handheld device implementations include a metered connection, they:
</p>
<ul>
- <li>[H-1-1] MUST provide the data saver mode.
+ <li>[<a href="#7_4_data_connectivity">7.4</a>.7/H-1-1] MUST provide the data saver mode.
</li>
</ul>
<p>
- <strong>Minimum Memory and Storage (Section 7.6.1)</strong>
- </p>
- <p>
Handheld device implementations:
</p>
<ul>
- <li>[H-0-1] MUST have at least 4GB of non-volatile storage available for application private data (a.k.a. "/data" partition)
+ <li>[<a href="#7_6_memory_and_storage">7.6</a>.1/H-0-1] MUST have at least 4GB of non-volatile storage available for application private data (a.k.a. "/data" partition).
</li>
- <li>[H-0-2] MUST return “true” for <code>ActivityManager.isLowRamDevice()</code> when there is less than 1GB of memory available to the kernel and userspace.
+ <li>[<a href="#7_6_memory_and_storage">7.6</a>.1/H-0-2] MUST return “true” for <code>ActivityManager.isLowRamDevice()</code> when there is less than 1GB of memory available to the kernel and userspace.
</li>
</ul>
<p>
@@ -300,7 +230,7 @@
<ul>
<li>
<p>
- [H-1-1] The memory available to the kernel and userspace MUST be at least 512MB if any of the following densities are used:
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/H-1-1] The memory available to the kernel and userspace MUST be at least 512MB if any of the following densities are used:
</p>
<ul>
<li>280dpi or lower on small/normal screens<sup>*</sup>
@@ -313,7 +243,7 @@
</li>
<li>
<p>
- [H-2-1] The memory available to the kernel and userspace MUST be at least 608MB if any of the following densities are used:
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/H-2-1] The memory available to the kernel and userspace MUST be at least 608MB if any of the following densities are used:
</p>
<ul>
<li>xhdpi or higher on small/normal screens<sup>*</sup>
@@ -326,7 +256,7 @@
</li>
<li>
<p>
- [H-3-1] The memory available to the kernel and userspace MUST be at least 896MB if any of the following densities are used:
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/H-3-1] The memory available to the kernel and userspace MUST be at least 896MB if any of the following densities are used:
</p>
<ul>
<li>400dpi or higher on small/normal screens<sup>*</sup>
@@ -339,7 +269,7 @@
</li>
<li>
<p>
- [H-4-1] The memory available to the kernel and userspace MUST be at least 1344MB if any of the following densities are used:
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/H-4-1] The memory available to the kernel and userspace MUST be at least 1344MB if any of the following densities are used:
</p>
<ul>
<li>560dpi or higher on small/normal screens<sup>*</sup>
@@ -357,7 +287,7 @@
<ul>
<li>
<p>
- [H-5-1] The memory available to the kernel and userspace MUST be at least 816MB if any of the following densities are used:
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/H-5-1] The memory available to the kernel and userspace MUST be at least 816MB if any of the following densities are used:
</p>
<ul>
<li>280dpi or lower on small/normal screens<sup>*</sup>
@@ -370,7 +300,7 @@
</li>
<li>
<p>
- [H-6-1] The memory available to the kernel and userspace MUST be at least 944MB if any of the following densities are used:
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/H-6-1] The memory available to the kernel and userspace MUST be at least 944MB if any of the following densities are used:
</p>
<ul>
<li>xhdpi or higher on small/normal screens<sup>*</sup>
@@ -383,7 +313,7 @@
</li>
<li>
<p>
- [H-7-1] The memory available to the kernel and userspace MUST be at least 1280MB if any of the following densities are used:
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/H-7-1] The memory available to the kernel and userspace MUST be at least 1280MB if any of the following densities are used:
</p>
<ul>
<li>400dpi or higher on small/normal screens<sup>*</sup>
@@ -396,7 +326,7 @@
</li>
<li>
<p>
- [H-8-1] The memory available to the kernel and userspace MUST be at least 1824MB if any of the following densities are used:
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/H-8-1] The memory available to the kernel and userspace MUST be at least 1824MB if any of the following densities are used:
</p>
<ul>
<li>560dpi or higher on small/normal screens<sup>*</sup>
@@ -412,381 +342,226 @@
Note that the "memory available to the kernel and userspace" above refers to the memory space provided in addition to any memory already dedicated to hardware components such as radio, video, and so on that are not under the kernel’s control on device implementations.
</p>
<p>
- <strong>Application Shared Storage (Section 7.6.2)</strong>
- </p>
- <p>
Handheld device implementations:
</p>
<ul>
- <li>[H-0-1] MUST NOT provide an application shared storage smaller than 1 GiB.
+ <li>[<a href="#7_6_memory_and_storage">7.6</a>.2/H-0-1] MUST NOT provide an application shared storage smaller than 1 GiB.
</li>
- </ul>
- <p>
- <strong>USB peripheral mode (Section 7.7.1)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>SHOULD include a USB port supporting peripheral mode.
+ <li>[<a href="#7_7_usb">7.7</a>.1/H] SHOULD include a USB port supporting peripheral mode.
</li>
</ul>
<p>
If handheld device implementations include a USB port supporting peripheral mode, they:
</p>
<ul>
- <li>[H-1-1] MUST implement the Android Open Accessory (AOA) API.<sup>*</sup>
+ <li>[<a href="#7_7_usb">7.7</a>.1/H-1-1] MUST implement the Android Open Accessory (AOA) API.
</li>
</ul>
<p>
- <strong>Microphone (Section 7.8.1)</strong>
- </p>
- <p>
Handheld device implementations:
</p>
<ul>
- <li>[H-0-1] MUST include a microphone.
+ <li>[<a href="#7_8_audio">7.8</a>.1/H-0-1] MUST include a microphone.
</li>
- </ul>
- <p>
- <strong>Audio Output (Section 7.8.2)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>[H-0-1] MUST have an audio output and declare <code>android.hardware.audio.output</code>.
+ <li>[<a href="#7_8_audio">7.8</a>.2/H-0-1] MUST have an audio output and declare <code>android.hardware.audio.output</code>.
</li>
</ul>
<p>
- <strong>Virtual Reality Mode (Section 7.9.1)</strong>
- </p>
- <p>
If Handheld device implementations include support for the VR mode, they:
</p>
<ul>
- <li>[H-1-1] MUST declare the <code>android.software.vr.mode</code> feature.<sup>*</sup>
+ <li>[<a href="#7_9_virtual-reality">7.9</a>.1/H-1-1] MUST declare the <code>android.software.vr.mode</code> feature.
</li>
</ul>
<p>
If device implementations declare <code>android.software.vr.mode</code> feature, they:
</p>
<ul>
- <li>[H-2-1] MUST include an application implementing <code>android.service.vr.VrListenerService</code> that can be enabled by VR applications via <code>android.app.Activity#setVrModeEnabled</code>.<sup>*</sup>
+ <li>[<a href="#7_9_virtual-reality">7.9</a>.1/H-2-1] MUST include an application implementing <code>android.service.vr.VrListenerService</code> that can be enabled by VR applications via <code>android.app.Activity#setVrModeEnabled</code>.
</li>
</ul>
<p>
- <strong>Virtual Reality High Performance (Section 7.9.2)</strong>
- </p>
- <p>
If Handheld device implementations are capable of meeting all the requirements to declare the <code>android.hardware.vr.high_performance</code> feature flag, they:
</p>
<ul>
- <li>[H-1-1] MUST declare the <code>android.hardware.vr.high_performance</code> feature flag.<sup>*</sup>
+ <li>[<a href="#7_9_virtual-reality">7.9</a>.2/-1-1] MUST declare the <code>android.hardware.vr.high_performance</code> feature flag.
</li>
</ul>
<h4 id="2_2_2_multimedia">
2.2.2. Multimedia
</h4>
<p>
- <strong>Audio Encoding (Section 5.1.1)</strong>
- </p>
- <p>
Handheld device implementations MUST support the following audio encoding:
</p>
<ul>
- <li>[H-0-1] AMR-NB
+ <li>[<a href="#5_1_media_codecs">5.1</a>.1/H-0-1] AMR-NB
</li>
- <li>[H-0-2] AMR-WB
+ <li>[<a href="#5_1_media_codecs">5.1</a>.1/H-0-2] AMR-WB
</li>
- <li>[H-0-3] MPEG-4 AAC Profile (AAC LC)
+ <li>[<a href="#5_1_media_codecs">5.1</a>.1/H-0-3] MPEG-4 AAC Profile (AAC LC)
</li>
- <li>[H-0-4] MPEG-4 HE AAC Profile (AAC+)
+ <li>[<a href="#5_1_media_codecs">5.1</a>.1/H-0-4] MPEG-4 HE AAC Profile (AAC+)
</li>
- <li>[H-0-5] AAC ELD (enhanced low delay AAC)
+ <li>[<a href="#5_1_media_codecs">5.1</a>.1/H-0-5] AAC ELD (enhanced low delay AAC)
</li>
</ul>
<p>
- <strong>Audio Decoding (Section 5.1.2)</strong>
- </p>
- <p>
Handheld device implementations MUST support the following audio decoding:
</p>
<ul>
- <li>[H-0-1] AMR-NB
+ <li>[<a href="#5_1_media_codecs">5.1</a>.2/H-0-1] AMR-NB
</li>
- <li>[H-0-2] AMR-WB
+ <li>[<a href="#5_1_media_codecs">5.1</a>.2/H-0-2] AMR-WB
</li>
</ul>
<p>
- <strong>Video Encoding (Section 5.2)</strong>
- </p>
- <p>
Handheld device implementations MUST support the following video encoding and make it available to third-party applications:
</p>
<ul>
- <li>[H-0-1] H.264 AVC
+ <li>[<a href="#5_2_video-encoding">5.2</a>/H-0-1] H.264 AVC
</li>
- <li>[H-0-2] VP8
+ <li>[<a href="#5_2_video-encoding">5.2</a>/H-0-2] VP8
</li>
</ul>
<p>
- <strong>Video Decoding (Section 5.3)</strong>
- </p>
- <p>
Handheld device implementations MUST support the following video decoding:
</p>
<ul>
- <li>[H-0-1] H.264 AVC.
+ <li>[<a href="#5_3_video_decoding">5.3</a>/H-0-1] H.264 AVC
</li>
- <li>[H-0-2] H.265 HEVC.
+ <li>[<a href="#5_3_video_decoding">5.3</a>/H-0-2] H.265 HEVC
</li>
- <li>[H-0-3] MPEG-4 SP.
+ <li>[<a href="#5_3_video_decoding">5.3</a>/H-0-3] MPEG-4 SP
</li>
- <li>[H-0-4] VP8.
+ <li>[<a href="#5_3_video_decoding">5.3</a>/H-0-4] VP8
</li>
- <li>[H-0-5] VP9.
+ <li>[<a href="#5_3_video_decoding">5.3</a>/H-0-5] VP9
</li>
</ul>
<h4 id="2_2_3_software">
2.2.3. Software
</h4>
<p>
- <strong>WebView Compatibility (Section 3.4.1)</strong>
- </p>
- <p>
Handheld device implementations:
</p>
<ul>
- <li>[H-0-1] MUST provide a complete implementation of the <code>android.webkit.Webview</code> API.
+ <li>[<a href="#3_4_web-compatibility">3.4</a>.1/H-0-1] MUST provide a complete implementation of the <code>android.webkit.Webview</code> API.
</li>
- </ul>
- <p>
- <strong>Browser Compatibility (Section 3.4.2)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>[H-0-1] MUST include a standalone Browser application for general user web browsing.
+ <li>[<a href="#3_4_web-compatibility">3.4</a>.2/H-0-1] MUST include a standalone Browser application for general user web browsing.
</li>
- </ul>
- <p>
- <strong>Launcher (Section 3.8.1)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>
- <p>
- [H-SR] Are STRONGLY RECOMMENDED to implement a default launcher that supports in-app pinning of shortcuts and widgets.
- </p>
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.1/H-SR] Are STRONGLY RECOMMENDED to implement a default launcher that supports in-app pinning of shortcuts and widgets.
</li>
- <li>
- <p>
- [H-SR] Are STRONGLY RECOMMENDED to implement a default launcher that provides quick access to the additional shortcuts provided by third-party apps through the <a href="https://developer.android.com/reference/android/content/pm/ShortcutManager.html">ShortcutManager</a> API.
- </p>
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.1/H-SR] Are STRONGLY RECOMMENDED to implement a default launcher that provides quick access to the additional shortcuts provided by third-party apps through the <a href="https://developer.android.com/reference/android/content/pm/ShortcutManager.html">ShortcutManager</a> API.
</li>
- <li>
- <p>
- [H-SR] Are STRONGLY RECOMMENDED to include a default launcher app that shows badges for the app icons.
- </p>
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.1/H-SR] Are STRONGLY RECOMMENDED to include a default launcher app that shows badges for the app icons.
</li>
- </ul>
- <p>
- <strong>Widgets (Section 3.8.2)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>[H-SR] Are STRONGLY RECOMMENDED to support third-party app widgets.
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.2/H-SR] Are STRONGLY RECOMMENDED to support third-party app widgets.
</li>
- </ul>
- <p>
- <strong>Notifications (Section 3.8.3)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>[H-0-1] MUST allow third-party apps to notify users of notable events through the <a href="https://developer.android.com/reference/android/app/Notification.html"><code>Notification</code></a> and <a href="https://developer.android.com/reference/android/app/NotificationManager.html"><code>NotificationManager</code></a> API classes.
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.3/H-0-1] MUST allow third-party apps to notify users of notable events through the <a href="https://developer.android.com/reference/android/app/Notification.html"><code>Notification</code></a> and <a href="https://developer.android.com/reference/android/app/NotificationManager.html"><code>NotificationManager</code></a> API classes.
</li>
- <li>[H-0-2] MUST support rich notifications.
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.3/H-0-2] MUST support rich notifications.
</li>
- <li>[H-0-3] MUST support heads-up notifications.
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.3/H-0-3] MUST support heads-up notifications.
</li>
- <li>[H-0-4] MUST include a notification shade, providing the user the ability to directly control (e.g. reply, snooze, dismiss, block) the notifications through user affordance such as action buttons or the control panel as implemented in the AOSP.
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.3/H-0-4] MUST include a notification shade, providing the user the ability to directly control (e.g. reply, snooze, dismiss, block) the notifications through user affordance such as action buttons or the control panel as implemented in the AOSP.
</li>
- </ul>
- <p>
- <strong>Search (Section 3.8.4)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>[H-SR] Are STRONGLY RECOMMENDED to implement an assistant on the device to handle the <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Assist action</a>.
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.4/H-SR] Are STRONGLY RECOMMENDED to implement an assistant on the device to handle the <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Assist action</a>.
</li>
</ul>
<p>
- <strong>Lock Screen Media Control (Section 3.8.10)</strong>
- </p>
- <p>
- If Android Handheld device implementations support a lock screen,they:
+ If Android Handheld device implementations support a lock screen, they:
</p>
<ul>
- <li>[H-1-1] MUST display the Lock screen Notifications including the Media Notification Template.
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.10/H-1-1] MUST display the Lock screen Notifications including the Media Notification Template.
</li>
</ul>
<p>
- <strong>Device administration (Section 3.9)</strong>
- </p>
- <p>
If Handheld device implementations support a secure lock screen, they:
</p>
<ul>
- <li>[H-1-1] MUST implement the full range of <a href="http://developer.android.com/guide/topics/admin/device-admin.html">device administration</a> policies defined in the Android SDK documentation.
+ <li>[<a href="#3_9_device-administration">3.9</a>/H-1-1] MUST implement the full range of <a href="http://developer.android.com/guide/topics/admin/device-admin.html">device administration</a> policies defined in the Android SDK documentation.
</li>
</ul>
<p>
- <strong>Accessibility (Section 3.10)</strong>
- </p>
- <p>
Handheld device implementations:
</p>
<ul>
- <li>
- <p>
- [H-SR] MUST support third-party accessibility services.
- </p>
+ <li>[<a href="#3_10_accessibility">3.10</a>/H-0-1] MUST support third-party accessibility services.
</li>
- <li>
- <p>
- [H-SR] Are STRONGLY RECOMMENDED to preload accessibility services on the device comparable with or exceeding functionality of the Switch Access and TalkBack (for languages supported by the preloaded Text-to-speech engine) accessibility services as provided in the <a href="https://github.com/google/talkback">talkback open source project</a>.
- </p>
+ <li>[<a href="#3_10_accessibility">3.10</a>/H-SR] Are STRONGLY RECOMMENDED to preload accessibility services on the device comparable with or exceeding functionality of the Switch Access and TalkBack (for languages supported by the preloaded Text-to-speech engine) accessibility services as provided in the <a href="https://github.com/google/talkback">talkback open source project</a>.
</li>
- </ul>
- <p>
- <strong>Text-to-Speech (Section 3.11)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>
- <p>
- [H-0-1] MUST support installation of third-party TTS engines.
- </p>
+ <li>[<a href="#3_11_text-to-speech">3.11</a>/H-0-1] MUST support installation of third-party TTS engines.
</li>
- <li>
- <p>
- [H-SR] Are STRONGLY RECOMMENDED to include a TTS engine supporting the languages available on the device.
- </p>
+ <li>[<a href="#3_11_text-to-speech">3.11</a>/H-SR] Are STRONGLY RECOMMENDED to include a TTS engine supporting the languages available on the device.
</li>
- </ul>
- <p>
- <strong>Quick Settings (Section 3.13)</strong>
- </p>
- <p>
- Handheld device implementations:
- </p>
- <ul>
- <li>[H-SR] Are STRONGLY RECOMMENDED to include a Quick Settings UI component.
+ <li>[<a href="#3_13_quick_settings">3.13</a>/H-SR] Are STRONGLY RECOMMENDED to include a Quick Settings UI component.
</li>
</ul>
<p>
- <strong>Companion Device Pairing (Section 3.15)</strong>
- </p>
- <p>
If Android handheld device implementations declare <code>FEATURE_BLUETOOTH</code> or <code>FEATURE_WIFI</code> support, they:
</p>
<ul>
- <li>[H-1-1] MUST support the companion device pairing feature.
+ <li>[<a href="#3_15_instant_apps">3.15</a>/H-1-1] MUST support the companion device pairing feature.
</li>
</ul>
<h4 id="2_2_4_performance_and_power">
2.2.4. Performance and Power
</h4>
- <p>
- <strong>User Experience Consistency (Section 8.1)</strong>
- </p>
- <p>
- For handheld device implementations:
- </p>
<ul>
- <li>[H-0-1] <strong>Consistent frame latency</strong>. Inconsistent frame latency or a delay to render frames MUST NOT happen more often than 5 frames in a second, and SHOULD be below 1 frames in a second.
+ <li>[<a href="#8_1_user-experience-consistency">8.1</a>/H-0-1] <strong>Consistent frame latency</strong>. Inconsistent frame latency or a delay to render frames MUST NOT happen more often than 5 frames in a second, and SHOULD be below 1 frames in a second.
</li>
- <li>[H-0-2] <strong>User interface latency</strong>. Device implementations MUST ensure low latency user experience by scrolling a list of 10K list entries as defined by the Android Compatibility Test Suite (CTS) in less than 36 secs.
+ <li>[<a href="#8_1_user-experience-consistency">8.1</a>/H-0-2] <strong>User interface latency</strong>. Device implementations MUST ensure low latency user experience by scrolling a list of 10K list entries as defined by the Android Compatibility Test Suite (CTS) in less than 36 secs.
</li>
- <li>[H-0-3] <strong>Task switching</strong>. When multiple applications have been launched, re-launching an already-running application after it has been launched MUST take less than 1 second.
+ <li>[<a href="#8_1_user-experience-consistency">8.1</a>/H-0-3] <strong>Task switching</strong>. When multiple applications have been launched, re-launching an already-running application after it has been launched MUST take less than 1 second.
</li>
</ul>
<p>
- <strong>File I/O Access Performance (Section 8.2)</strong>
- </p>
- <p>
Handheld device implementations:
</p>
<ul>
- <li>[H-0-1] MUST ensure a sequential write performance of at least 5 MB/s.
+ <li>[<a href="#8_2_file-io-access-performance">8.2</a>/H-0-1] MUST ensure a sequential write performance of at least 5 MB/s.
</li>
- <li>[H-0-2] MUST ensure a random write performance of at least 0.5 MB/s.
+ <li>[<a href="#8_2_file-io-access-performance">8.2</a>/H-0-2] MUST ensure a random write performance of at least 0.5 MB/s.
</li>
- <li>[H-0-3] MUST ensure a sequential read performance of at least 15 MB/s.
+ <li>[<a href="#8_2_file-io-access-performance">8.2</a>/H-0-3] MUST ensure a sequential read performance of at least 15 MB/s.
</li>
- <li>[H-0-4] MUST ensure a random read performance of at least 3.5 MB/s.
+ <li>[<a href="#8_2_file-io-access-performance">8.2</a>/H-0-4] MUST ensure a random read performance of at least 3.5 MB/s.
</li>
- </ul>
- <p>
- <strong>Power-Saving Modes (Section 8.3)</strong>
- </p>
- <p>
- For handheld device implementations:
- </p>
- <ul>
- <li>[H-0-1] All Apps exempted from App Standby and Doze power-saving modes MUST be made visible to the end user.
+ <li>[<a href="#8_3_power_saving_modes">8.3</a>/H-0-1] All Apps exempted from App Standby and Doze power-saving modes MUST be made visible to the end user.
</li>
- <li>[H-0-2] The triggering, maintenance, wakeup algorithms and the use of global system settings of App Standby and Doze power-saving modes MUST not deviate from the Android Open Source Project.
+ <li>[<a href="#8_3_power_saving_modes">8.3</a>/H-0-2] The triggering, maintenance, wakeup algorithms and the use of global system settings of App Standby and Doze power-saving modes MUST not deviate from the Android Open Source Project.
</li>
</ul>
<p>
- <strong>Power Consumption Accounting (Sections 8.4)</strong>
- </p>
- <p>
Handheld device implementations:
</p>
<ul>
- <li>[H-0-1] MUST provide a per-component power profile that defines the <a href="http://source.android.com/devices/tech/power/values.html">current consumption value</a> for each hardware component and the approximate battery drain caused by the components over time as documented in the Android Open Source Project site.
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/H-0-1] MUST provide a per-component power profile that defines the <a href="http://source.android.com/devices/tech/power/values.html">current consumption value</a> for each hardware component and the approximate battery drain caused by the components over time as documented in the Android Open Source Project site.
</li>
- <li>[H-0-2] MUST report all power consumption values in milliampere hours (mAh).
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/H-0-2] MUST report all power consumption values in milliampere hours (mAh).
</li>
- <li>[H-0-3] MUST report CPU power consumption per each process's UID. The Android Open Source Project meets the requirement through the <code>uid_cputime</code> kernel module implementation.
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/H-0-3] MUST report CPU power consumption per each process's UID. The Android Open Source Project meets the requirement through the <code>uid_cputime</code> kernel module implementation.
</li>
- <li>[H-0-4] MUST make this power usage available via the <a href="http://source.android.com/devices/tech/power/batterystats.html"><code>adb shell dumpsys batterystats</code></a> shell command to the app developer.
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/H-0-4] MUST make this power usage available via the <a href="http://source.android.com/devices/tech/power/batterystats.html"><code>adb shell dumpsys batterystats</code></a> shell command to the app developer.
</li>
- <li>SHOULD be attributed to the hardware component itself if unable to attribute hardware component power usage to an application.
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/H] SHOULD be attributed to the hardware component itself if unable to attribute hardware component power usage to an application.
</li>
</ul>
<p>
If Handheld device implementations include a screen or video output, they:
</p>
<ul>
- <li>[H-1-1] MUST honor the <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_USAGE_SUMMARY"><code>android.intent.action.POWER_USAGE_SUMMARY</code></a> intent and display a settings menu that shows this power usage.
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/H-1-1] MUST honor the <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_USAGE_SUMMARY"><code>android.intent.action.POWER_USAGE_SUMMARY</code></a> intent and display a settings menu that shows this power usage.
</li>
</ul>
<h4 id="2_2_5_security_model">
2.2.5. Security Model
</h4>
<p>
- <strong>Permissions (Sections 9.1)</strong>
- </p>
- <p>
Handheld device implementations:
</p>
<ul>
- <li>[H-0-1] MUST allow third-party apps to access the usage statistics via the <code>android.permission.PACKAGE_USAGE_STATS</code> permission and provide a user-accessible mechanism to grant or revoke access to such apps in response to the <a href="https://developer.android.com/reference/android/provider/Settings.html#ACTION&amp;lowbar;USAGE&amp;lowbar;ACCESS&amp;lowbar;SETTINGS"><code>android.settings.ACTION_USAGE_ACCESS_SETTINGS</code></a> intent.
+ <li>[<a href="#9_1_permissions">9.1</a>/H-0-1] MUST allow third-party apps to access the usage statistics via the <code>android.permission.PACKAGE_USAGE_STATS</code> permission and provide a user-accessible mechanism to grant or revoke access to such apps in response to the <a href="https://developer.android.com/reference/android/provider/Settings.html#ACTION&amp;lowbar;USAGE&amp;lowbar;ACCESS&amp;lowbar;SETTINGS"><code>android.settings.ACTION_USAGE_ACCESS_SETTINGS</code></a> intent.
</li>
</ul>
<h3 id="2_3_television_requirements">
@@ -811,260 +586,217 @@
2.3.1. Hardware
</h4>
<p>
- <strong>Non-touch Navigation (Section 7.2.2)</strong>
- </p>
- <p>
Television device implementations:
</p>
<ul>
- <li>[T-0-1] MUST support <a href="https://developer.android.com/reference/android/content/res/Configuration.html#NAVIGATION_DPAD">D-pad</a>.
+ <li>[<a href="#7_2_input_devices">7.2</a>.2/T-0-1] MUST support <a href="https://developer.android.com/reference/android/content/res/Configuration.html#NAVIGATION_DPAD">D-pad</a>.
</li>
- </ul>
- <p>
- <strong>Navigation Keys (Section 7.2.3)</strong>
- </p>
- <p>
- Television device implementations:
- </p>
- <ul>
- <li>[T-0-1] MUST provide the Home and Back functions.
+ <li>[<a href="#7_2_input_devices">7.2</a>.3/T-0-1] MUST provide the Home and Back functions.
</li>
- <li>[T-0-2] MUST send both the normal and long press event of the Back function (<a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK"><code>KEYCODE_BACK</code></a>) to the foreground application.
+ <li>[<a href="#7_2_input_devices">7.2</a>.3/T-0-2] MUST send both the normal and long press event of the Back function (<a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK"><code>KEYCODE_BACK</code></a>) to the foreground application.
</li>
- </ul>
- <p>
- <strong>Button Mappings (Section 7.2.6.1)</strong>
- </p>
- <p>
- Television device implementations:
- </p>
- <ul>
- <li>[T-0-1] MUST include support for game controllers and declare the <code>android.hardware.gamepad</code> feature flag.
+ <li>[<a href="#7_2_input_devices">7.2</a>.6.1/T-0-1] MUST include support for game controllers and declare the <code>android.hardware.gamepad</code> feature flag.
</li>
- </ul>
- <p>
- <strong>Remote Control (Section 7.2.7)</strong>
- </p>
- <p>
- Television device implementations:
- </p>
- <ul>
- <li>SHOULD provide a remote control from which users can access <a href="#7_2_2_non-touch_navigation">non-touch navigation</a> and <a href="#7_2_3_navigation_keys">core navigation keys</a> inputs.
+ <li>[<a href="#7_2_input_devices">7.2</a>.7/T] SHOULD provide a remote control from which users can access <a href="#7_2_2_non-touch_navigation">non-touch navigation</a> and <a href="#7_2_3_navigation_keys">core navigation keys</a> inputs.
</li>
</ul>
<p>
- <strong>Gyroscope (Section 7.3.4)</strong>
- </p>
- <p>
If Television device implementations include a gyroscope, they:
</p>
<ul>
- <li>[T-1-1] MUST be able to report events up to a frequency of at least 100 Hz.
+ <li>[<a href="#7_3_sensors">7.3</a>.4/T-1-1] MUST be able to report events up to a frequency of at least 100 Hz.
</li>
</ul>
<p>
- <strong>Bluetooth (Section 7.4.3)</strong>
- </p>
- <p>
Television device implementations:
</p>
<ul>
- <li>[T-0-1] MUST support Bluetooth and Bluetooth LE.
+ <li>[<a href="#7_4_data_connectivity">7.4</a>.3/T-0-1] MUST support Bluetooth and Bluetooth LE.
+ </li>
+ <li>[<a href="#7_6_memory_and_storage">7.6</a>.1/T-0-1] MUST have at least 4GB of non-volatile storage available for application private data (a.k.a. "/data" partition).
</li>
</ul>
<p>
- <strong>Minimum Memory and Storage (Section 7.6.1)</strong>
- </p>
- <p>
- Television device implementations:
+ If TV device implementations are 32-bit:
</p>
<ul>
- <li>[T-0-1] MUST have at least 4GB of non-volatile storage available for application private data (a.k.a. "/data" partition)
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/T-1-1] The memory available to the kernel and userspace MUST be at least 896MB if any of the following densities are used:
+ </p>
+ <ul>
+ <li>400dpi or higher on small/normal screens
+ </li>
+ <li>xhdpi or higher on large screens
+ </li>
+ <li>tvdpi or higher on extra large screens
+ </li>
+ </ul>
</li>
</ul>
<p>
- <strong>Microphone (Section 7.8.1)</strong>
- </p>
- <p>
- Television device implementations:
+ If TV device implementations are 64-bit:
</p>
<ul>
- <li>SHOULD include a microphone.
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/T-2-1] The memory available to the kernel and userspace MUST be at least 1280MB if any of the following densities are used:
+ </p>
+ <ul>
+ <li>400dpi or higher on small/normal screens
+ </li>
+ <li>xhdpi or higher on large screens
+ </li>
+ <li>tvdpi or higher on extra large screens
+ </li>
+ </ul>
</li>
</ul>
<p>
- <strong>Audio Output (Section 7.8.2)</strong>
+ Note that the "memory available to the kernel and userspace" above refers to the memory space provided in addition to any memory already dedicated to hardware components such as radio, video, and so on that are not under the kernel’s control on device implementations.
</p>
<p>
Television device implementations:
</p>
<ul>
- <li>[T-0-1] MUST have an audio output and declare <code>android.hardware.audio.output</code>.
+ <li>[<a href="#7_8_audio">7.8</a>.1/T] SHOULD include a microphone.
+ </li>
+ <li>[<a href="#7_8_audio">7.8</a>.2/T-0-1] MUST have an audio output and declare <code>android.hardware.audio.output</code>.
</li>
</ul>
<h4 id="2_3_2_multimedia">
2.3.2. Multimedia
</h4>
<p>
- <strong>Audio Encoding (Section 5.1)</strong>
- </p>
- <p>
Television device implementations MUST support the following audio encoding:
</p>
<ul>
- <li>[T-0-1] MPEG-4 AAC Profile (AAC LC)
+ <li>[<a href="#5_1_media_codecs">5.1</a>/T-0-1] MPEG-4 AAC Profile (AAC LC)
</li>
- <li>[T-0-2] MPEG-4 HE AAC Profile (AAC+)
+ <li>[<a href="#5_1_media_codecs">5.1</a>/T-0-2] MPEG-4 HE AAC Profile (AAC+)
</li>
- <li>[T-0-3] AAC ELD (enhanced low delay AAC)
+ <li>[<a href="#5_1_media_codecs">5.1</a>/T-0-3] AAC ELD (enhanced low delay AAC)
</li>
</ul>
<p>
- <strong>Video Encoding (Section 5.2)</strong>
- </p>
- <p>
Television device implementations MUST support the following video encoding:
</p>
<ul>
- <li>[T-0-1] H.264 AVC
+ <li>[<a href="#5_2_video-encoding">5.2</a>/T-0-1] H.264 AVC
</li>
- <li>[T-0-2] VP8
+ <li>[<a href="#5_2_video-encoding">5.2</a>/T-0-2] VP8
</li>
</ul>
<p>
- <strong>H-264 (Section 5.2.2)</strong>
- </p>
- <p>
- Television device implementations are:
+ Television device implementations:
</p>
<ul>
- <li>[T-SR] STRONGLY RECOMMENDED to support H.264 encoding of 720p and 1080p resolution videos.
+ <li>[<a href="#5_2_video-encoding">5.2</a>.2/T-SR] Are STRONGLY RECOMMENDED to support H.264 encoding of 720p and 1080p resolution videos.
</li>
- <li>[T-SR] STRONGLY RECOMMENDED to support H.264 encoding of 1080p resolution video at 30 frame-per-second (fps).
+ <li>[<a href="#5_2_video-encoding">5.2</a>2/T-SR] Are STRONGLY RECOMMENDED to support H.264 encoding of 1080p resolution video at 30 frame-per-second (fps).
</li>
</ul>
<p>
- <strong>Video Decoding (Section 5.3)</strong>
- </p>
- <p>
Television device implementations MUST support the following video decoding:
</p>
<ul>
- <li>[T-0-1] H.264 AVC
+ <li>[<a href="#5_3_video_decoding">5.3</a>/T-0-1] H.264 AVC
</li>
- <li>[T-0-2] H.265 HEVC
+ <li>[<a href="#5_3_video_decoding">5.3</a>/T-0-2] H.265 HEVC
</li>
- <li>[T-0-3] MPEG-4 SP
+ <li>[<a href="#5_3_video_decoding">5.3</a>/T-0-3] MPEG-4 SP
</li>
- <li>[T-0-4] VP8
+ <li>[<a href="#5_3_video_decoding">5.3</a>/T-0-4] VP8
</li>
- <li>[T-0-5] VP9
+ <li>[<a href="#5_3_video_decoding">5.3</a>/T-0-5] VP9
</li>
</ul>
<p>
Television device implementations are STRONGLY RECOMMENDED to support the following video decoding:
</p>
<ul>
- <li>[T-SR] MPEG-2
+ <li>[<a href="#5_3_video_decoding">5.3</a>/T-SR] MPEG-2
</li>
</ul>
<p>
- <strong>H.264 (Section 5.3.4)</strong>
- </p>
- <p>
If Television device implementations support H.264 decoders, they:
</p>
<ul>
- <li>[T-1-1] MUST support High Profile Level 4.2 and the HD 1080p (at 60 fps) decoding profile.
+ <li>[<a href="#5_3_video_decoding">5.3</a>.4/T-1-1] MUST support High Profile Level 4.2 and the HD 1080p (at 60 fps) decoding profile.
</li>
- <li>[T-1-2] MUST be capable of decoding videos with both HD profiles as indicated in the following table and encoded with either the Baseline Profile, Main Profile, or the High Profile Level 4.2
+ <li>[<a href="#5_3_video_decoding">5.3</a>.4/T-1-2] MUST be capable of decoding videos with both HD profiles as indicated in the following table and encoded with either the Baseline Profile, Main Profile, or the High Profile Level 4.2
</li>
</ul>
<p>
- <strong>H.265 (HEVC) (Section 5.3.5)</strong>
- </p>
- <p>
If Television device implementations support H.265 codec and the HD 1080p decoding profile, they:
</p>
<ul>
- <li>[T-1-1] MUST support the Main Profile Level 4.1 Main tier.
+ <li>[<a href="#5_3_video_decoding">5.3</a>.5/T-1-1] MUST support the Main Profile Level 4.1 Main tier.
</li>
- <li>[T-SR] Are STRONGLY RECOMMENDED to support 60 fps video frame rate for HD 1080p.
+ <li>[<a href="#5_3_video_decoding">5.3</a>.5/T-SR] Are STRONGLY RECOMMENDED to support 60 fps video frame rate for HD 1080p.
</li>
</ul>
<p>
If Television device implementations support H.265 codec and the UHD decoding profile, then:
</p>
<ul>
- <li>[T-2-1] The codec MUST support Main10 Level 5 Main Tier profile.
+ <li>[<a href="#5_3_video_decoding">5.3</a>.5/T-2-1] The codec MUST support Main10 Level 5 Main Tier profile.
</li>
</ul>
<p>
- <strong>VP8 (Section 5.3.6)</strong>
- </p>
- <p>
If Television device implementations support VP8 codec, they:
</p>
<ul>
- <li>[T-1-1] MUST support the HD 1080p60 decoding profile.
+ <li>[<a href="#5_3_video_decoding">5.3</a>.6/T-1-1] MUST support the HD 1080p60 decoding profile.
</li>
</ul>
<p>
If Television device implementations support VP8 codec and support 720p, they:
</p>
<ul>
- <li>[T-2-1] MUST support the HD 720p60 decoding profile.
+ <li>[<a href="#5_3_video_decoding">5.3</a>.6/T-2-1] MUST support the HD 720p60 decoding profile.
</li>
</ul>
<p>
- <strong>VP9 (Section 5.3.7)</strong>
- </p>
- <p>
If Television device implementations support VP9 codec and the UHD video decoding, they:
</p>
<ul>
- <li>[T-1-1] MUST support 8-bit color depth and SHOULD support VP9 Profile 2 (10-bit).
+ <li>[<a href="#5_3_video_decoding">5.3</a>.7/T-1-1] MUST support 8-bit color depth and SHOULD support VP9 Profile 2 (10-bit).
</li>
</ul>
<p>
If Television device implementations support VP9 codec, the 1080p profile and VP9 hardware decoding, they:
</p>
<ul>
- <li>[T-2-1] MUST support 60 fps for 1080p.
+ <li>[<a href="#5_3_video_decoding">5.3</a>.7/T-2-1] MUST support 60 fps for 1080p.
</li>
</ul>
<p>
- <strong>Secure Media (Section 5.8)</strong>
- </p>
- <p>
- If device implementations are Android Television devices and support 4K resolution, they:
+ Television device implementations:
</p>
<ul>
- <li>[T-1-1] MUST support HDCP 2.2 for all wired external displays.
+ <li>[<a href="#5_8_secure-media">5.8</a>/T-SR] Are STRONGLY RECOMMENDED to support simultaneous decoding of secure streams. At minimum, simultaneous decoding of two steams is STRONGLY RECOMMENDED.
</li>
</ul>
<p>
- If Television device implementations don't support 4K resolution, they:
+ If device implementations are Android Television devices and support 4K resolution, they:
</p>
<ul>
- <li>[T-2-1] MUST support HDCP 1.4 for all wired external displays.
+ <li>[<a href="#5_8_secure-media">5.8</a>/T-1-1] MUST support HDCP 2.2 for all wired external displays.
</li>
</ul>
<p>
- Television device implementations:
+ If Television device implementations don't support 4K resolution, they:
</p>
<ul>
- <li>[T-SR] Are STRONGLY RECOMMENDED to support simulataneous decoding of secure streams. At minimum, simultaneous decoding of two steams is STRONGLY RECOMMENDED.
+ <li>[<a href="#5_8_secure-media">5.8</a>/T-2-1] MUST support HDCP 1.4 for all wired external displays.
</li>
</ul>
<p>
- <strong>Audio Output Volume (Section 5.5.3)</strong>
- </p>
- <p>
Television device implementations:
</p>
<ul>
- <li>[T-0-1] MUST include support for system Master Volume and digital audio output volume attenuation on supported outputs, except for compressed audio passthrough output (where no audio decoding is done on the device).
+ <li>[<a href="#5_5_audio-playback">5.5</a>.3/T-0-1] MUST include support for system Master Volume and digital audio output volume attenuation on supported outputs, except for compressed audio passthrough output (where no audio decoding is done on the device).
</li>
</ul>
<h4 id="2_3_3_software">
@@ -1074,142 +806,83 @@
Television device implementations:
</p>
<ul>
- <li>[T-0-1] MUST declare the features <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_LEANBACK"><code>android.software.leanback</code></a> and <code>android.hardware.type.television</code>.
+ <li>[<a href="#3_0_intro">3</a>/T-0-1] MUST declare the features <a href="http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_LEANBACK"><code>android.software.leanback</code></a> and <code>android.hardware.type.television</code>.
</li>
- </ul>
- <p>
- <strong>WebView compatibility (Section 3.4.1)</strong>
- </p>
- <p>
- Television device implementations:
- </p>
- <ul>
- <li>[T-0-1] MUST provide a complete implementation of the <code>android.webkit.Webview</code> API.
+ <li>[<a href="#3_4_web-compatibility">3.4</a>.1/T-0-1] MUST provide a complete implementation of the <code>android.webkit.Webview</code> API.
</li>
</ul>
<p>
- <strong>Lock Screen Media Control (Section 3.8.10)</strong>
- </p>
- <p>
If Android Television device implementations support a lock screen,they:
</p>
<ul>
- <li>[T-1-1] MUST display the Lock screen Notifications including the Media Notification Template.
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.10/T-1-1] MUST display the Lock screen Notifications including the Media Notification Template.
</li>
</ul>
<p>
- <strong>Multi-windows (Section 3.8.14)</strong>
- </p>
- <p>
Television device implementations:
</p>
<ul>
- <li>[T-SR] Are STRONGLY RECOMMENDED to support picture-in-picture (PIP) mode multi-window.
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.14/T-SR] Are STRONGLY RECOMMENDED to support picture-in-picture (PIP) mode multi-window.
</li>
- </ul>
- <p>
- <strong>Accessibility (Section 3.10)</strong>
- </p>
- <p>
- Television device implementations:
- </p>
- <ul>
- <li>
- <p>
- [T-SR] MUST support third-party accessibility services.
- </p>
+ <li>[<a href="#3_10_accessibility">3.10</a>/T-0-1] MUST support third-party accessibility services.
</li>
- <li>
- <p>
- [T-SR] Android Television device implementations are STRONGLY RECOMMENDED to preload accessibility services on the device comparable with or exceeding functionality of the Switch Access and TalkBack (for languages supported by the preloaded Text-to-speech engine) accessibility services as provided in the <a href="https://github.com/google/talkback">talkback open source project</a>.
- </p>
+ <li>[<a href="#3_10_accessibility">3.10</a>/T-SR] Are STRONGLY RECOMMENDED to preload accessibility services on the device comparable with or exceeding functionality of the Switch Access and TalkBack (for languages supported by the preloaded Text-to-speech engine) accessibility services as provided in the <a href="https://github.com/google/talkback">talkback open source project</a>.
</li>
</ul>
<p>
- <strong>Text-to-Speech (Section 3.11)</strong>
- </p>
- <p>
- If device implementations report the feature android.hardware.audio.output, they:
+ If Television device implementations report the feature <code>android.hardware.audio.output</code>, they:
</p>
<ul>
- <li>
- <p>
- [T-SR] STRONGLY RECOMMENDED to include a TTS engine supporting the languages available on the device.
- </p>
+ <li>[<a href="#3_11_text-to-speech">3.11</a>/T-SR] Are STRONGLY RECOMMENDED to include a TTS engine supporting the languages available on the device.
</li>
- <li>
- <p>
- [T-0-1] MUST support installation of third-party TTS engines.
- </p>
+ <li>[<a href="#3_11_text-to-speech">3.11</a>/T-1-1] MUST support installation of third-party TTS engines.
</li>
</ul>
<p>
- <strong>TV Input Framework (Section 3.12)</strong>
- </p>
- <p>
Television device implementations:
</p>
<ul>
- <li>[T-0-1] MUST support TV Input Framework.
+ <li>[<a href="#3_12_tv-input-framework">3.12</a>/T-0-1] MUST support TV Input Framework.
</li>
</ul>
- <h4 id="2_3_4_performance_and_power">
- 2.3.4. Performance and Power
+ <h4 id="2_2_4_performance_and_power">
+ 2.2.4. Performance and Power
</h4>
- <p>
- <strong>User Experience Consistency (Section 8.1)</strong>
- </p>
- <p>
- For Television device implementations:
- </p>
<ul>
- <li>[T-0-1] <strong>Consistent frame latency</strong>. Inconsistent frame latency or a delay to render frames MUST NOT happen more often than 5 frames in a second, and SHOULD be below 1 frames in a second.
+ <li>[<a href="#8_1_user-experience-consistency">8.1</a>/T-0-1] <strong>Consistent frame latency</strong>. Inconsistent frame latency or a delay to render frames MUST NOT happen more often than 5 frames in a second, and SHOULD be below 1 frames in a second.
</li>
- </ul>
- <p>
- <strong>File I/O Access Performance (Section 8.2)</strong>
- </p>
- <p>
- Television device implementations:
- </p>
- <ul>
- <li>[T-0-1] MUST ensure a sequential write performance of at least 5MB/s.
+ <li>[<a href="#8_2_file-io-access-performance">8.2</a>/T-0-1] MUST ensure a sequential write performance of at least 5MB/s.
</li>
- <li>[T-0-2] MUST ensure a random write performance of at least 0.5MB/s.
+ <li>[<a href="#8_2_file-io-access-performance">8.2</a>/T-0-2] MUST ensure a random write performance of at least 0.5MB/s.
</li>
- <li>[T-0-3] MUST ensure a sequential read performance of at least 15MB/s.
+ <li>[<a href="#8_2_file-io-access-performance">8.2</a>/T-0-3] MUST ensure a sequential read performance of at least 15MB/s.
</li>
- <li>[T-0-4] MUST ensure a random read performance of at least 3.5MB/s.
+ <li>
+ <p>
+ [<a href="#8_2_file-io-access-performance">8.2</a>/T-0-4] MUST ensure a random read performance of at least 3.5MB/s.
+ </p>
</li>
- </ul>
- <p>
- <strong>Power-Saving Modes (Section 8.3)</strong>
- </p>
- <p>
- For Television device implementations:
- </p>
- <ul>
- <li>[T-0-1] All Apps exempted from App Standby and Doze power-saving modes MUST be made visible to the end user.
+ <li>
+ <p>
+ [<a href="#8_3_power_saving_modes">8.3</a>/T-0-1] All apps exempted from App Standby and Doze power-saving modes MUST be made visible to the end user.
+ </p>
</li>
- <li>[T-0-2] The triggering, maintenance, wakeup algorithms and the use of global system settings of App Standby and Doze power-saving modes MUST not deviate from the Android Open Source Project.
+ <li>[<a href="#8_3_power_saving_modes">8.3</a>/T-0-2] The triggering, maintenance, wakeup algorithms and use of global system settings of App Standby and Doze power-saving modes MUST not deviate from the Android Open Source Project.
</li>
</ul>
<p>
- <strong>Power Consumption Accounting (Sections 8.4)</strong>
- </p>
- <p>
Television device implementations:
</p>
<ul>
- <li>[T-0-1] MUST provide a per-component power profile that defines the <a href="http://source.android.com/devices/tech/power/values.html">current consumption value</a> for each hardware component and the approximate battery drain caused by the components over time as documented in the Android Open Source Project site.
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/T-0-1] MUST provide a per-component power profile that defines the <a href="http://source.android.com/devices/tech/power/values.html">current consumption value</a> for each hardware component and the approximate battery drain caused by the components over time as documented in the Android Open Source Project site.
</li>
- <li>[T-0-2] MUST report all power consumption values in milliampere hours (mAh).
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/T-0-2] MUST report all power consumption values in milliampere hours (mAh).
</li>
- <li>[T-0-3] MUST report CPU power consumption per each process's UID. The Android Open Source Project meets the requirement through the <code>uid_cputime</code> kernel module implementation.
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/T-0-3] MUST report CPU power consumption per each process's UID. The Android Open Source Project meets the requirement through the <code>uid_cputime</code> kernel module implementation.
</li>
- <li>SHOULD be attributed to the hardware component itself if unable to attribute hardware component power usage to an application.
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/T] SHOULD be attributed to the hardware component itself if unable to attribute hardware component power usage to an application.
</li>
- <li>[T-0-4] MUST make this power usage available via the <a href="http://source.android.com/devices/tech/power/batterystats.html"><code>adb shell dumpsys batterystats</code></a> shell command to the app developer.
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/T-0-4] MUST make this power usage available via the <a href="http://source.android.com/devices/tech/power/batterystats.html"><code>adb shell dumpsys batterystats</code></a> shell command to the app developer.
</li>
</ul>
<h3 id="2_4_watch_requirements">
@@ -1234,85 +907,53 @@
2.4.1. Hardware
</h4>
<p>
- <strong>Screen Size (Section 7.1.1.1)</strong>
- </p>
- <p>
Watch device implementations:
</p>
<ul>
- <li>[W-0-1] MUST have a screen with the physical diagonal size in the range from 1.1 to 2.5 inches.
+ <li>
+ <p>
+ [<a href="#7_1_display-and-graphics">7.1</a>.1.1/W-0-1] MUST have a screen with the physical diagonal size in the range from 1.1 to 2.5 inches.
+ </p>
</li>
- </ul>
- <p>
- <strong>Navigation Keys (Section 7.2.3)</strong>
- </p>
- <p>
- Watch device implementations:
- </p>
- <ul>
- <li>[W-0-1] MUST have the Home function available to the user, and the Back function except for when it is in <code>UI_MODE_TYPE_WATCH</code>.
+ <li>
+ <p>
+ [<a href="#7_2_input_devices">7.2</a>.3/W-0-1] MUST have the Home function available to the user, and the Back function except for when it is in <code>UI_MODE_TYPE_WATCH</code>.
+ </p>
</li>
- </ul>
- <p>
- <strong>Touchscreen Input (Section 7.2.4)</strong>
- </p>
- <p>
- Watch device implementations:
- </p>
- <ul>
- <li>[W-0-2] MUST support touchscreen input.
+ <li>
+ <p>
+ [<a href="#7_2_input_devices">7.2</a>.4/W-0-1] MUST support touchscreen input.
+ </p>
</li>
- </ul>
- <p>
- <strong>Accelerometer (Section 7.3.1)</strong>
- </p>
- <p>
- Watch device implementations:
- </p>
- <ul>
- <li>[W-SR] Are STRONGLY RECOMMENDED to include a 3-axis accelerometer.
+ <li>
+ <p>
+ [<a href="#7_3_sensors">7.3</a>.1/W-SR] Are STRONGLY RECOMMENDED to include a 3-axis accelerometer.
+ </p>
</li>
- </ul>
- <p>
- <strong>Bluetooth (Section 7.4.3)</strong>
- </p>
- <p>
- Watch device implementations:
- </p>
- <ul>
- <li>[W-0-1] MUST support Bluetooth.
+ <li>
+ <p>
+ [<a href="#7_4_data_connectivity">7.4</a>.3/W-0-1] MUST support Bluetooth.
+ </p>
</li>
- </ul>
- <p>
- <strong>Minimum Memory and Storage (Section 7.6.1)</strong>
- </p>
- <p>
- Watch device implementations:
- </p>
- <ul>
- <li>[W-0-1] MUST have at least 1GB of non-volatile storage available for application private data (a.k.a. "/data" partition)
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/W-0-1] MUST have at least 1GB of non-volatile storage available for application private data (a.k.a. "/data" partition)
+ </p>
</li>
- <li>[W-0-2] MUST have at least 416MB memory available to the kernel and userspace.
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/W-0-2] MUST have at least 416MB memory available to the kernel and userspace.
+ </p>
</li>
- </ul>
- <p>
- <strong>Microphone (Section 7.8.1)</strong>
- </p>
- <p>
- Watch device implementations:
- </p>
- <ul>
- <li>[W-0-1] MUST include a microphone.
+ <li>
+ <p>
+ [<a href="#7_8_audio">7.8</a>.1/W-0-1] MUST include a microphone.
+ </p>
</li>
- </ul>
- <p>
- <strong>Audio Output (Section 7.8.1)</strong>
- </p>
- <p>
- Watch device implementations:
- </p>
- <ul>
- <li>MAY but SHOULD NOT have audio output.
+ <li>
+ <p>
+ [<a href="#7_8_audio">7.8</a>.2/W] MAY but SHOULD NOT have audio output.
+ </p>
</li>
</ul>
<h4 id="2_4_2_multimedia">
@@ -1328,54 +969,39 @@
Watch device implementations:
</p>
<ul>
- <li>[W-0-1] MUST declare the feature android.hardware.type.watch.
+ <li>[<a href="#3_0_intro">3</a>/W-0-1] MUST declare the feature <code>android.hardware.type.watch</code>.
</li>
- <li>[W-0-2] MUST support uiMode = <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_WATCH">UI_MODE_TYPE_WATCH</a>.
+ <li>[<a href="#3_0_intro">3</a>/W-0-2] MUST support uiMode = <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_WATCH">UI_MODE_TYPE_WATCH</a>.
</li>
</ul>
<p>
- <strong>Search (Section 3.8.4)</strong>
- </p>
- <p>
Watch device implementations:
</p>
<ul>
- <li>[W-SR] Are STRONGLY RECOMMENDED to implement an assistant on the device to handle the <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Assist action</a>.
+ <li>[<a href="#3_8_user-interface-compatibility">3.8</a>.4/W-SR] Are STRONGLY RECOMMENDED to implement an assistant on the device to handle the <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Assist action</a>.
</li>
</ul>
<p>
- <strong>Accessibility (Section 3.10)</strong>
- </p>
- <p>
Watch device implementations that declare the <code>android.hardware.audio.output</code> feature flag:
</p>
<ul>
- <li>
- <p>
- [W-1-1] MUST support third-party accessibility services.
- </p>
+ <li>[<a href="#3_10_accessibility">3.10</a>/W-1-1] MUST support third-party accessibility services.
</li>
- <li>
- <p>
- [W-SR] Are STRONGLY RECOMMENDED to preload accessibility services on the device comparable with or exceeding functionality of the Switch Access and TalkBack (for languages supported by the preloaded Text-to-speech engine) accessibility services as provided in the <a href="https://github.com/google/talkback">talkback open source project</a>.
- </p>
+ <li>[<a href="#3_10_accessibility">3.10</a>/W-SR] Are STRONGLY RECOMMENDED to preload accessibility services on the device comparable with or exceeding functionality of the Switch Access and TalkBack (for languages supported by the preloaded Text-to-speech engine) accessibility services as provided in the <a href="https://github.com/google/talkback">talkback open source project</a>.
</li>
</ul>
<p>
- <strong>Text-to-Speech (Section 3.11)</strong>
- </p>
- <p>
If Watch device implementations report the feature android.hardware.audio.output, they:
</p>
<ul>
<li>
<p>
- [W-SR] Are STRONGLY RECOMMENDED to include a TTS engine supporting the languages available on the device.
+ [<a href="#3_11_text-to-speech">3.11</a>/W-SR] Are STRONGLY RECOMMENDED to include a TTS engine supporting the languages available on the device.
</p>
</li>
<li>
<p>
- [W-0-1] MUST support installation of third-party TTS engines.
+ [<a href="#3_11_text-to-speech">3.11</a>/W-0-1] MUST support installation of third-party TTS engines.
</p>
</li>
</ul>
@@ -1401,128 +1027,91 @@
2.5.1. Hardware
</h4>
<p>
- <strong>Screen Size (Section 7.1.1.1)</strong>
- </p>
- <p>
Automotive device implementations:
</p>
<ul>
- <li>[A-0-1] MUST have a screen at least 6 inches in physical diagonal size.
+ <li>[<a href="#7_1_display-and-graphics">7.1</a>.1.1/A-0-1] MUST have a screen at least 6 inches in physical diagonal size.
</li>
- <li>[A-0-2] MUST have a screen size layout of at least 750 dp x 480 dp.
+ <li>
+ <p>
+ [<a href="#7_1_display-and-graphics">7.1</a>.1.1/A-0-2] MUST have a screen size layout of at least 750 dp x 480 dp.
+ </p>
</li>
- </ul>
- <p>
- <strong>Navigation Keys (Section 7.2.3)</strong>
- </p>
- <p>
- Automotive device implementations:
- </p>
- <ul>
- <li>[A-0-1] MUST provide the Home function and MAY provide Back and Recent functions.
+ <li>
+ <p>
+ [<a href="#7_2_input_devices">7.2</a>.3/A-0-1] MUST provide the Home function and MAY provide Back and Recent functions.
+ </p>
</li>
- <li>[A-0-2] MUST send both the normal and long press event of the Back function (<a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK"><code>KEYCODE_BACK</code></a>) to the foreground application.
+ <li>
+ <p>
+ [<a href="#7_2_input_devices">7.2</a>.3/A-0-2] MUST send both the normal and long press event of the Back function (<a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_BACK"><code>KEYCODE_BACK</code></a>) to the foreground application.
+ </p>
</li>
- </ul>
- <p>
- <strong>Accelerometer (Section 7.3.1)</strong>
- </p>
- <p>
- Automotive device implementations:
- </p>
- <ul>
- <li>[A-SR] Are STRONGLY RECOMMENDED to include a 3-axis accelerometer.
+ <li>
+ <p>
+ [<a href="#7_3_sensors">7.3</a>.1/A-SR] Are STRONGLY RECOMMENDED to include a 3-axis accelerometer.
+ </p>
</li>
</ul>
<p>
If Automotive device implementations include a 3-axis accelerometer, they:
</p>
<ul>
- <li>[A-1-1] MUST be able to report events up to a frequency of at least 100 Hz.
+ <li>[<a href="#7_3_sensors">7.3</a>.1/A-1-1] MUST be able to report events up to a frequency of at least 100 Hz.
</li>
- <li>[A-1-2] MUST comply with the Android <a href="http://source.android.com/devices/sensors/sensor-types.html#auto_axes">car sensor coordinate system</a>.
+ <li>[<a href="#7_3_sensors">7.3</a>.1/A-1-2] MUST comply with the Android <a href="http://source.android.com/devices/sensors/sensor-types.html#auto_axes">car sensor coordinate system</a>.
</li>
</ul>
<p>
- <strong>GPS (Section 7.3.3)</strong>
- </p>
- <p>
If Automotive device implementations include a GPS/GNSS receiver and report the capability to applications through the <code>android.hardware.location.gps</code> feature flag:
</p>
<ul>
- <li>[A-1-1] GNSS technology generation MUST be the year "2017" or newer.
+ <li>[<a href="#7_3_sensors">7.3</a>.3/A-1-1] GNSS technology generation MUST be the year "2017" or newer.
</li>
</ul>
<p>
- <strong>Gyroscope (Section 7.3.4)</strong>
- </p>
- <p>
If Automotive device implementations include a gyroscope, they:
</p>
<ul>
- <li>[A-1-1] MUST be able to report events up to a frequency of at least 100 Hz.
+ <li>[<a href="#7_3_sensors">7.3</a>.4/A-1-1] MUST be able to report events up to a frequency of at least 100 Hz.
</li>
</ul>
<p>
- <strong>Android Automotive-only sensors (Section 7.3.11)</strong> <strong>Current Gear (Section 7.3.11.1)</strong>
- </p>
- <p>
Automotive device implementations:
</p>
<ul>
- <li>SHOULD provide current gear as <code>SENSOR_TYPE_GEAR</code>.
+ <li>[<a href="#7_3_sensors">7.3</a>.11/A] SHOULD provide current gear as <code>SENSOR_TYPE_GEAR</code>.
</li>
</ul>
<p>
- <strong>Day Night Mode (Section 7.3.11.2)</strong>
- </p>
- <p>
Automotive device implementations:
</p>
<ul>
- <li>[A-0-1] MUST support day/night mode defined as <code>SENSOR_TYPE_NIGHT</code>.
+ <li>[<a href="#7_3_sensors">7.3</a>.11.2/A-0-1] MUST support day/night mode defined as <code>SENSOR_TYPE_NIGHT</code>.
</li>
- <li>[A-0-2] The value of the <code>SENSOR_TYPE_NIGHT</code> flag MUST be consistent with dashboard day/night mode and SHOULD be based on ambient light sensor input.
+ <li>[<a href="#7_3_sensors">7.3</a>.11.2/A-0-2] The value of the <code>SENSOR_TYPE_NIGHT</code> flag MUST be consistent with dashboard day/night mode and SHOULD be based on ambient light sensor input.
</li>
- <li>The underlying ambient light sensor MAY be the same as <a href="#7_3_7_photometer">Photometer</a>.
- </li>
- </ul>
- <p>
- <strong>Driving Status (Section 7.3.11.3)</strong>
- </p>
- <p>
- Automotive device implementations:
- </p>
- <ul>
- <li>[A-0-1] MUST support driving status defined as <code>SENSOR_TYPE_DRIVING_STATUS</code>, with a default value of <code>DRIVE_STATUS_UNRESTRICTED</code> when the vehicle is fully stopped and parked. It is the responsibility of device manufacturers to configure <code>SENSOR_TYPE_DRIVING_STATUS</code> in compliance with all laws and regulations that apply to markets where the product is shipping.
+ <li>
+ <p>
+ The underlying ambient light sensor MAY be the same as <a href="#7_3_7_photometer">Photometer</a>.
+ </p>
</li>
- </ul>
- <p>
- <strong>Wheel Speed (Section 7.3.11.4)</strong>
- </p>
- <p>
- Automotive device implementations:
- </p>
- <ul>
- <li>[A-0-1] MUST provide vehicle speed defined as <code>SENSOR_TYPE_CAR_SPEED</code>.
+ <li>
+ <p>
+ [<a href="#7_3_sensors">7.3</a>.11.3/A-0-1] MUST support driving status defined as <code>SENSOR_TYPE_DRIVING_STATUS</code>, with a default value of <code>DRIVE_STATUS_UNRESTRICTED</code> when the vehicle is fully stopped and parked. It is the responsibility of device manufacturers to configure <code>SENSOR_TYPE_DRIVING_STATUS</code> in compliance with all laws and regulations that apply to markets where the product is shipping.
+ </p>
</li>
- </ul>
- <p>
- <strong>Bluetooth (Section 7.4.3)</strong>
- </p>
- <p>
- Automotive device implementations:
- </p>
- <ul>
<li>
<p>
- [A-0-1] MUST support Bluetooth and SHOULD support Bluetooth LE.
+ [<a href="#7_3_sensors">7.3</a>.11.4/A-0-1] MUST provide vehicle speed defined as <code>SENSOR_TYPE_CAR_SPEED</code>.
</p>
</li>
<li>
<p>
- [A-0-2] Android Automotive implementations MUST support the following Bluetooth profiles:
+ [<a href="#7_4_data_connectivity">7.4</a>.3/A-0-1] MUST support Bluetooth and SHOULD support Bluetooth LE.
</p>
+ </li>
+ <li>[<a href="#7_4_data_connectivity">7.4</a>.3/A-0-2] Android Automotive implementations MUST support the following Bluetooth profiles:
<ul>
<li>Phone calling over Hands-Free Profile (HFP).
</li>
@@ -1534,109 +1123,201 @@
</li>
</ul>
</li>
- <li>SHOULD support Message Access Profile (MAP).
+ <li>
+ <p>
+ [<a href="#7_4_data_connectivity">7.4</a>.3/A] SHOULD support Message Access Profile (MAP).
+ </p>
+ </li>
+ <li>
+ <p>
+ [<a href="#7_4_data_connectivity">7.4</a>.5/A] SHOULD include support for cellular network based data connectivity.
+ </p>
+ </li>
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/A-0-1] MUST have at least 4GB of non-volatile storage available for application private data (a.k.a. "/data" partition).
+ </p>
</li>
</ul>
<p>
- <strong>Minimum Network Capability (Section 7.4.5)</strong>
- </p>
- <p>
- Automotive device implementations:
+ If Automotive device implementations are 32-bit:
</p>
<ul>
- <li>SHOULD include support for cellular network based data connectivity.
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/A-1-1] The memory available to the kernel and userspace MUST be at least 512MB if any of the following densities are used:
+ </p>
+ <ul>
+ <li>280dpi or lower on small/normal screens
+ </li>
+ <li>ldpi or lower on extra large screens
+ </li>
+ <li>mdpi or lower on large screens
+ </li>
+ </ul>
+ </li>
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/A-1-2] The memory available to the kernel and userspace MUST be at least 608MB if any of the following densities are used:
+ </p>
+ <ul>
+ <li>xhdpi or higher on small/normal screens
+ </li>
+ <li>hdpi or higher on large screens
+ </li>
+ <li>mdpi or higher on extra large screens
+ </li>
+ </ul>
+ </li>
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/A-1-3] The memory available to the kernel and userspace MUST be at least 896MB if any of the following densities are used:
+ </p>
+ <ul>
+ <li>400dpi or higher on small/normal screens
+ </li>
+ <li>xhdpi or higher on large screens
+ </li>
+ <li>tvdpi or higher on extra large screens
+ </li>
+ </ul>
+ </li>
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/A-1-4] The memory available to the kernel and userspace MUST be at least 1344MB if any of the following densities are used:
+ </p>
+ <ul>
+ <li>560dpi or higher on small/normal screens
+ </li>
+ <li>400dpi or higher on large screens
+ </li>
+ <li>xhdpi or higher on extra large screens
+ </li>
+ </ul>
</li>
</ul>
<p>
- <strong>Minimum Memory and Storage (Section 7.6.1)</strong>
- </p>
- <p>
- Automotive device implementations:
+ If Automotive device implementations are 64-bit:
</p>
<ul>
- <li>[A-0-1] MUST have at least 4GB of non-volatile storage available for application private data (a.k.a. "/data" partition)
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/A-2-1] The memory available to the kernel and userspace MUST be at least 816MB if any of the following densities are used:
+ </p>
+ <ul>
+ <li>280dpi or lower on small/normal screens
+ </li>
+ <li>ldpi or lower on extra large screens
+ </li>
+ <li>mdpi or lower on large screens
+ </li>
+ </ul>
+ </li>
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/A-2-2] The memory available to the kernel and userspace MUST be at least 944MB if any of the following densities are used:
+ </p>
+ <ul>
+ <li>xhdpi or higher on small/normal screens
+ </li>
+ <li>hdpi or higher on large screens
+ </li>
+ <li>mdpi or higher on extra large screens
+ </li>
+ </ul>
+ </li>
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/A-2-3] The memory available to the kernel and userspace MUST be at least 1280MB if any of the following densities are used:
+ </p>
+ <ul>
+ <li>400dpi or higher on small/normal screens
+ </li>
+ <li>xhdpi or higher on large screens
+ </li>
+ <li>tvdpi or higher on extra large screens
+ </li>
+ </ul>
+ </li>
+ <li>
+ <p>
+ [<a href="#7_6_memory_and_storage">7.6</a>.1/A-2-4] The memory available to the kernel and userspace MUST be at least 1824MB if any of the following densities are used:
+ </p>
+ <ul>
+ <li>560dpi or higher on small/normal screens
+ </li>
+ <li>400dpi or higher on large screens
+ </li>
+ <li>xhdpi or higher on extra large screens
+ </li>
+ </ul>
</li>
</ul>
<p>
- <strong>USB peripheral mode (Section 7.7.1)</strong>
+ Note that the "memory available to the kernel and userspace" above refers to the memory space provided in addition to any memory already dedicated to hardware components such as radio, video, and so on that are not under the kernel’s control on device implementations.
</p>
<p>
Automotive device implementations:
</p>
<ul>
- <li>SHOULD include a USB port supporting peripheral mode.
+ <li>[<a href="#7_7_usb">7.7</a>.1/A] SHOULD include a USB port supporting peripheral mode.
</li>
</ul>
<p>
- <strong>Microphone (Section 7.8.1)</strong>
- </p>
- <p>
Automotive device implementations:
</p>
<ul>
- <li>[A-0-1] MUST include a microphone.
+ <li>[<a href="#7_8_audio">7.8</a>.1/A-0-1] MUST include a microphone.
</li>
</ul>
<p>
- <strong>Audio Output (Section 7.8.2)</strong>
- </p>
- <p>
Automotive device implementations:
</p>
<ul>
- <li>[A-0-1] MUST have an audio output and declare <code>android.hardware.audio.output</code>.
+ <li>[<a href="#7_8_audio">7.8</a>.2/A-0-1] MUST have an audio output and declare <code>android.hardware.audio.output</code>.
</li>
</ul>
<h4 id="2_5_2_multimedia">
2.5.2. Multimedia
</h4>
<p>
- <strong>Audio Encoding (Section 5.1)</strong>
- </p>
- <p>
Automotive device implementations MUST support the following audio encoding:
</p>
<ul>
- <li>[A-1-1] MPEG-4 AAC Profile (AAC LC)
+ <li>[<a href="#5_1_media_codecs">5.1</a>/A-0-1] MPEG-4 AAC Profile (AAC LC)
</li>
- <li>[A-1-2] MPEG-4 HE AAC Profile (AAC+)
+ <li>[<a href="#5_1_media_codecs">5.1</a>/A-0-2] MPEG-4 HE AAC Profile (AAC+)
</li>
- <li>[A-1-3] AAC ELD (enhanced low delay AAC)
+ <li>[<a href="#5_1_media_codecs">5.1</a>/A-0-3] AAC ELD (enhanced low delay AAC)
</li>
</ul>
<p>
- <strong>Video Encoding (Section 5.2)</strong>
- </p>
- <p>
Automotive device implementations MUST support the following video encoding:
</p>
<ul>
- <li>[A-0-1] H.264 AVC
+ <li>[<a href="#5_2_video-encoding">5.2</a>/A-0-1] H.264 AVC
</li>
- <li>[A-0-2] VP8
+ <li>[<a href="#5_2_video-encoding">5.2</a>/A-0-2] VP8
</li>
</ul>
<p>
- <strong>Video Decoding (Section 5.3)</strong>
- </p>
- <p>
Automotive device implementations MUST support the following video decoding:
</p>
<ul>
- <li>[A-0-1] H.264 AVC
+ <li>[<a href="#5_3_video_decoding">5.3</a>/A-0-1] H.264 AVC
</li>
- <li>[A-0-2] MPEG-4 SP
+ <li>[<a href="#5_3_video_decoding">5.3</a>/A-0-2] MPEG-4 SP
</li>
- <li>[A-0-3] VP8
+ <li>[<a href="#5_3_video_decoding">5.3</a>/A-0-3] VP8
</li>
- <li>[A-0-4] VP9
+ <li>[<a href="#5_3_video_decoding">5.3</a>/A-0-4] VP9
</li>
</ul>
<p>
Automotive device implementations are STRONGLY RECOMMENDED to support the following video decoding:
</p>
<ul>
- <li>[A-SR] H.265 HEVC
+ <li>[<a href="#5_3_video_decoding">5.3</a>/A-SR] H.265 HEVC
</li>
</ul>
<h4 id="2_5_3_software">
@@ -1646,109 +1327,81 @@
Automotive device implementations:
</p>
<ul>
- <li>[A-0-1] MUST declare the feature android.hardware.type.automotive.
+ <li>[<a href="#3_0_intro">3</a>/A-0-1] MUST declare the feature <code>android.hardware.type.automotive</code>.
</li>
- <li>[A-0-2] MUST support uiMode = <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_CAR">UI_MODE_TYPE_CAR</a>.
+ <li>[<a href="#3_0_intro">3</a>/A-0-2] MUST support uiMode = <a href="http://developer.android.com/reference/android/content/res/Configuration.html#UI_MODE_TYPE_CAR">UI_MODE_TYPE_CAR</a>.
</li>
- <li>[A-0-3] Android Automotive implementations MUST support all public APIs in the <code>android.car.*</code> namespace.
+ <li>
+ <p>
+ [<a href="#3_0_intro">3</a>/A-0-3] Android Automotive implementations MUST support all public APIs in the <code>android.car.*</code> namespace.
+ </p>
</li>
- </ul>
- <p>
- <strong>WebView Compatibility (Section 3.4.1)</strong>
- </p>
- <p>
- Automotive device implementations:
- </p>
- <ul>
- <li>[A-0-1] MUST provide a complete implementation of the <code>android.webkit.Webview API</code>.
+ <li>
+ <p>
+ [<a href="#3_4_web-compatibility">3.4</a>.1/A-0-1] MUST provide a complete implementation of the <code>android.webkit.Webview</code> API.
+ </p>
</li>
- </ul>
- <p>
- <strong>Notifications (Section 3.8.3)</strong>
- </p>
- <p>
- Android Automotive device implementations:
- </p>
- <ul>
- <li>[A-0-1] MUST display notifications that use the <a href="https://developer.android.com/reference/android/app/Notification.CarExtender.html"><code>Notification.CarExtender</code></a> API when requested by third-party applications.
+ <li>
+ <p>
+ [<a href="#3_8_user-interface-compatibility">3.8</a>.3/A-0-1] MUST display notifications that use the <a href="https://developer.android.com/reference/android/app/Notification.CarExtender.html"><code>Notification.CarExtender</code></a> API when requested by third-party applications.
+ </p>
</li>
- </ul>
- <p>
- <strong>Search (Section 3.8.4)</strong>
- </p>
- <p>
- Automotive device implementations:
- </p>
- <ul>
- <li>[A-0-1] MUST implement an assistant on the device to handle the <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Assist action</a>.
+ <li>
+ <p>
+ [<a href="#3_8_user-interface-compatibility">3.8</a>.4/A-0-1] MUST implement an assistant on the device to handle the <a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_ASSIST">Assist action</a>.
+ </p>
</li>
- </ul>
- <p>
- <strong>Media UI (Section 3.14)</strong>
- </p>
- <p>
- Automotive device implementations:
- </p>
- <ul>
- <li>[A-0-1] MUST include a UI framework to support third-party apps using the media APIs as described in section 3.14.
+ <li>
+ <p>
+ [<a href="#3_14_media_ui">3.14</a>/A-0-1] MUST include a UI framework to support third-party apps using the media APIs as described in section 3.14.
+ </p>
</li>
</ul>
- <h4 id="2_5_4_performance_and_power">
- 2.5.4. Performance and Power
+ <h4 id="2_2_4_performance_and_power">
+ 2.2.4. Performance and Power
</h4>
<p>
- <strong>Power-Saving Modes (Section 8.3)</strong>
- </p>
- <p>
- For Automotive device implementations:
+ Automotive device implementations:
</p>
<ul>
- <li>[A-0-1] All Apps exempted from App Standby and Doze power-saving modes MUST be made visible to the end user.
+ <li>[<a href="#8_3_power_saving_modes">8.3</a>/A-0-1] All Apps exempted from App Standby and Doze power-saving modes MUST be made visible to the end user.
</li>
- <li>[A-0-2] The triggering, maintenance, wakeup algorithms and the use of global system settings of App Standby and Doze power-saving modes MUST not deviate from the Android Open Source Project.
+ <li>
+ <p>
+ [<a href="#8_3_power_saving_modes">8.3</a>/A-0-2] The triggering, maintenance, wakeup algorithms and the use of global system settings of App Standby and Doze power-saving modes MUST not deviate from the Android Open Source Project.
+ </p>
</li>
- </ul>
- <p>
- <strong>Power Consumption Accounting (Sections 8.4)</strong>
- </p>
- <p>
- Automotive device implementations:
- </p>
- <ul>
- <li>[A-0-1] MUST provide a per-component power profile that defines the <a href="http://source.android.com/devices/tech/power/values.html">current consumption value</a> for each hardware component and the approximate battery drain caused by the components over time as documented in the Android Open Source Project site.
+ <li>
+ <p>
+ [<a href="#8_4_power_consumption_accounting">8.4</a>/A-0-1] MUST provide a per-component power profile that defines the <a href="http://source.android.com/devices/tech/power/values.html">current consumption value</a> for each hardware component and the approximate battery drain caused by the components over time as documented in the Android Open Source Project site.
+ </p>
</li>
- <li>[A-0-2] MUST report all power consumption values in milliampere hours (mAh).
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/A-0-2] MUST report all power consumption values in milliampere hours (mAh).
</li>
- <li>[A-0-3] MUST report CPU power consumption per each process's UID. The Android Open Source Project meets the requirement through the <code>uid_cputime</code> kernel module implementation.
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/A-0-3] MUST report CPU power consumption per each process's UID. The Android Open Source Project meets the requirement through the <code>uid_cputime</code> kernel module implementation.
</li>
- <li>SHOULD be attributed to the hardware component itself if unable to attribute hardware component power usage to an application.
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/A] SHOULD be attributed to the hardware component itself if unable to attribute hardware component power usage to an application.
</li>
- <li>[A-0-4] MUST make this power usage available via the <a href="http://source.android.com/devices/tech/power/batterystats.html"><code>adb shell dumpsys batterystats</code></a> shell command to the app developer.
+ <li>[<a href="#8_4_power_consumption_accounting">8.4</a>/A-0-4] MUST make this power usage available via the <a href="http://source.android.com/devices/tech/power/batterystats.html"><code>adb shell dumpsys batterystats</code></a> shell command to the app developer.
</li>
</ul>
- <h4 id="2_5_5_security_model">
- 2.5.5. Security Model
+ <h4 id="2_2_5_security_model">
+ 2.2.5. Security Model
</h4>
<p>
- <strong>Multi-User Support (Section 9.5)</strong>
- </p>
- <p>
If Automotive device implementations include multiple users, they:
</p>
<ul>
- <li>[A-1-1] MUST include a guest account that allows all functions provided by the vehicle system without requiring a user to log in.
+ <li>[<a href="#9_5_multi_user_support">9.5</a>/A-1-1] MUST include a guest account that allows all functions provided by the vehicle system without requiring a user to log in.
</li>
</ul>
<p>
- <strong>Automotive Vehicle System Isolation (Section 9.14)</strong>
- </p>
- <p>
Automotive device implementations:
</p>
<ul>
- <li>[A-0-1] MUST gatekeep messages from Android framework vehicle subsystems, e.g., whitelisting permitted message types and message sources.
+ <li>[<a href="#9_14_automotive_system_isolation">9.14</a>/A-0-1] MUST gatekeep messages from Android framework vehicle subsystems, e.g., whitelisting permitted message types and message sources.
</li>
- <li>[A-0-2] MUST watchdog against denial of service attacks from the Android framework or third-party apps. This guards against malicious software flooding the vehicle network with traffic, which may lead to malfunctioning vehicle subsystems.
+ <li>[<a href="#9_14_automotive_system_isolation">9.14</a>/A-0-2] MUST watchdog against denial of service attacks from the Android framework or third-party apps. This guards against malicious software flooding the vehicle network with traffic, which may lead to malfunctioning vehicle subsystems.
</li>
</ul>
<h3 id="2_6_tablet_requirements">
@@ -1769,17 +1422,14 @@
<p>
Tablet device implementations have similar requirements to handheld device implementations. The exceptions are in indicated by and * in that section and noted for reference in this section.
</p>
- <h4 id="2_6_1_hardware">
- 2.6.1. Hardware
+ <h4 id="2_4_1_hardware">
+ 2.4.1. Hardware
</h4>
<p>
- <strong>Screen Size (Section 7.1.1.1)</strong>
- </p>
- <p>
- Tablet device implementations:
+ <strong>Screen Size</strong>
</p>
<ul>
- <li>[Ta-0-1] MUST have a screen in the range of 7 to 18 inches.
+ <li>[<a href="#7_1_display-and-graphics">7.1</a>.1.1/Tab-0-1] MUST have a screen in the range of 7 to 18 inches.
</li>
</ul>
<p>
@@ -1792,10 +1442,10 @@
<strong>USB peripheral mode (Section 7.7.1)</strong>
</p>
<p>
- If handheld device implementations include a USB port supporting peripheral mode, they:
+ If tablet device implementations include a USB port supporting peripheral mode, they:
</p>
<ul>
- <li>MAY implement the Android Open Accessory (AOA) API.
+ <li>[<a href="#7_7_usb">7.7.1</a>/Tab]MAY implement the Android Open Accessory (AOA) API.
</li>
</ul>
<p>
@@ -1983,14 +1633,14 @@
<td>
A string that uniquely identifies this build. It SHOULD be reasonably human-readable. It MUST follow this template:
<p class="small">
- $(BRAND)/$(PRODUCT)/<br />
+ $(BRAND)/$(PRODUCT)/<br>
&nbsp;&nbsp;&nbsp;&nbsp;$(DEVICE):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/$(TAGS)
</p>
<p>
For example:
</p>
<p class="small">
- acme/myproduct/<br />
+ acme/myproduct/<br>
&nbsp;&nbsp;&nbsp;&nbsp;mydevice:8.0/LMYXX/3359:userdebug/test-keys
</p>
<p>
@@ -2183,7 +1833,7 @@
<ul>
<li>[C-0-4] MUST attempt to validate any intent filters by performing the validation steps defined in the <a href="https://developers.google.com/digital-asset-links">Digital Asset Links specification</a> as implemented by the Package Manager in the upstream Android Open Source Project.
</li>
- <li>[C-0-5] MUST attempt validation of the intent filters during the installation of the application and set all successfully validated UIR intent filters as default app handlers for their UIRs.
+ <li>[C-0-5] MUST attempt validation of the intent filters during the installation of the application and set all successfully validated URI intent filters as default app handlers for their URIs.
</li>
<li>MAY set specific URI intent filters as default app handlers for their URIs, if they are successfully verified but other candidate URI filters fail verification. If a device implementation does this, it MUST provide the user appropriate per-URI pattern overrides in the settings menu.
</li>
@@ -2312,9 +1962,6 @@
3.3. Native API Compatibility
</h3>
<p>
- Device implementers are:
- </p>
- <p>
Native code compatibility is challenging. For this reason, device implementers are:
</p>
<ul>
@@ -3047,12 +2694,12 @@
</li>
</ul>
<p>
- If device implementations include a default launcher that supports in-app pinning of shortcuts and widgets, they:
+ If device implementations include a default launcher that supports in-app pinning of shortcuts, they:
</p>
<ul>
- <li>[C-2-1] MUST report <code>true</code> for <a href="https://developer.android.com/reference/android/content/pm/ShortcutManager.html#isRequestPinShortcutSupported%28%29"><code>ShortcutManager.isRequestPinShortcutSupported()</code></a> and <a href="https://developer.android.com/reference/android/appwidget/AppWidgetManager.html#isRequestPinAppWidgetSupported%28%29"><code>AppWidgetManager.html.isRequestPinAppWidgetSupported()</code></a>.
+ <li>[C-2-1] MUST report <code>true</code> for <a href="https://developer.android.com/reference/android/content/pm/ShortcutManager.html#isRequestPinShortcutSupported%28%29"><code>ShortcutManager.isRequestPinShortcutSupported()</code></a>.
</li>
- <li>[C-2-2] MUST have user affordance asking the user before adding a shortcut requested by apps via the <a href="https://developer.android.com/reference/android/content/pm/ShortcutManager.html#requestPinShortcut%28android.content.pm.ShortcutInfo,%20android.content.IntentSender%29"><code>ShortcutManager.requestPinShortcut()</code></a> and the <a href="https://developer.android.com/reference/android/appwidget/AppWidgetManager.html#requestPinAppWidget%28android.content.ComponentName,android.os.Bundle,%20android.app.PendingIntent%29"><code>AppWidgetManager.requestPinAddWidget()</code></a> API method.
+ <li>[C-2-2] MUST have user affordance asking the user before adding a shortcut requested by apps via the <a href="https://developer.android.com/reference/android/content/pm/ShortcutManager.html#requestPinShortcut%28android.content.pm.ShortcutInfo,%20android.content.IntentSender%29"><code>ShortcutManager.requestPinShortcut()</code></a> API method.
</li>
</ul>
<p>
@@ -3097,6 +2744,15 @@
<li>MAY support application widgets on the lock screen.
</li>
</ul>
+ <p>
+ If device implementations support third-party app widgets and in-app pinning of shortcuts, they:
+ </p>
+ <ul>
+ <li>[C-2-1] MUST report <code>true</code> for <a href="https://developer.android.com/reference/android/appwidget/AppWidgetManager.html#isRequestPinAppWidgetSupported%28%29"><code>AppWidgetManager.html.isRequestPinAppWidgetSupported()</code></a>.
+ </li>
+ <li>[C-2-2] MUST have user affordance asking the user before adding a shortcut requested by apps via the <a href="https://developer.android.com/reference/android/appwidget/AppWidgetManager.html#requestPinAppWidget%28android.content.ComponentName,android.os.Bundle,%20android.app.PendingIntent%29"><code>AppWidgetManager.requestPinAppWidget()</code></a> API method.
+ </li>
+ </ul>
<h4 id="3_8_3_notifications">
3.8.3. Notifications
</h4>
@@ -3226,7 +2882,7 @@
</li>
<li>[C-2-2] The designated interaction to launch the assist app as described in <a href="#7_2_3_navigation_keys">section 7.2.3</a> MUST launch the user-selected assist app, in other words the app that implements <code>VoiceInteractionService</code>, or an activity handling the <code>ACTION_ASSIST</code> intent.
</li>
- <li>[SR] STRONGLY RECOMMENDED to use long press on <code>HOME</code> key as this designated interaction.
+ <li>[C-SR] STRONGLY RECOMMENDED to use long press on <code>HOME</code> key as this designated interaction.
</li>
</ul>
<h4 id="3_8_5_alerts_and_toasts">
@@ -3343,7 +2999,7 @@
</li>
<li>
<p>
- [SR] Device implementations are STRONGLY RECOMMENDED to use the upstream Android user interface (or a similar thumbnail-based interface) for the overview screen.
+ [C-SR] Device implementations are STRONGLY RECOMMENDED to use the upstream Android user interface (or a similar thumbnail-based interface) for the overview screen.
</p>
</li>
</ul>
@@ -3404,10 +3060,12 @@
<li>[C-1-1] MUST be capable of rendering these emoji characters in color glyph.
</li>
<li>[C-1-2] MUST include support for:
- </li>
- <li>Roboto 2 font with different weights—sans-serif-thin, sans-serif-light, sans-serif-medium, sans-serif-black, sans-serif-condensed, sans-serif-condensed-light for the languages available on the device.
- </li>
- <li>Full Unicode 7.0 coverage of Latin, Greek, and Cyrillic, including the Latin Extended A, B, C, and D ranges, and all glyphs in the currency symbols block of Unicode 7.0.
+ <ul>
+ <li>Roboto 2 font with different weights—sans-serif-thin, sans-serif-light, sans-serif-medium, sans-serif-black, sans-serif-condensed, sans-serif-condensed-light for the languages available on the device.
+ </li>
+ <li>Full Unicode 7.0 coverage of Latin, Greek, and Cyrillic, including the Latin Extended A, B, C, and D ranges, and all glyphs in the currency symbols block of Unicode 7.0.
+ </li>
+ </ul>
</li>
<li>SHOULD support the skin tone and diverse family emojis as specified in the <a href="http://unicode.org/reports/tr51">Unicode Technical Report #51</a>.
</li>
@@ -3490,9 +3148,9 @@
If device implementations declare <code>android.software.device_admin</code>, they:
</p>
<ul>
- <li>[C-1-1] MUST support enrolling a Device Policy Client (DPC) as a <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp%28java.lang.String%29">Device Owner app</a> as described below:.
+ <li>[C-1-1] MUST support enrolling a Device Policy Client (DPC) as a <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isDeviceOwnerApp%28java.lang.String%29">Device Owner app</a> as described below:
<ul>
- <li>when the device implementation has no user data is configured yet, it:
+ <li>When the device implementation has no user data is configured yet, it:
<ul>
<li>[C-1-3] MUST report <code>true</code> for <a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#isProvisioningAllowed(java.lang.String)"><code>DevicePolicyManager.isProvisioningAllowed(ACTION_PROVISION_MANAGED_DEVICE)</code></a>.
</li>
@@ -3568,7 +3226,7 @@
</li>
<li>[C-1-2] MUST allow one and only <a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#ACTION_PROVISION_MANAGED_PROFILE">one managed profile to be created</a>.
</li>
- <li>[C-1-3] MUST use an icon badge (similar to the AOSP upstream work badge) to represent the managed applications and widgets and other badged UI elements like Recents &amp; Notifications.
+ <li>[C-1-3] MUST use an icon badge (similar to the AOSP upstream work badge) to represent the managed applications and widgets and other badged UI elements like Recents & Notifications.
</li>
<li>[C-1-4] MUST display a notification icon (similar to the AOSP upstream work badge) to indicate when user is within a managed profile application.
</li>
@@ -3628,7 +3286,7 @@
If device implementations include preloaded accessibility services, they:
</p>
<ul>
- <li>[C-2-1] MUST implement these preloaded accessibility services as [Direct Boot aware] (https://developer.android.com/reference/android/content/pm/ComponentInfo.html#directBootAware) apps when the data storage is encrypted with File Based Encryption (FBE).
+ <li>[C-2-1] MUST implement these preloaded accessibility services as <a href="https://developer.android.com/reference/android/content/pm/ComponentInfo.html#directBootAware">Direct Boot Aware</a> apps when the data storage is encrypted with File Based Encryption (FBE).
</li>
<li>SHOULD provide a mechanism in the out-of-box setup flow for users to enable relevant accessibility services, as well as options to adjust the font size, display size and magnification gestures.
</li>
@@ -3675,7 +3333,7 @@
If device implementations support TIF:
</p>
<ul>
- <li>[C-1-1] The TV App MUST provide facilities to install and use <a href="http://developer.android.com/reference/android/media/tv/TvContract.Channels.html">TV Channels</a> and meet the following requirements:
+ <li>[C-1-1] The TV App MUST provide facilities to install and use <a href="http://developer.android.com/reference/android/media/tv/TvContract.Channels.html">TV Channels</a> and meet the following requirements.
</li>
</ul>
<p>
@@ -3742,7 +3400,7 @@
3.12.1.3. TV input app linking
</h5>
<p>
- If device implementations support TIF, they:
+ If device implementations support TIF:
</p>
<ul>
<li>[C-1-1] Android Television device implementations MUST support <a href="http://developer.android.com/reference/android/media/tv/TvContract.Channels.html#COLUMN_APP_LINK_INTENT_URI">TV input app linking</a>, which allows all inputs to provide activity links from the current activity to another activity (i.e. a link from live programming to related content).
@@ -3771,15 +3429,9 @@
<ul>
<li>[SR] STRONGLY RECOMMENDED to support TV recording.
</li>
- <li>
- <p>
- If the TV input supports recording and the recording of a program is not <a href="https://developer.android.com/reference/android/media/tv/TvContract.Programs.html#COLUMN_RECORDING_PROHIBITED">prohibited</a>, the EPG MAY provide a way to <a href="https://developer.android.com/reference/android/media/tv/TvInputInfo.html#canRecord%28%29">record a program</a>.
- </p>
+ <li>SHOULD provide a user interface to play recorded programs.
</li>
- <li>
- <p>
- SHOULD provide a user interface to play recorded programs.
- </p>
+ <li>If the TV input supports recording and the recording of a program is not <a href="https://developer.android.com/reference/android/media/tv/TvContract.Programs.html#COLUMN_RECORDING_PROHIBITED">prohibited</a>, the EPG MAY provide a way to <a href="https://developer.android.com/reference/android/media/tv/TvInputInfo.html#canRecord%28%29">record a program</a>.
</li>
</ul>
<h3 id="3_13_quick_settings">
@@ -3871,21 +3523,33 @@
</li>
<li>[C-0-3] MUST NOT extend either the <a href="http://developer.android.com/guide/components/fundamentals.html">.apk</a>, <a href="http://developer.android.com/guide/topics/manifest/manifest-intro.html">Android Manifest</a>, <a href="https://android.googlesource.com/platform/dalvik/">Dalvik bytecode</a>, or RenderScript bytecode formats in such a way that would prevent those files from installing and running correctly on other compatible devices.
</li>
- <li>[C-0-4] MUST NOT allow apps other than the current "installer of record" for the package to silently uninstall the app without any prompt, as documented in the SDK for the <a href="https://developer.android.com/reference/android/Manifest.permission.html#DELETE_PACKAGES"><code>DELETE_PACKAGE</code></a> permission. The only exceptions are the system package verifier app handling <a href="https://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_NEEDS_VERIFICATION">PACKAGE_NEEDS_VERIFICATION</a> intent and the storage manager app handling <a href="https://developer.android.com/reference/android/os/storage/StorageManager.html#ACTION_MANAGE_STORAGE">ACTION_MANAGE_STORAGE</a> intent.
+ <li>
+ <p>
+ [C-0-4] MUST NOT allow apps other than the current "installer of record" for the package to silently uninstall the app without any prompt, as documented in the SDK for the <a href="https://developer.android.com/reference/android/Manifest.permission.html#DELETE_PACKAGES"><code>DELETE_PACKAGE</code></a> permission. The only exceptions are the system package verifier app handling <a href="https://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_NEEDS_VERIFICATION">PACKAGE_NEEDS_VERIFICATION</a> intent and the storage manager app handling <a href="https://developer.android.com/reference/android/os/storage/StorageManager.html#ACTION_MANAGE_STORAGE">ACTION_MANAGE_STORAGE</a> intent.
+ </p>
</li>
- </ul>
- <p>
- Device implementations MUST NOT install application packages from unknown sources, unless the app that <a href="https://developer.android.com/reference/android/content/Intent.html#ACTION_INSTALL_PACKAGE">requests the installation</a> meets all the following requirements:
- </p>
- <ul>
- <li>It MUST declare the <a href="http://developer.android.com/reference/android/Manifest.permission.html#REQUEST_INSTALL_PACKAGES"><code>REQUEST_INSTALL_PACKAGES</code></a> permission or have the <code>android:targetSdkVersion</code> set at 24 or lower.
+ <li>
+ <p>
+ [C-0-5] MUST have an activity that handles the <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_MANAGE_UNKNOWN_APP_SOURCES"><code>android.settings.MANAGE_UNKNOWN_APP_SOURCES</code></a> intent.
+ </p>
+ </li>
+ <li>
+ <p>
+ [C-0-6] MUST NOT install application packages from unknown sources, unless the app that <a href="https://developer.android.com/reference/android/content/Intent.html#ACTION_INSTALL_PACKAGE">requests the installation</a> meets all the following requirements:
+ </p>
+ <ul>
+ <li>It MUST declare the <a href="http://developer.android.com/reference/android/Manifest.permission.html#REQUEST_INSTALL_PACKAGES"><code>REQUEST_INSTALL_PACKAGES</code></a> permission or have the <code>android:targetSdkVersion</code> set at 24 or lower.
+ </li>
+ <li>It MUST have been granted permission by the user to install apps from unknown sources.
+ </li>
+ </ul>
</li>
- <li>It MUST have been granted permission by the user to install apps from unknown sources.
+ <li>
+ <p>
+ SHOULD provide a user affordance to grant/revoke the permission to install apps from unknown sources per application, but MAY choose to implement this as a no-op and return <code>RESULT_CANCELED</code> for <a href="http://developer.android.com/reference/android/app/Activity.html#startActivityForResult%28android.content.Intent,int%29"><code>startActivityForResult()</code></a>, if the device implementation does not want to allow users to have this choice. However, even in such cases, they SHOULD indicate to the user why there is no such choice presented.
+ </p>
</li>
</ul>
- <p>
- Device implementations MUST have an activity that handles the <a href="http://developer.android.com/reference/android/provider/Settings.html#ACTION_MANAGE_UNKNOWN_APP_SOURCES"><code>android.settings.MANAGE_UNKNOWN_APP_SOURCES</code></a> intent. They SHOULD provide a user affordance to grant/revoke the permission to install apps from unknown sources per application, but MAY choose to implement this as a no-op and return <code>RESULT_CANCELED</code> for <a href="http://developer.android.com/reference/android/app/Activity.html#startActivityForResult%28android.content.Intent,%20int%29"><code>startActivityForResult()</code></a>, if the device implementation does not want to allow users to have this choice. However even in such cases, they SHOULD indicate to the user why there is no such choice presented.
- </p>
<h2 id="5_multimedia_compatibility">
5. Multimedia Compatibility
</h2>
@@ -3893,7 +3557,7 @@
Device implementations:
</p>
<ul>
- <li>[C-0-1] MUST support the media formats, encoders, decoders, file types, and container formats defined in <a href="#5_1_media-codecs.md">section 5.1</a> for each and every codec declared by <code>MediaCodecList</code>.
+ <li>[C-0-1] MUST support the media formats, encoders, decoders, file types, and container formats defined in <a href="#5_1_media_codecs.md">section 5.1</a> for each and every codec declared by <code>MediaCodecList</code>.
</li>
<li>[C-0-2] MUST declare and report support of the encoders, decoders available to third-party applications via <a href="http://developer.android.com/reference/android/media/MediaCodecList.html"><code>MediaCodecList</code></a>.
</li>
@@ -3944,7 +3608,7 @@
See more details in <a href="#5_1_3_audio_codecs_details">5.1.3. Audio Codecs Details</a>.
</p>
<p>
- If device implementations declare support for the <code>android.hardware.audio.output</code> feature, they:
+ If device implementations declare support for the <code>android.hardware.audio.output</code> feature, they must support the following audio decoders:
</p>
<ul>
<li>[C-1-1] MPEG-4 AAC Profile (AAC LC)
@@ -3994,7 +3658,7 @@
</tr>
<tr>
<td>
- MPEG-4 AAC Profile<br />
+ MPEG-4 AAC Profile<br>
(AAC LC)
</td>
<td>
@@ -4024,7 +3688,7 @@
</tr>
<tr>
<td>
- MPEG-4 HE AACv2<br />
+ MPEG-4 HE AACv2<br>
Profile (enhanced AAC+)
</td>
<td>
@@ -4298,7 +3962,7 @@
Details
</th>
<th>
- Supported File Types/<br />
+ Supported File Types/<br>
Container Formats
</th>
</tr>
@@ -4710,9 +4374,9 @@
If the height that is reported by the <code>Display.getSupportedModes()</code> method is equal or greater than the video resolution, device implementations:
</p>
<ul>
- <li>[C-2-1] MUST support the HD 720p video encoding profiles in the following table.
+ <li>[C-2-1] MUST support the HD 720p video decoding profiles in the following table.
</li>
- <li>[C-2-2] MUST support the HD 1080p video encoding profiles in the following table.
+ <li>[C-2-2] MUST support the HD 1080p video decoding profiles in the following table.
</li>
</ul>
<table>
@@ -4991,7 +4655,7 @@
If device implementations support VP9 codec and a hardware decoder:
</p>
<ul>
- <li>[C-2-2] MUST support the HD decoding profiles as indicated in the following table.
+ <li>[C-2-1] MUST support the HD decoding profiles as indicated in the following table.
</li>
</ul>
<p>
@@ -5098,19 +4762,17 @@
<p>
[C-1-1] MUST allow capture of raw audio content with the following characteristics:
</p>
- </li>
- <li>
- <p>
- <strong>Format</strong>: Linear PCM, 16-bit
- </p>
- </li>
- <li>
- <strong>Sampling rates</strong>: 8000, 11025, 16000, 44100 Hz
- </li>
- <li>
- <p>
- <strong>Channels</strong>: Mono
- </p>
+ <ul>
+ <li>
+ <strong>Format</strong>: Linear PCM, 16-bit
+ </li>
+ <li>
+ <strong>Sampling rates</strong>: 8000, 11025, 16000, 44100 Hz
+ </li>
+ <li>
+ <strong>Channels</strong>: Mono
+ </li>
+ </ul>
</li>
<li>
<p>
@@ -5123,17 +4785,17 @@
<p>
SHOULD allow AM radio and DVD quality capture of raw audio content, which means the following characteristics:
</p>
- </li>
- <li>
- <p>
- <strong>Format</strong>: Linear PCM, 16-bit
- </p>
- </li>
- <li>
- <strong>Sampling rates</strong>: 22050, 48000 Hz
- </li>
- <li>
- <strong>Channels</strong>: Stereo
+ <ul>
+ <li>
+ <strong>Format</strong>: Linear PCM, 16-bit
+ </li>
+ <li>
+ <strong>Sampling rates</strong>: 22050, 48000 Hz
+ </li>
+ <li>
+ <strong>Channels</strong>: Stereo
+ </li>
+ </ul>
</li>
</ul>
<p>
@@ -5384,7 +5046,7 @@
</li>
</ul>
<p>
- Media Segment Formats
+ <strong>Media Segment Formats</strong>
</p>
<table>
<tr>
@@ -5414,7 +5076,7 @@
</li>
<li class="table_list">MPEG-2
</li>
- </ul>See <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H264 AVC, MPEG2-4 SP,<br />
+ </ul>See <a href="#5_1_3_video_codecs">section 5.1.3</a> for details on H264 AVC, MPEG2-4 SP,<br>
and MPEG-2.
<p>
Audio codecs:
@@ -5447,7 +5109,7 @@
</tr>
</table>
<p>
- RTSP (RTP, SDP)
+ <strong>RTSP (RTP, SDP)</strong>
</p>
<table>
<tr>
@@ -5488,8 +5150,8 @@
H263-1998
</td>
<td>
- <a href="https://tools.ietf.org/html/rfc3551">RFC 3551</a><br />
- <a href="https://tools.ietf.org/html/rfc4629">RFC 4629</a><br />
+ <a href="https://tools.ietf.org/html/rfc3551">RFC 3551</a><br>
+ <a href="https://tools.ietf.org/html/rfc4629">RFC 4629</a><br>
<a href="https://tools.ietf.org/html/rfc2190">RFC 2190</a>
</td>
<td>
@@ -5963,7 +5625,7 @@
</li>
<li>The app declares it is resizeable via the <a href="https://developer.android.com/guide/topics/ui/multi-window.html#configuring">android:resizeableActivity</a> attribute.
</li>
- <li>The app is targeting API level 26 or higher and does not declare a <a href="https://developer.android.com/reference/android/R.attr.html#maxAspectRatio"><code>android:MaxAspectRatio</code></a> that would restrict the allowed aspect ratio.
+ <li>The app is targeting API level 24 or higher and does not declare a <a href="https://developer.android.com/reference/android/R.attr.html#maxAspectRatio"><code>android:MaxAspectRatio</code></a> that would restrict the allowed aspect ratio.
</li>
</ul>
</li>
@@ -6222,6 +5884,9 @@
<p>
Android includes a TextureView object that lets developers directly integrate hardware-accelerated OpenGL ES textures as rendering targets in a UI hierarchy.
</p>
+ <p>
+ Device implementations:
+ </p>
<ul>
<li>[C-0-3] MUST support the TextureView API, and MUST exhibit consistent behavior with the upstream Android implementation.
</li>
@@ -6230,7 +5895,7 @@
7.1.4.5 Wide-gamut Displays
</h5>
<p>
- If device implementations claim support for wide-gamut displays through <a href="https://developer.android.com/reference/android/view/Display.html#isWideColorGamut%28%29"><code>Display.isWideColorGamut()</code></a> , they:
+ If device implementations claim support for wide-gamut displays through <a href="https://developer.android.com/reference/android/content/res/Configuration.html#isScreenWideColorGamut%28%29"><code>Configuration.isScreenWideColorGamut()</code></a> , they:
</p>
<ul>
<li>[C-1-1] MUST have a color-calibrated display.
@@ -6376,21 +6041,11 @@
</li>
</ul>
<p>
- If device implementations do not provide the Menu function, for backwards compatibility, they:
+ If device implementations do not provide the Menu function, for backwards compatibility, they: * [C-3-1] MUST make the Menu function available to applications when <code>targetSdkVersion</code> is less than 10, either by a physical button, a software key, or gestures. This Menu function should be accessible unless hidden together with other navigation functions.
</p>
- <ul>
- <li>[C-3-1] MUST make the Menu function available to applications when <code>targetSdkVersion</code> is less than 10, either by a physical button, a software key, or gestures. This Menu function should be accessible unless hidden together with other navigation functions.
- </li>
- </ul>
<p>
- If device implementations provide the <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_ASSIST">Assist function</a>, they:
+ If device implementations provide the [Assist function]((http://developer.android.com/reference/android/view/KeyEvent.html#<code>KEYCODE_ASSIST</code>), they: <em>[C-4-1] MUST make the Assist function accessible with a single action (e.g. tap, double-click or gesture) when other navigation keys are accessible.</em> [SR] STRONGLY RECOMMENDED to use long press on HOME function as this designated interaction.
</p>
- <ul>
- <li>[C-4-1] MUST make the Assist function accessible with a single action (e.g. tap, double-click or gesture) when other navigation keys are accessible.
- </li>
- <li>[SR] STRONGLY RECOMMENDED to use long press on HOME function as this designated interaction.
- </li>
- </ul>
<p>
If device implementations use a distinct portion of the screen to display the navigation keys, they:
</p>
@@ -6497,14 +6152,8 @@
7.2.6.1. Button Mappings
</h5>
<p>
- If device implementations declare the <code>android.hardware.gamepad</code> feature flag, they:
+ If device implementations declare the <code>android.hardware.gamepad</code> feature flag, they: <em>[C-1-1] MUST have embed a controller or ship with a separate controller in the box, that would provide means to input all the events listed in the below tables.</em> [C-1-2] MUST be capable to map HID events to it's associated Android <code>view.InputEvent</code> constants as listed in the below tables. The upstream Android implementation includes implementation for game controllers that satisfies this requirement.
</p>
- <ul>
- <li>[C-1-1] MUST have embed a controller or ship with a separate controller in the box, that would provide means to input all the events listed in the below tables.
- </li>
- <li>[C-1-2] MUST be capable to map HID events to it's associated Android <code>view.InputEvent</code> constants as listed in the below tables. The upstream Android implementation includes implementation for game controllers that satisfies this requirement.
- </li>
- </ul>
<table>
<tr>
<th>
@@ -6563,7 +6212,7 @@
</tr>
<tr>
<td>
- <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_UP">D-pad up</a><sup>1</sup><br />
+ <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_UP">D-pad up</a><sup>1</sup><br>
<a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_DOWN">D-pad down</a><sup>1</sup>
</td>
<td>
@@ -6575,7 +6224,7 @@
</tr>
<tr>
<td>
- <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_LEFT">D-pad left</a>1<br />
+ <a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_LEFT">D-pad left</a>1<br>
<a href="http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_DPAD_RIGHT">D-pad right</a><sup>1</sup>
</td>
<td>
@@ -6703,11 +6352,11 @@
<a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Y">Left Joystick</a>
</td>
<td>
- 0x01 0x0030<br />
+ 0x01 0x0030<br>
0x01 0x0031
</td>
<td>
- AXIS_X<br />
+ AXIS_X<br>
AXIS_Y
</td>
</tr>
@@ -6716,11 +6365,11 @@
<a href="http://developer.android.com/reference/android/view/MotionEvent.html#AXIS_Z">Right Joystick</a>
</td>
<td>
- 0x01 0x0032<br />
+ 0x01 0x0032<br>
0x01 0x0035
</td>
<td>
- AXIS_Z<br />
+ AXIS_Z<br>
AXIS_RZ
</td>
</tr>
@@ -6770,12 +6419,12 @@
</li>
<li>
<p>
- [C-1-7] For any API indicated by the Android SDK documentation to be a <a href="https://source.android.com/devices/sensors/report-modes.html#continuous">continuous sensor</a>, device implementations MUST continuously provide periodic data samples that SHOULD have a jitter below 3%, where jitter is defined as the standard deviation of the difference of the reported timestamp values between consecutive events.
+ [C-1-4] For any API indicated by the Android SDK documentation to be a <a href="https://source.android.com/devices/sensors/report-modes.html#continuous">continuous sensor</a>, device implementations MUST continuously provide periodic data samples that SHOULD have a jitter below 3%, where jitter is defined as the standard deviation of the difference of the reported timestamp values between consecutive events.
</p>
</li>
<li>
<p>
- [C-1-8] MUST ensure that the sensor event stream MUST NOT prevent the device CPU from entering a suspend state or waking up from a suspend state.
+ [C-1-5] MUST ensure that the sensor event stream MUST NOT prevent the device CPU from entering a suspend state or waking up from a suspend state.
</p>
</li>
<li>When several sensors are activated, the power consumption SHOULD NOT exceed the sum of the individual sensor’s reported power consumption.
@@ -7313,37 +6962,33 @@
<ul>
<li>[C-3-1] MUST correctly declare support of direct channel types and direct report rates level through the <a href="https://developer.android.com/reference/android/hardware/Sensor.html#isDirectChannelTypeSupported%28int%29"><code>isDirectChannelTypeSupported</code></a> and <a href="https://developer.android.com/reference/android/hardware/Sensor.html#getHighestDirectReportRateLevel%28%29"><code>getHighestDirectReportRateLevel</code></a> API.
</li>
- <li>[C-3-2] MUST support at least one of the two sensor direct channel types for all sensors that declare support for sensor direct channel:
- <ul>
- <li>
- <a href="https://developer.android.com/reference/android/hardware/SensorDirectChannel.html#TYPE_HARDWARE_BUFFER"><code>TYPE_HARDWARE_BUFFER</code></a>
- </li>
- <li>
- <a href="https://developer.android.com/reference/android/hardware/SensorDirectChannel.html#TYPE_MEMORY_FILE"><code>TYPE_MEMORY_FILE</code></a>
- </li>
- </ul>
+ <li>[C-3-2] MUST support at least one of the two sensor direct channel types for all sensors that declare support for sensor direct channel
+ </li>
+ <li>
+ <a href="https://developer.android.com/reference/android/hardware/SensorDirectChannel.html#TYPE_HARDWARE_BUFFER"><code>TYPE_HARDWARE_BUFFER</code></a>
+ </li>
+ <li>
+ <a href="https://developer.android.com/reference/android/hardware/SensorDirectChannel.html#TYPE_MEMORY_FILE"><code>TYPE_MEMORY_FILE</code></a>
</li>
<li>SHOULD support event reporting through sensor direct channel for primary sensor (non-wakeup variant) of the following types:
- <ul>
- <li>
- <code>TYPE_ACCELEROMETER</code>
- </li>
- <li>
- <code>TYPE_ACCELEROMETER_UNCALIBRATED</code>
- </li>
- <li>
- <code>TYPE_GYROSCOPE</code>
- </li>
- <li>
- <code>TYPE_GYROSCOPE_UNCALIBRATED</code>
- </li>
- <li>
- <code>TYPE_MAGNETIC_FIELD</code>
- </li>
- <li>
- <code>TYPE_MAGNETIC_FIELD_UNCALIBRATED</code>
- </li>
- </ul>
+ </li>
+ <li>
+ <code>TYPE_ACCELEROMETER</code>
+ </li>
+ <li>
+ <code>TYPE_ACCELEROMETER_UNCALIBRATED</code>
+ </li>
+ <li>
+ <code>TYPE_GYROSCOPE</code>
+ </li>
+ <li>
+ <code>TYPE_GYROSCOPE_UNCALIBRATED</code>
+ </li>
+ <li>
+ <code>TYPE_MAGNETIC_FIELD</code>
+ </li>
+ <li>
+ <code>TYPE_MAGNETIC_FIELD_UNCALIBRATED</code>
</li>
</ul>
<h4 id="7_3_10_fingerprint_sensor">
@@ -7500,10 +7145,10 @@
</li>
</ul>
<p>
- If device implementations include support for 802.11 and expose the functionality to a third-party application, they
+ If device implementations include support for 802.11 and expose the functionality to a third-party application, they:
</p>
<ul>
- <li>[C-1-1] MUST implement the corresponding Android API.
+ <li>[C-1-1] MUST implement the corresponding Andr:oid API.
</li>
<li>[C-1-2] MUST report the hardware feature flag <code>android.hardware.wifi</code>.
</li>
@@ -7706,16 +7351,18 @@
<li>MUST be capable of reading and writing NDEF messages via the following NFC standards as below:
</li>
<li>[C-1-2] MUST be capable of acting as an NFC Forum reader/writer (as defined by the NFC Forum technical specification NFCForum-TS-DigitalProtocol-1.0) via the following NFC standards:
- </li>
- <li>NfcA (ISO14443-3A)
- </li>
- <li>NfcB (ISO14443-3B)
- </li>
- <li>NfcF (JIS X 6319-4)
- </li>
- <li>IsoDep (ISO 14443-4)
- </li>
- <li>NFC Forum Tag Types 1, 2, 3, 4, 5 (defined by the NFC Forum)
+ <ul>
+ <li>NfcA (ISO14443-3A)
+ </li>
+ <li>NfcB (ISO14443-3B)
+ </li>
+ <li>NfcF (JIS X 6319-4)
+ </li>
+ <li>IsoDep (ISO 14443-4)
+ </li>
+ <li>NFC Forum Tag Types 1, 2, 3, 4, 5 (defined by the NFC Forum)
+ </li>
+ </ul>
</li>
<li>
<p>
@@ -7726,17 +7373,19 @@
<p>
[C-1-3] MUST be capable of transmitting and receiving data via the following peer-to-peer standards and protocols:
</p>
- </li>
- <li>ISO 18092
- </li>
- <li>LLCP 1.2 (defined by the NFC Forum)
- </li>
- <li>SDP 1.0 (defined by the NFC Forum)
- </li>
- <li>
- <a href="http://static.googleusercontent.com/media/source.android.com/en/us/compatibility/ndef-push-protocol.pdf">NDEF Push Protocol</a>
- </li>
- <li>SNEP 1.0 (defined by the NFC Forum)
+ <ul>
+ <li>ISO 18092
+ </li>
+ <li>LLCP 1.2 (defined by the NFC Forum)
+ </li>
+ <li>SDP 1.0 (defined by the NFC Forum)
+ </li>
+ <li>
+ <a href="http://static.googleusercontent.com/media/source.android.com/en/us/compatibility/ndef-push-protocol.pdf">NDEF Push Protocol</a>
+ </li>
+ <li>SNEP 1.0 (defined by the NFC Forum)
+ </li>
+ </ul>
</li>
<li>[C-1-4] MUST include support for <a href="http://developer.android.com/guide/topics/connectivity/nfc/nfc.html">Android Beam</a> and SHOULD enable Android Beam by default.
</li>
@@ -7786,7 +7435,7 @@
<ul>
<li>[C-3-1] MUST report the <code>android.hardware.nfc.hcef</code> feature constant.
</li>
- <li>[C-3-2] MUST implement the [NfcF Card Emulation APIs] (https://developer.android.com/reference/android/nfc/cardemulation/NfcFCardEmulation.html) as defined in the Android SDK.
+ <li>[C-3-2] MUST implement the <a href="https://developer.android.com/reference/android/nfc/cardemulation/NfcFCardEmulation.html">NfcF Card Emulation APIs</a> as defined in the Android SDK.
</li>
</ul>
<p>
@@ -7929,7 +7578,7 @@
</li>
</ul>
<p>
- If the Camera includes a flash:
+ If the camera includes a flash:
</p>
<ul>
<li>[C-2-1] the flash lamp MUST NOT be lit while an <code>android.hardware.Camera.PreviewCallback</code> instance has been registered on a Camera preview surface, unless the application has explicitly enabled the flash by enabling the <code>FLASH_MODE_AUTO</code> or <code>FLASH_MODE_ON</code> attributes of a <code>Camera.Parameters</code> object. Note that this constraint does not apply to the device’s built-in system camera application, but only to third-party applications using <code>Camera.PreviewCallback</code>.
@@ -7945,7 +7594,7 @@
Device implementations:
</p>
<ul>
- <li>MAY include a front-facing camera
+ <li>MAY include a front-facing camera.
</li>
</ul>
<p>
@@ -7958,11 +7607,11 @@
</li>
<li>[C-1-3] MUST NOT use a front-facing camera as the default for the Camera API and MUST NOT configure the API to treat a front-facing camera as the default rear-facing camera, even if it is the only camera on the device.
</li>
- <li>[C-1-5] The camera preview MUST be mirrored horizontally relative to the orientation specified by the application when the current application has explicitly requested that the Camera display be rotated via a call to the <a href="http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)"><code>android.hardware.Camera.setDisplayOrientation()</code></a> method. Conversely, the preview MUST be mirrored along the device’s default horizontal axis when the current application does not explicitly request that the Camera display be rotated via a call to the <a href="http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)"><code>android.hardware.Camera.setDisplayOrientation()</code></a> method.
+ <li>[C-1-4] The camera preview MUST be mirrored horizontally relative to the orientation specified by the application when the current application has explicitly requested that the Camera display be rotated via a call to the <a href="http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)"><code>android.hardware.Camera.setDisplayOrientation()</code></a> method. Conversely, the preview MUST be mirrored along the device’s default horizontal axis when the current application does not explicitly request that the Camera display be rotated via a call to the <a href="http://developer.android.com/reference/android/hardware/Camera.html#setDisplayOrientation(int)"><code>android.hardware.Camera.setDisplayOrientation()</code></a> method.
</li>
- <li>[C-1-6] MUST NOT mirror the final captured still image or video streams returned to application callbacks or committed to media storage.
+ <li>[C-1-5] MUST NOT mirror the final captured still image or video streams returned to application callbacks or committed to media storage.
</li>
- <li>[C-1-7] MUST mirror the image displayed by the postview in the same manner as the camera preview image stream.
+ <li>[C-1-6] MUST mirror the image displayed by the postview in the same manner as the camera preview image stream.
</li>
<li>MAY include features (such as auto-focus, flash, etc.) available to rear-facing cameras as described in <a href="#7_5_1_rear-facing_camera">section 7.5.1</a>.
</li>
@@ -7996,7 +7645,14 @@
</li>
<li>MAY support multiple cameras.
</li>
- <li>MAY support camera-based video encoding. If supported, a simultaneous unencoded / MJPEG stream (QVGA or greater resolution) MUST be accessible to the device implementation.
+ <li>MAY support camera-based video encoding.
+ </li>
+ </ul>
+ <p>
+ If camera-based video encoding is supported:
+ </p>
+ <ul>
+ <li>[C-2-1] A simultaneous unencoded / MJPEG stream (QVGA or greater resolution) MUST be accessible to the device implementation.
</li>
</ul>
<h4 id="7_5_4_camera_api_behavior">
@@ -8073,12 +7729,12 @@
</li>
</ul>
<p>
- Device implementations MAY meet the above requirements using either:
+ Device implementations MAY meet the above requirements using either of the following:
</p>
<ul>
- <li>a user-accessible removable storage, such as a Secure Digital (SD) card slot.
+ <li>User-accessible removable storage, such as a Secure Digital (SD) card slot.
</li>
- <li>a portion of the internal (non-removable) storage as implemented in the Android Open Source Project (AOSP).
+ <li>A portion of the internal (non-removable) storage as implemented in the Android Open Source Project (AOSP).
</li>
</ul>
<p>
@@ -8103,7 +7759,7 @@
If device implementations include multiple shared storage paths (such as both an SD card slot and shared internal storage), they:
</p>
<ul>
- <li>[C-3-1] MUST allow only pre-installed and privileged Android applications with the <code>WRITE_EXTERNAL_STORAGE</code> permission to write to the secondary external storage, except when writing to their package-specific directories or within the <code>URI</code> returned by firing the <code>ACTION_OPEN_DOCUMENT_TREE</code> intent.
+ <li>[C-2-1] MUST allow only pre-installed and privileged Android applications with the <code>WRITE_EXTERNAL_STORAGE</code> permission to write to the secondary external storage, except when writing to their package-specific directories or within the <code>URI</code> returned by firing the <code>ACTION_OPEN_DOCUMENT_TREE</code> intent.
</li>
</ul>
<p>
@@ -8226,7 +7882,7 @@
If device implementations include a USB port supporting host mode and the USB audio class, they:
</p>
<ul>
- <li>[C-2-1] MUST support the <a href="https://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_HID">USB HID class</a>
+ <li>[C-2-1] MUST support the <a href="https://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_HID">USB HID class</a>.
</li>
<li>[C-2-2] MUST support the detection and mapping of the following HID data fields specified in the <a href="http://www.usb.org/developers/hidpage/Hut1_12v2.pdf">USB HID Usage Tables</a> and the <a href="http://www.usb.org/developers/hidpage/Voice_Command_Usage.pdf">Voice Command Usage Request</a> to the <a href="https://developer.android.com/reference/android/view/KeyEvent.html"><code>KeyEvent</code></a> constants as below:
<ul>
@@ -8277,7 +7933,7 @@
</li>
<li>[C-1-3] MUST meet the audio latency requirements in <a href="#5_6_audio_latency">section 5.6</a>.
</li>
- <li>[SR] STRONGLY RECOMMENDED to support near-ultrasound recording as described in <a href="#7_8_3_near_ultrasound">section 7.8.3</a>.
+ <li>[SR] Are STRONGLY RECOMMENDED to support near-ultrasound recording as described in <a href="#7_8_3_near_ultrasound">section 7.8.3</a>.
</li>
</ul>
<p>
@@ -8445,19 +8101,24 @@
</li>
<li>[C-1-14] MUST have an embedded screen, and its resolution MUST be at least be FullHD(1080p) and STRONGLY RECOMMENDED TO BE be QuadHD (1440p) or higher.
</li>
- <li>[C-1-15] The display MUST measure between 4.7" and 6.3" diagonal.
- </li>
- <li>[C-1-16] The display MUST update at least 60 Hz while in VR Mode.
+ <li>[C-1-15] The display MUST update at least 60 Hz while in VR Mode.
</li>
- <li>[C-1-17] The display latency on Gray-to-Gray, White-to-Black, and Black-to-White switching time MUST be ≤ 3 ms.
+ <li>[C-1-16] The display latency on Gray-to-Gray, White-to-Black, and Black-to-White switching time MUST be ≤ 3 ms.
</li>
- <li>[C-1-18] The display MUST support a low-persistence mode with ≤5 ms persistence, persistence being defined as the amount of time for which a pixel is emitting light.
+ <li>[C-1-17] The display MUST support a low-persistence mode with ≤5 ms persistence, persistence being defined as the amount of time for which a pixel is emitting light.
</li>
- <li>[C-1-19] MUST support Bluetooth 4.2 and Bluetooth LE Data Length Extension <a href="#7_4_3_bluetooth">section 7.4.3</a>.
+ <li>[C-1-18] MUST support Bluetooth 4.2 and Bluetooth LE Data Length Extension <a href="#7_4_3_bluetooth">section 7.4.3</a>.
</li>
<li>[SR] STRONGLY RECOMMENDED to support <code>android.hardware.sensor.hifi_sensors</code> feature and MUST meet the gyroscope, accelerometer, and magnetometer related requirements for <code>android.hardware.hifi_sensors</code>.
</li>
- <li>MAY provide an exclusive core to the foreground application and MAY support the <code>Process.getExclusiveCores</code> API to return the numbers of the cpu cores that are exclusive to the top foreground application. If exclusive core is supported then the core MUST not allow any other userspace processes to run on it (except device drivers used by the application), but MAY allow some kernel processes to run as necessary.
+ <li>MAY provide an exclusive core to the foreground application and MAY support the <code>Process.getExclusiveCores</code> API to return the numbers of the cpu cores that are exclusive to the top foreground application.
+ </li>
+ </ul>
+ <p>
+ If exclusive core is supported, then the core:
+ </p>
+ <ul>
+ <li>[C-2-1] MUST not allow any other userspace processes to run on it (except device drivers used by the application), but MAY allow some kernel processes to run as necessary.
</li>
</ul>
<h2 id="8_performance_and_power">
@@ -8645,14 +8306,14 @@
If device implementations include a pre-installed app or wish to allow third-party apps to access the usage statistics, they:
</p>
<ul>
- <li>[C-1-1] are STRONGLY RECOMMENDED provide user-accessible mechanism to grant or revoke access to the usage stats in response to the <a href="https://developer.android.com/reference/android/provider/Settings.html#ACTION&amp;lowbar;USAGE&amp;lowbar;ACCESS&amp;lowbar;SETTINGS"><code>android.settings.ACTION_USAGE_ACCESS_SETTINGS</code></a> intent for apps that declare the <code>android.permission.PACKAGE_USAGE_STATS</code> permission.
+ <li>[SR] are STRONGLY RECOMMENDED provide user-accessible mechanism to grant or revoke access to the usage stats in response to the <a href="https://developer.android.com/reference/android/provider/Settings.html#ACTION&amp;lowbar;USAGE&amp;lowbar;ACCESS&amp;lowbar;SETTINGS"><code>android.settings.ACTION_USAGE_ACCESS_SETTINGS</code></a> intent for apps that declare the <code>android.permission.PACKAGE_USAGE_STATS</code> permission.
</li>
</ul>
<p>
If device implementations intend to disallow any apps, including pre-installed apps, from accessing the usage statistics, they:
</p>
<ul>
- <li>[C-2-1] MUST still have an activity that handles the <a href="https://developer.android.com/reference/android/provider/Settings.html#ACTION&amp;lowbar;USAGE&amp;lowbar;ACCESS&amp;lowbar;SETTINGS"><code>android.settings.ACTION_USAGE_ACCESS_SETTINGS</code></a> intent pattern but MUST implement it as a no-op, that is to have an equivalent behavior as when the user is declined for access.
+ <li>[C-1-1] MUST still have an activity that handles the <a href="https://developer.android.com/reference/android/provider/Settings.html#ACTION&amp;lowbar;USAGE&amp;lowbar;ACCESS&amp;lowbar;SETTINGS"><code>android.settings.ACTION_USAGE_ACCESS_SETTINGS</code></a> intent pattern but MUST implement it as a no-op, that is to have an equivalent behavior as when the user is declined for access.
</li>
</ul>
<h3 id="9_2_uid_and_process_isolation">
@@ -8821,7 +8482,7 @@
Kernel integrity and self-protection features are integral to Android security. Device implementations:
</p>
<ul>
- <li>[C-0-7] MUST implement kernel stack buffer overflow protections (e.g. <code>CONFIG_CC_STACKPROTECTOR_STRONG</code>).
+ <li>[C-0-7] MUST implement kernel stack buffer overflow protection mechanisms. Examples of such mechanisms are <code>CC_STACKPROTECTOR_REGULAR</code> and <code>CONFIG_CC_STACKPROTECTOR_STRONG</code>.
</li>
<li>[C-0-8] MUST implement strict kernel memory protections where executable code is read-only, read-only data is non-executable and non-writable, and writable data is non-executable (e.g. <code>CONFIG_DEBUG_RODATA</code> or <code>CONFIG_STRICT_KERNEL_RWX</code>).
</li>
@@ -8871,7 +8532,7 @@
Device implementations:
</p>
<ul>
- <li>[C-1-1] MUST keep a reasonable retention period of such user history.
+ <li>[C-0-1] MUST keep a reasonable retention period of such user history.
</li>
<li>[SR] Are STRONGLY RECOMMENDED to keep the 14 days retention period as configured by default in the AOSP implementation.
</li>
@@ -9023,10 +8684,15 @@
</li>
<li>
<p>
+ [C-1-11] MUST use the mandatorily supported ciphers, key lengths and modes by default.
+ </p>
+ </li>
+ <li>
+ <p>
SHOULD make preloaded essential apps (e.g. Alarm, Phone, Messenger) Direct Boot aware.
</p>
</li>
- <li>MAY support alternative ciphers, key lengths and modes for file content and file name encryption, but MUST use the mandatorily supported ciphers, key lengths and modes by default.
+ <li>MAY support alternative ciphers, key lengths and modes for file content and file name encryption.
</li>
</ul>
<p>
@@ -9069,17 +8735,17 @@
<ul>
<li>[C-1-1] MUST declare the platform feature flag <code>android.software.verified_boot</code>.
</li>
- <li>[C-2-1] MUST perform verification on every boot sequence.
+ <li>[C-1-2] MUST perform verification on every boot sequence.
</li>
- <li>[C-3-1] MUST start verification from an immutable hardware key that is the root of trust and go all the way up to the system partition.
+ <li>[C-1-3] MUST start verification from an immutable hardware key that is the root of trust and go all the way up to the system partition.
</li>
- <li>[C-4-1] MUST implement each stage of verification to check the integrity and authenticity of all the bytes in the next stage before executing the code in the next stage.
+ <li>[C-1-4] MUST implement each stage of verification to check the integrity and authenticity of all the bytes in the next stage before executing the code in the next stage.
</li>
- <li>[C-5-1] MUST use verification algorithms as strong as current recommendations from NIST for hashing algorithms (SHA-256) and public key sizes (RSA-2048).
+ <li>[C-1-5] MUST use verification algorithms as strong as current recommendations from NIST for hashing algorithms (SHA-256) and public key sizes (RSA-2048).
</li>
- <li>[C-6-1] MUST NOT allow boot to complete when system verification fails, unless the user consents to attempt booting anyway, in which case the data from any non-verified storage blocks MUST not be used.
+ <li>[C-1-6] MUST NOT allow boot to complete when system verification fails, unless the user consents to attempt booting anyway, in which case the data from any non-verified storage blocks MUST not be used.
</li>
- <li>[C-7-1] MUST NOT allow verified partitions on the device to be modified unless the user has explicitly unlocked the boot loader.
+ <li>[C-1-7] MUST NOT allow verified partitions on the device to be modified unless the user has explicitly unlocked the boot loader.
</li>
<li>[SR] If there are multiple discrete chips in the device (e.g. radio, specialized image processor), the boot process of each of those chips is STRONGLY RECOMMENDED to verify every stage upon booting.
</li>
@@ -9099,7 +8765,7 @@
Device implementations with Advanced Encryption Standard (AES) crypto performance above 50 MiB/seconds:
</p>
<ul>
- <li>[C-8-1] MUST support verified boot for device integrity.
+ <li>[C-2-1] MUST support verified boot for device integrity.
</li>
</ul>
<p>
@@ -9133,7 +8799,7 @@
</li>
</ul>
<p>
- Note that if a device implementation is already launched on an earlier Android version, such a device is exempted from the requirement to have a hardware-backed keystore, unless it declares the <code>android.hardware.fingerprint</code> feature which requires a hardware-backed keystore.
+ Note that if a device implementation is already launched on an earlier Android version, such a device is exempted from the requirement to have a hardware-backed keystore and support the key attestation, unless it declares the <code>android.hardware.fingerprint</code> feature which requires a hardware-backed keystore.
</p>
<h4 id="9_11_1_secure_lock_screen">
9.11.1. Secure Lock Screen
@@ -9284,38 +8950,81 @@
10. Software Compatibility Testing
</h2>
<p>
- Device implementations MUST pass all tests described in this section.
- </p>
- <p>
- However, note that no software test package is fully comprehensive. For this reason, device implementers are <strong>STRONGLY RECOMMENDED</strong> to make the minimum number of changes as possible to the reference and preferred implementation of Android available from the Android Open Source Project. This will minimize the risk of introducing bugs that create incompatibilities requiring rework and potential device updates.
+ Device implementations MUST pass all tests described in this section. However, note that no software test package is fully comprehensive. For this reason, device implementers are <strong>STRONGLY RECOMMENDED</strong> to make the minimum number of changes as possible to the reference and preferred implementation of Android available from the Android Open Source Project. This will minimize the risk of introducing bugs that create incompatibilities requiring rework and potential device updates.
</p>
<h3 id="10_1_compatibility_test_suite">
10.1. Compatibility Test Suite
</h3>
<p>
- Device implementations MUST pass the <a href="http://source.android.com/compatibility/index.html">Android Compatibility Test Suite (CTS)</a> available from the Android Open Source Project, using the final shipping software on the device. Additionally, device implementers SHOULD use the reference implementation in the Android Open Source tree as much as possible, and MUST ensure compatibility in cases of ambiguity in CTS and for any reimplementations of parts of the reference source code.
+ Device implementations:
+ </p>
+ <ul>
+ <li>
+ <p>
+ [C-0-1] MUST pass the <a href="http://source.android.com/compatibility/index.html">Android Compatibility Test Suite (CTS)</a> available from the Android Open Source Project, using the final shipping software on the device.
+ </p>
+ </li>
+ <li>
+ <p>
+ [C-0-2] MUST ensure compatibility in cases of ambiguity in CTS and for any reimplementations of parts of the reference source code.
+ </p>
+ </li>
+ </ul>
+ <p>
+ The CTS is designed to be run on an actual device. Like any software, the CTS may itself contain bugs. The CTS will be versioned independently of this Compatibility Definition, and multiple revisions of the CTS may be released for Android 8.0.
</p>
<p>
- The CTS is designed to be run on an actual device. Like any software, the CTS may itself contain bugs. The CTS will be versioned independently of this Compatibility Definition, and multiple revisions of the CTS may be released for Android 8.0. Device implementations MUST pass the latest CTS version available at the time the device software is completed.
+ Device implementations:
</p>
+ <ul>
+ <li>
+ <p>
+ [C-0-3] MUST pass the latest CTS version available at the time the device software is completed.
+ </p>
+ </li>
+ <li>
+ <p>
+ SHOULD use the reference implementation in the Android Open Source tree as much as possible.
+ </p>
+ </li>
+ </ul>
<h3 id="10_2_cts_verifier">
10.2. CTS Verifier
</h3>
<p>
- Device implementations MUST correctly execute all applicable cases in the CTS Verifier. The CTS Verifier is included with the Compatibility Test Suite, and is intended to be run by a human operator to test functionality that cannot be tested by an automated system, such as correct functioning of a camera and sensors.
+ The CTS Verifier is included with the Compatibility Test Suite, and is intended to be run by a human operator to test functionality that cannot be tested by an automated system, such as correct functioning of a camera and sensors.
+ </p>
+ <p>
+ Device implementations:
</p>
+ <ul>
+ <li>[C-0-1] MUST correctly execute all applicable cases in the CTS verifier.
+ </li>
+ </ul>
<p>
- The CTS Verifier has tests for many kinds of hardware, including some hardware that is optional. Device implementations MUST pass all tests for hardware that they possess; for instance, if a device possesses an accelerometer, it MUST correctly execute the Accelerometer test case in the CTS Verifier. Test cases for features noted as optional by this Compatibility Definition Document MAY be skipped or omitted.
+ The CTS Verifier has tests for many kinds of hardware, including some hardware that is optional.
+ </p>
+ <p>
+ Device implementations:
</p>
+ <ul>
+ <li>[C-0-2] MUST pass all tests for hardware that they possess; for instance, if a device possesses an accelerometer, it MUST correctly execute the Accelerometer test case in the CTS Verifier.
+ </li>
+ </ul>
<p>
- Every device and every build MUST correctly run the CTS Verifier, as noted above. However, since many builds are very similar, device implementers are not expected to explicitly run the CTS Verifier on builds that differ only in trivial ways. Specifically, device implementations that differ from an implementation that has passed the CTS Verifier only by the set of included locales, branding, etc. MAY omit the CTS Verifier test.
+ Test cases for features noted as optional by this Compatibility Definition Document MAY be skipped or omitted.
</p>
+ <ul>
+ <li>[C-0-2] Every device and every build MUST correctly run the CTS Verifier, as noted above. However, since many builds are very similar, device implementers are not expected to explicitly run the CTS Verifier on builds that differ only in trivial ways. Specifically, device implementations that differ from an implementation that has passed the CTS Verifier only by the set of included locales, branding, etc. MAY omit the CTS Verifier test.
+ </li>
+ </ul>
<h2 id="11_updatable_software">
11. Updatable Software
</h2>
- <p>
- Device implementations MUST include a mechanism to replace the entirety of the system software. The mechanism need not perform “live” upgrades—that is, a device restart MAY be required.
- </p>
+ <ul>
+ <li>[C-0-1] Device implementations MUST include a mechanism to replace the entirety of the system software. The mechanism need not perform “live” upgrades—that is, a device restart MAY be required.
+ </li>
+ </ul>
<p>
Any method can be used, provided that it can replace the entirety of the software preinstalled on the device. For instance, any of the following approaches will satisfy this requirement:
</p>
@@ -9324,15 +9033,24 @@
</li>
<li>“Tethered” updates over USB from a host PC.
</li>
- <li>“Offline” updates via a reboot and update from a file on removable storage.
+ <li>
+ <p>
+ “Offline” updates via a reboot and update from a file on removable storage.
+ </p>
+ </li>
+ <li>
+ <p>
+ [C-0-2] The update mechanism used MUST support updates without wiping user data. That is, the update mechanism MUST preserve application private data and application shared data. Note that the upstream Android software includes an update mechanism that satisfies this requirement.
+ </p>
</li>
</ul>
<p>
- However, if the device implementation includes support for an unmetered data connection such as 802.11 or Bluetooth PAN (Personal Area Network) profile, it MUST support OTA downloads with offline update via reboot.
- </p>
- <p>
- The update mechanism used MUST support updates without wiping user data. That is, the update mechanism MUST preserve application private data and application shared data. Note that the upstream Android software includes an update mechanism that satisfies this requirement.
+ If the device implementations includes support for an unmetered data connection such as 802.11 or Bluetooth PAN (Personal Area Network) profile, then, they:
</p>
+ <ul>
+ <li>[C-1-1] MUST support OTA downloads with offline update via reboot.
+ </li>
+ </ul>
<p>
For device implementations that are launching with Android 6.0 and later, the update mechanism SHOULD support verifying that the system image is binary identical to expected result following an OTA. The block-based OTA implementation in the upstream Android Open Source Project, added since Android 5.1, satisfies this requirement.
</p>
@@ -9340,11 +9058,19 @@
Also, device implementations SHOULD support <a href="https://source.android.com/devices/tech/ota/ab_updates.html">A/B system updates</a>. The AOSP implements this feature using the boot control HAL.
</p>
<p>
- If an error is found in a device implementation after it has been released but within its reasonable product lifetime that is determined in consultation with the Android Compatibility Team to affect the compatibility of third-party applications, the device implementer MUST correct the error via a software update available that can be applied per the mechanism just described.
+ If an error is found in a device implementation after it has been released but within its reasonable product lifetime that is determined in consultation with the Android Compatibility Team to affect the compatibility of third-party applications, then:
</p>
+ <ul>
+ <li>[C-2-1] The device implementer MUST correct the error via a software update available that can be applied per the mechanism just described.
+ </li>
+ </ul>
<p>
- Android includes features that allow the Device Owner app (if present) to control the installation of system updates. To facilitate this, the system update subsystem for devices that report android.software.device_admin MUST implement the behavior described in the <a href="http://developer.android.com/reference/android/app/admin/SystemUpdatePolicy.html">SystemUpdatePolicy</a> class.
+ Android includes features that allow the Device Owner app (if present) to control the installation of system updates. If the system update subsystem for devices report android.software.device_admin then, they:
</p>
+ <ul>
+ <li>[C-3-1] MUST implement the behavior described in the <a href="http://developer.android.com/reference/android/app/admin/SystemUpdatePolicy.html">SystemUpdatePolicy</a> class.
+ </li>
+ </ul>
<h2 id="12_document_changelog">
12. Document Changelog
</h2>
@@ -9409,13 +9135,13 @@
<ul>
<li>
<p>
- <strong>CDD</strong><br />
+ <strong>CDD</strong><br>
Substantive changes to the compatibility requirements.
</p>
</li>
<li>
<p>
- <strong>Docs</strong><br />
+ <strong>Docs</strong><br>
Cosmetic or build related changes.
</p>
</li>
diff --git a/en/devices/tech/config/ambient.html b/en/devices/tech/config/ambient.html
index 97f43f58..1330e145 100644
--- a/en/devices/tech/config/ambient.html
+++ b/en/devices/tech/config/ambient.html
@@ -1,6 +1,6 @@
<html devsite>
<head>
- <title>Implementing Ambient Capabilities</title>
+ <title>Ambient Capabilities</title>
<meta name="project_path" value="/_project.yaml" />
<meta name="book_path" value="/_book.yaml" />
</head>
@@ -31,17 +31,60 @@
those capabilities.
</p>
<p>
- Ambient capabilities allows system services to configure capabilities in their
- <code>.rc</code> files, bringing all their configuration into a single file,
- instead of having to split capabilities configuration to the
- <code>fs_config.c</code> file.
+ Ambient capabilities allows system services launched by init to configure
+ capabilities in their <code>.rc</code> files, bringing configuration into
+ a single file instead of splitting configuration in the
+ <code>fs_config.c</code> file. This means that for any service launched by
+ init, you can use the <code>.rc</code> file associated with the service to
+ configure capabilities for that service.
</p>
+ <p>
+ Ambient capabilities are the preferred mechanism for setting capabilities
+ for services launched by init (this method keeps all aspects for the service
+ configuration in a single <code>.rc</code> file). We recommend using ambient
+ capabilities instead of <a href="/devices/tech/config/filesystem#configuring-the-caps-section">
+ configuring file system capabilities using the caps
+ section</a> in <code>config.fs</code> files.
+ </p>
+ <p>
+ When setting capabilities for services <strong>not launched by init</strong>,
+ continue to configure file system capabilities using
+ <code>fs_config.c</code>.
+ </p>
+
+ <h2 id="enabling-ambient-capabilities">Enabling ambient capabilities</h2>
+ <p>
+ To enable ambient capabilities for a given service, use the
+ <code>capabilities</code> keyword in init. For current init language
+ details, refer to the
+ <a href="https://android.googlesource.com/platform/system/core/+/master/init/README.md">
+ init README.md</a>.
+ </p>
+ <p>
+ For example, to enable ambient capabilities for the AOSP service
+ <code>wificond</code>, the
+ <a href="https://android.googlesource.com/platform/system/connectivity/wificond/+/master/wificond.rc">
+ .rc file</a> for the <code>wificond</code> service sets up the appropriate
+ user and groups and gives the service the specified capabilities using the
+ <code>capabilities</code> keyword:
+ </p>
+
+<pre class="prettyprint">
+service wificond /system/bin/wificond
+ class main
+ user wifi
+ group wifi net_raw net_admin
+ capabilities NET_RAW NET_ADMIN
+</pre>
+
<h2 id="reference-implementation">Reference implementation</h2>
<p>
The reference implementation is the Android common kernel <a
href="https://android.googlesource.com/kernel/common/">https://android.googlesource.com/kernel/common/</a>
</p>
<h2 id="required-patches">Required patches</h2>
+ <aside class="note"><strong>Note:</strong> The Android kernels 3.10 (android-3.10) and 3.14 (android-3.14) have been deprecated and removed.</aside>
+
<p>
Required patches have been backported to all the relevant Android common kernel
branches.
@@ -52,17 +95,7 @@
has been backported in:
</p>
<ul>
- <li>android-3.10 branch:
- <ul>
- <li><a
- href="https://android.googlesource.com/kernel/common/+/bdcd4484f1b399dfcb2fd7dd82b6869b2b6b60cd">https://android.googlesource.com/kernel/common/+/bdcd4484f1b399dfcb2fd7dd82b6869b2b6b60cd</a>
- </ul>
- <li>android-3.14 branch:
- <ul>
- <li><a
- href="https://android.googlesource.com/kernel/common/+/5440f16f1296ca05f33dfde51e8bb7ad48699640">https://android.googlesource.com/kernel/common/+/5440f16f1296ca05f33dfde51e8bb7ad48699640</a>
- </ul>
- <li>android-3.18:
+ <li>android-3.18:
<ul>
<li><a
href="https://android.googlesource.com/kernel/common/+/d6a9a74487e86b528c44965f871de75671b6adb0">https://android.googlesource.com/kernel/common/+/d6a9a74487e86b528c44965f871de75671b6adb0</a>
@@ -81,16 +114,6 @@
</p>
<ul>
- <li>android-3.10 branch:
- <ul>
- <li><a
- href="https://android.googlesource.com/kernel/common/+/ef89def080c52eb7ea6a9455eb32b1b05867133b">https://android.googlesource.com/kernel/common/+/ef89def080c52eb7ea6a9455eb32b1b05867133b</a>
- </ul>
- <li>android-3.14 branch:
- <ul>
- <li><a
- href="https://android.googlesource.com/kernel/common/+/f75626b3092fad4e0bd8f2aed06947352781eb77">https://android.googlesource.com/kernel/common/+/f75626b3092fad4e0bd8f2aed06947352781eb77</a>
- </ul>
<li>android-3.18:
<ul>
<li><a
@@ -103,20 +126,6 @@
</ul>
</ul>
- <p>
- A memory leak fix <a
- href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6d6f3328422a3bc56b0d8dd026a5de845d2abfa7">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6d6f3328422a3bc56b0d8dd026a5de845d2abfa7</a>,
- needed for kernels < 3.18, has been backported in:
- </p>
-
- <ul>
- <li>android-3.10 branch:
- <ul>
- <li><a
- href="https://android.googlesource.com/kernel/common/+/900e52782988ee11a1cb7d600e9edea48fc70f0f">https://android.googlesource.com/kernel/common/+/900e52782988ee11a1cb7d600e9edea48fc70f0f</a></li>
- </ul>
- </ul>
-
<h2 id="validation">Validation</h2>
<p>
<a
diff --git a/en/devices/tech/config/filesystem.html b/en/devices/tech/config/filesystem.html
index 73633943..d6569c37 100644
--- a/en/devices/tech/config/filesystem.html
+++ b/en/devices/tech/config/filesystem.html
@@ -104,6 +104,18 @@ system capabilities) and an AIDs section (for configuring OEM-specific AIDs).
</p>
<h3 id="configuring-the-caps-section">Configuring the caps section</h3>
+
+<aside class="note"><strong>Note:</strong>
+<a href="/devices/tech/config/ambient">Ambient capabilities</a> are the preferred
+mechanism for setting capabilities for services launched by init (this method
+keeps all aspects for the service configuration in a single <code>.rc</code>
+file). We recommend using ambient capabilities for these services instead of
+configuring file system capabilities using the caps section in
+<code>config.fs</code> files. When setting capabilities for services
+<strong>not launched by init</strong>, continue to configure file system
+capabilities using <code>fs_config.c</code>.</aside>
+
+
<p>The caps section supports setting
<a href="http://man7.org/linux/man-pages/man7/capabilities.7.html" class="external">file
system capabilities</a> on filesystem objects within the build (the filesystem
diff --git a/en/devices/tech/connect/data-saver.html b/en/devices/tech/connect/data-saver.html
index 32e3d6aa..133d3e55 100644
--- a/en/devices/tech/connect/data-saver.html
+++ b/en/devices/tech/connect/data-saver.html
@@ -31,7 +31,7 @@ this functionality to the user.
</p>
<p>
-The <a href="https://developer.android.com/preview/features/data-saver.html">Data Saver</a>
+The <a href="https://developer.android.com/training/basics/network-ops/data-saver">Data Saver</a>
feature can be turned on or off by the user. App developers
should use a new API to check if Data Saver mode is on. If it is on, the app
developers can handle the situation gracefully by tuning their applications for
@@ -50,7 +50,8 @@ ensures desired background data exchange when Data Saver is on per user control.
Since the Data Saver is a feature in the platform, device manufacturers gain its
functionality by default with the N release. Find the source files in:</br>
<a class="external"
- href="https://android.googlesource.com/platform/packages/apps/Settings/+/master/src/com/android/settings/datausage">packages/apps/Settings/src/com/android/settings/datausage</a>
+ href="https://android.googlesource.com/platform/packages/apps/Settings/+/master/src/com/android/settings/datausage">
+ packages/apps/Settings/src/com/android/settings/datausage</a>
</p>
<h3 id="settings-interface">Settings interface</h3>
@@ -93,10 +94,10 @@ apply Data Saver.</p>
<p>
All app developers must act to implement Data Saver, including OEMs and
carriers with preloaded apps. See
-<a href="https://developer.android.com/preview/features/data-saver.html">Data
+<a href="https://developer.android.com/training/basics/network-ops/data-saver">Data
Saver on developer.android.com</a> for app developer instructions on detecting
and monitoring Data Saver states. See the sections below for additional details
-helpful to partners. </p>
+helpful to partners.</p>
<p>
To optimize for Data Saver mode, apps should:
diff --git a/en/devices/tech/display/adaptive-icons.html b/en/devices/tech/display/adaptive-icons.html
index 815e9b9c..5d74b10c 100644
--- a/en/devices/tech/display/adaptive-icons.html
+++ b/en/devices/tech/display/adaptive-icons.html
@@ -43,11 +43,14 @@
Developer documentation:
</p><ul>
<li><a
- href="https://developer.android.com/preview/features/adaptive-icons.html">https://developer.android.com/preview/features/adaptive-icons.html</a>
+ href="https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive">
+ https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive</a>
<li><a
- href="https://developer.android.com/reference/android/graphics/drawable/AdaptiveIconDrawable.html">https://developer.android.com/reference/android/graphics/drawable/AdaptiveIconDrawable.html</a>
+ href="https://developer.android.com/reference/android/graphics/drawable/AdaptiveIconDrawable.html">
+ https://developer.android.com/reference/android/graphics/drawable/AdaptiveIconDrawable.html</a>
<li><a
- href="https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithAdaptiveBitmap(android.graphics.Bitmap)">https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithAdaptiveBitmap(android.graphics.Bitmap)</a></li></ul>
+ href="https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithAdaptiveBitmap(android.graphics.Bitmap)">
+ https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithAdaptiveBitmap(android.graphics.Bitmap)</a></li></ul>
<p>
Source code:
@@ -61,7 +64,7 @@
<pre
class="prettyprint">&lt;!-- Specifies the path that is used by AdaptiveIconDrawable class to crop launcher icons. -->
- &lt;string name="config_icon_mask" translatable="false">"M50,0L100,0 100,100 0,100 0,0z"&lt;/string></pre>
+ &lt;string name="config_icon_mask" translatable="false">"M50,0L100,0 100,100 0,100 0,0z"&lt;/string></pre>
<p>
The format and syntax of the string follow the <a
href="https://www.w3.org/TR/SVG/paths.html">W3, SVG standard for path
@@ -86,25 +89,25 @@
<pre
class="prettyprint">package android.graphics.drawable;
public class AdaptiveIconDrawable extends Drawable implements Drawable.Callback {
- method public Drawable getBackground();
- method public Drawable getForeground();
- method public Path getIconMask();
- method public Region getSafeZone();
- method public float getExtraInsetFraction();
- method public int getOpacity();
- method public void invalidateDrawable(Drawable);
- method public void scheduleDrawable(Drawable, Runnable, long);
- method public void setAlpha(int);
- method public void setColorFilter(ColorFilter);
- method public void setOpacity(int);
- method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
+ method public Drawable getBackground();
+ method public Drawable getForeground();
+ method public Path getIconMask();
+ method public Region getSafeZone();
+ method public float getExtraInsetFraction();
+ method public int getOpacity();
+ method public void invalidateDrawable(Drawable);
+ method public void scheduleDrawable(Drawable, Runnable, long);
+ method public void setAlpha(int);
+ method public void setColorFilter(ColorFilter);
+ method public void setOpacity(int);
+ method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
}</pre>
<pre
class="prettyprint">public class Icon extends Parceleable {
- method public Bitmap createWithAdaptiveBitmap();
+ method public Bitmap createWithAdaptiveBitmap();
}</pre>
<h2>Reference Implementation</h2>
<p>
diff --git a/en/devices/tech/display/retail-mode.html b/en/devices/tech/display/retail-mode.html
index 5e124735..40ab1710 100644
--- a/en/devices/tech/display/retail-mode.html
+++ b/en/devices/tech/display/retail-mode.html
@@ -121,7 +121,7 @@ Settings.System</a> settings.</li>
Android Developer definitions</a> of users, profiles, and accounts</li>
<li><a href="https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html">
Device Policy Manager API documentation</a></li>
- <li><a href="https://developer.android.com/samples/DeviceOwner/index.html">
+ <li><a href="https://github.com/googlesamples/android-DeviceOwner/#readme">
Sample Device Owner app</a></li>
</ul>
diff --git a/en/devices/tech/power/mgmt.html b/en/devices/tech/power/mgmt.html
index c54821f0..dc441428 100644
--- a/en/devices/tech/power/mgmt.html
+++ b/en/devices/tech/power/mgmt.html
@@ -308,9 +308,9 @@ details, refer to
<a href="https://developer.android.com/training/monitoring-device-state/doze-standby.html#testing_doze_and_app_standby">Testing
Doze and App Standby</a>.</p>
-<p class="note"><strong>Note</strong>: MMS/SMS/Telephony services function independently
-of Doze and will always wake client apps even while the device remains in Doze
-mode.</p>
+<aside class="note"><strong>Note</strong>: MMS/SMS/Telephony services function
+independently of Doze and will always wake client apps even while the device
+remains in Doze mode.</aside>
<h2 id="exempt-apps">Exempting applications</h2>
<p>You can exempt applications from being subject to Doze or App Standby.
@@ -332,15 +332,16 @@ these reasons, we strongly recommend that you do not exempt third-party
applications and instead exempt only cloud messaging services or apps with
similar functions.</p>
-<p>Apps exempted by default are listed in a single view in <em>Settings >
-Battery</em>. This list is used for exempting the app from both Doze and App
-Standby modes. To provide transparency to the user, the Settings menu
-<strong>MUST</strong> show all exempted applications.</p>
+<p>Apps exempted by default are listed in a single view in <em>Settings > App
+&amp; Notifications > Special app access > Battery Optimization</em>. This list
+is used for exempting the app from both Doze and App Standby modes. To provide
+transparency to the user, the Settings menu <strong>MUST</strong> show all
+exempted applications.</p>
-<p>Users can manually exempt apps via <em>Settings > Battery > Battery
-optimization > All apps</em> and then selecting the app to turn off (or back on)
-optimization. However, users cannot unexempt any application or service that is
-exempted by default in the system image.</p>
+<p>Users can manually exempt apps via <em>Settings > App &amp; Notifications >
+<var>APP-NAME</var> > Battery > Battery Optimization</em> and then selecting the
+app to turn off (or back on) optimization. However, users cannot unexempt any
+application or service that is exempted by default in the system image.</p>
</body>
</html>
diff --git a/en/devices/tv/index.html b/en/devices/tv/index.html
index 2d330c20..e02cc8b2 100644
--- a/en/devices/tv/index.html
+++ b/en/devices/tv/index.html
@@ -556,7 +556,7 @@ recording to users when requested.</li>
<p>
For more information about implementing Recording features in your TV Input
service, see this <a
-href="https://developer.android.com/preview/features/tv-recording-api.html">TV
+href="https://developer.android.com/training/tv/tif/content-recording">TV
Recording</a> article.
</p>
diff --git a/en/security/bulletin/2017-08-01.html b/en/security/bulletin/2017-08-01.html
index bf8571bd..a7fa5d6b 100644
--- a/en/security/bulletin/2017-08-01.html
+++ b/en/security/bulletin/2017-08-01.html
@@ -784,7 +784,7 @@ href="https://twitter.com/jiych_guru">@jiych_guru</a>)</td>
(百度安全实验室)</td>
</tr>
<tr>
- <td>CVE-2017-9680</td>
+ <td>CVE-2017-9680, CVE-2017-0740</td>
<td><a href="https://twitter.com/ScottyBauer1">Scott Bauer</a></td>
</tr>
<tr>
diff --git a/en/security/bulletin/2018-05-01.html b/en/security/bulletin/2018-05-01.html
index bc45a35b..e9ad3e52 100644
--- a/en/security/bulletin/2018-05-01.html
+++ b/en/security/bulletin/2018-05-01.html
@@ -21,7 +21,7 @@
limitations under the License.
-->
-<p><em>Published May 7, 2018</em></p>
+<p><em>Published May 7, 2018 | Updated May 9, 2018</em></p>
<p>
The Android Security Bulletin contains details of security vulnerabilities
@@ -31,10 +31,10 @@ all of these issues. To learn how to check a device's security patch level, see
your Android version</a>.
</p>
<p>
-Android partners are notified of all issues at least a month before publication.
-Source code patches for these issues will be released to the Android Open Source
-Project (AOSP) repository in the next 48 hours. We will revise this bulletin with
-the AOSP links when they are available.
+Android partners are notified of all issues at least a month before
+publication. Source code patches for these issues have been released to the
+Android Open Source Project (AOSP) repository and linked from this bulletin.
+This bulletin also includes links to patches outside of AOSP.
</p>
<p>
The most severe of these issues is a critical security vulnerability in Media
@@ -119,7 +119,8 @@ permissions.</p>
</tr>
<tr>
<td>CVE-2017-13309</td>
- <td>A-73251618</td>
+ <td><a href="https://android.googlesource.com/platform/external/conscrypt/+/c26e60713035b52e123bdcc2fe5d69eb94a374f7">
+ A-73251618</a></td>
<td>ID</td>
<td>High</td>
<td>8.1</td>
@@ -147,14 +148,14 @@ additional permissions.</p>
</tr>
<tr>
<td>CVE-2017-13310</td>
- <td>A-71992105</td>
+ <td><a href="https://android.googlesource.com/platform/frameworks/base/+/57bc6ca6dda12ef7925c69a75cbcdf3df05067fc">A-71992105</a></td>
<td>EoP</td>
<td>High</td>
<td>6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13311</td>
- <td>A-73252178</td>
+ <td><a href="https://android.googlesource.com/platform/frameworks/base/+/2950276f61220e00749f8e24e0c773928fefaed8">A-73252178</a></td>
<td>EoP</td>
<td>High</td>
<td>7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
@@ -182,14 +183,14 @@ additional permissions.</p>
</tr>
<tr>
<td>CVE-2017-13312</td>
- <td>A-73085795</td>
+ <td>A-73085795<a href="#asterisk">*</a></td>
<td>EoP</td>
<td>High</td>
<td>8.0</td>
</tr>
<tr>
<td>CVE-2017-13313</td>
- <td>A-74114680</td>
+ <td><a href="https://android.googlesource.com/platform/frameworks/av/+/4b3b618144050d80dbaa0228797b021d5df5e919">A-74114680</a></td>
<td>DoS</td>
<td>High</td>
<td>6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
@@ -217,14 +218,14 @@ additional permissions.</p>
</tr>
<tr>
<td>CVE-2017-13314</td>
- <td>A-63000005</td>
+ <td><a href="https://android.googlesource.com/platform/frameworks/base/+/ef1335ebdf6862c6a30686603c7ee549dbb7b359">A-63000005</a></td>
<td>EoP</td>
<td>High</td>
<td>7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13315</td>
- <td>A-70721937</td>
+ <td><a href="https://android.googlesource.com/platform/frameworks/base/+/35bb911d4493ea94d4896cc42690cab0d4dbb78f">A-70721937</a></td>
<td>EoP</td>
<td>High</td>
<td>6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
@@ -599,6 +600,11 @@ security bulletins.
<td>May 7, 2018</td>
<td>Bulletin published.</td>
</tr>
+ <tr>
+ <td>1.1</td>
+ <td>May 9, 2018</td>
+ <td>Bulletin revised to include AOSP links.</td>
+ </tr>
</table>
</body>
</html>
diff --git a/en/security/bulletin/pixel/2018-05-01.html b/en/security/bulletin/pixel/2018-05-01.html
index 2532c0af..b0ccb63c 100644
--- a/en/security/bulletin/pixel/2018-05-01.html
+++ b/en/security/bulletin/pixel/2018-05-01.html
@@ -21,7 +21,7 @@
limitations under the License.
-->
-<p><em>Published May 7, 2018</em></p>
+<p><em>Published May 7, 2018 | Updated May 9, 2018</em></p>
<p>
The Pixel&hairsp;/&hairsp;Nexus Security Bulletin contains details of security
@@ -78,7 +78,7 @@ additional references are linked to numbers following the bug ID.
</tr>
<tr>
<td>CVE-2017-13316</td>
- <td>A-73311729</td>
+ <td><a href="https://android.googlesource.com/platform/frameworks/base/+/2a0d062ac398565c4ddb3f1df56638773d9cba30">A-73311729</a></td>
<td>ID</td>
<td>Moderate</td>
<td>6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
@@ -102,21 +102,22 @@ additional references are linked to numbers following the bug ID.
</tr>
<tr>
<td>CVE-2017-13317</td>
- <td>A-73172046</td>
+ <td><a href="https://android.googlesource.com/platform/frameworks/av/+/8d009272d0f683f07415da9e1a0e193f6d17c7d1">
+ A-73172046</a></td>
<td>ID</td>
<td>Moderate</td>
<td>8.1</td>
</tr>
<tr>
<td>CVE-2017-13318</td>
- <td>A-73782357</td>
+ <td><a href="https://android.googlesource.com/platform/frameworks/av/+/215e9ffe4ae272ddd83ee712f2efaee89601622b">A-73782357</a></td>
<td>ID</td>
<td>Moderate</td>
<td>8.1</td>
</tr>
<tr>
<td rowspan="2">CVE-2017-13319</td>
- <td rowspan="2">A-71868329</td>
+ <td rowspan="2"><a href="https://android.googlesource.com/platform/frameworks/av/+/1adff0be1c97a53bdb1645d7fe35bb0a82b516c1">A-71868329</a></td>
<td>ID</td>
<td>Moderate</td>
<td>7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
@@ -128,7 +129,7 @@ additional references are linked to numbers following the bug ID.
</tr>
<tr>
<td rowspan="2">CVE-2017-13320</td>
- <td rowspan="2">A-72764648</td>
+ <td rowspan="2"><a href="https://android.googlesource.com/platform/external/libmpeg2/+/8859d87ed278b13cdf170c58912eaf67a2931550">A-72764648</a></td>
<td>ID</td>
<td>Moderate</td>
<td>7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
@@ -157,21 +158,21 @@ additional references are linked to numbers following the bug ID.
</tr>
<tr>
<td>CVE-2017-13323</td>
- <td>A-73826242</td>
+ <td><a href="https://android.googlesource.com/platform/system/core/+/8257766e842074adf0fb39ca0c9db12463fe59a2">A-73826242</a></td>
<td>EoP</td>
<td>Moderate</td>
<td>6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13321</td>
- <td>A-70986337</td>
+ <td><a href="https://android.googlesource.com/platform/frameworks/native/+/ed8755d92b7734c8cc0569e073fc13de377b73f6">A-70986337</a></td>
<td>ID</td>
<td>Moderate</td>
<td>8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13322</td>
- <td>A-67862398</td>
+ <td><a href="https://android.googlesource.com/platform/packages/services/Telephony/+/25b3a8b0af2e479b5eaca40ec5c82a1c7971580a">A-67862398</a></td>
<td>DoS</td>
<td>Moderate</td>
<td>6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
@@ -585,8 +586,9 @@ column mean?</strong>
<p>
Issues that are not publicly available have a * next to the Android bug ID in
the <em>References</em> column. The update for that issue is generally contained
-in the latest binary drivers for Nexus devices available from the
-<a href="https://developers.google.com/android/nexus/drivers">Google Developer site</a>.
+in the latest binary drivers for Pixel&hairsp;/&hairsp;Nexus devices available
+from the <a href="https://developers.google.com/android/nexus/drivers">Google
+Developer site</a>.
</p>
<p>
<strong>5. Why are security vulnerabilities split between this bulletin and the
@@ -613,6 +615,11 @@ bulletin are not required for declaring a security patch level.
<td>May 7, 2018</td>
<td>Bulletin published.</td>
</tr>
+ <tr>
+ <td>1.1</td>
+ <td>May 9, 2018</td>
+ <td>Bulletin revised to include AOSP links.</td>
+ </tr>
</table>
</body>
diff --git a/en/security/encryption/index.html b/en/security/encryption/index.html
index 0d7e1cfc..43aaebfd 100644
--- a/en/security/encryption/index.html
+++ b/en/security/encryption/index.html
@@ -56,7 +56,7 @@ File-based encryption
allows different files to be encrypted with different keys that can be unlocked
independently. Devices that support file-based encryption can also support a new
feature called <a
-href="https://developer.android.com/preview/features/direct-boot.html">Direct
+href="https://developer.android.com/training/articles/direct-boot">Direct
Boot</a> that allows encrypted devices to boot straight to the lock screen, thus
enabling quick access to important device features like accessibility services
and alarms.
diff --git a/en/security/overview/app-security.html b/en/security/overview/app-security.html
index b70b182a..5aa2a1e1 100644
--- a/en/security/overview/app-security.html
+++ b/en/security/overview/app-security.html
@@ -34,7 +34,8 @@
<ul>
<li>
<p><strong>AndroidManifest.xml</strong>: The <a
- href="https://developer.android.com/guide/topics/manifest/manifest-intro.html">AndroidManifest.xml</a>
+ href="https://developer.android.com/guide/topics/manifest/manifest-intro.html">
+ AndroidManifest.xml</a>
file is the control file that tells the system what to do with
all the top-level components (specifically activities, services, broadcast
receivers, and content providers described below) in an application. This also
@@ -60,8 +61,8 @@
</li>
<li>
<p><strong>Broadcast Receiver</strong>: A <a
- href="https://developer.android.com/reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a>
- is an object that is instantiated when an IPC mechanism
+ href="https://developer.android.com/reference/android/content/BroadcastReceiver.html">
+ BroadcastReceiver</a> is an object that is instantiated when an IPC mechanism
known as an <a
href="https://developer.android.com/reference/android/content/Intent.html">Intent</a>
is issued by the operating system or another application. An application
@@ -69,7 +70,8 @@
change its behavior based on that information.</p>
</li>
</ul>
-<h2 id="the-android-permission-model-accessing-protected-apis">The Android Permission Model: Accessing Protected APIs</h2>
+<h2 id="the-android-permission-model-accessing-protected-apis">
+The Android Permission Model: Accessing Protected APIs</h2>
<p>All applications on Android run in an <a
href="/security/overview/kernel-security#the-application-sandbox">Application Sandbox</a>.
By default, an Android application can only access a limited range of system
@@ -117,19 +119,23 @@ href="/security/overview/kernel-security#the-application-sandbox">Application Sa
Protected API permission checks are enforced at the lowest possible level to
prevent circumvention. An example of the user messaging when an application is
installed while requesting access to protected APIs is shown in <em>Figure 2</em>.</p>
-<p>The system default permissions are described at <a href="https://developer.android.com/reference/android/Manifest.permission.html">https://developer.android.com/reference/android/Manifest.permission.html</a>.
+<p>The system default permissions are described at
+<a href="https://developer.android.com/reference/android/Manifest.permission.html">
+https://developer.android.com/reference/android/Manifest.permission.html</a>.
Applications may declare their own permissions for other applications to use.
Such permissions are not listed in the above location.</p>
<p>When defining a permission a protectionLevel attribute tells the system how the
user is to be informed of applications requiring the permission, or who is
allowed to hold a permission. Details on creating and using application
- specific permissions are described at <a href="https://develo
-per.android.com/guide/topics/security/security.html">https://developer.android.com/guide/topics/security/security.html</a>.</p>
+ specific permissions are described at
+ <a href="https://developer.android.com/guide/topics/security/security.html">
+https://developer.android.com/guide/topics/security/security.html</a>.</p>
<p>There are some device capabilities, such as the ability to send SMS broadcast
intents, that are not available to third-party applications, but that may be
used by applications pre-installed by the OEM. These permissions use the
signatureOrSystem permission.</p>
-<h2 id="how-users-understand-third-party-applications">How Users Understand Third-Party Applications</h2>
+<h2 id="how-users-understand-third-party-applications">
+How Users Understand Third-Party Applications</h2>
<p>Android strives to make it clear to users when they are interacting with
third-party applications and inform the user of the capabilities those
applications have. Prior to installation of any application, the user is shown
@@ -188,8 +194,9 @@ src="../images/image_gmail_installed.png" id="figure1" /></td>
<li>
<p><strong>Binder</strong>: A lightweight capability-based remote procedure call mechanism
designed for high performance when performing in-process and cross-process
- calls. Binder is implemented using a custom Linux driver. See <a href="https://developer
-.android.com/reference/android/os/Binder.html">https://developer.android.com/reference/android/os/Binder.html</a>.</p>
+ calls. Binder is implemented using a custom Linux driver. See
+ <a href="https://developer.android.com/reference/android/os/Binder.html">
+ https://developer.android.com/reference/android/os/Binder.html</a>.</p>
</li>
<li>
<p><strong>Services</strong>: Services (discussed above) can provide interfaces directly
@@ -203,14 +210,17 @@ src="../images/image_gmail_installed.png" id="figure1" /></td>
of code (in this case, the Browser) that knows how to handle that Intent, and
runs it. Intents can also be used to broadcast interesting events (such as a
notification) system-wide. See
- <a href="https://developer.android.com/reference/android/content/Intent.html">https://developer.android.com/reference/android/content/Intent.html</a>.</p>
+ <a href="https://developer.android.com/reference/android/content/Intent.html">
+ https://developer.android.com/reference/android/content/Intent.html</a>.</p>
</li>
<li>
<p><strong>ContentProviders</strong>: A ContentProvider is a data storehouse that provides
access to data on the device; the classic example is the ContentProvider that
is used to access the user's list of contacts. An application can access data
that other applications have exposed via a ContentProvider, and an application
- can also define its own ContentProviders to expose data of its own. See <a href="https://developer.android.com/reference/android/content/ContentProvider.html">https://developer.android.com/reference/android/content/ContentProvider.html</a>.</p>
+ can also define its own ContentProviders to expose data of its own. See
+ <a href="https://developer.android.com/reference/android/content/ContentProvider.html">
+ https://developer.android.com/reference/android/content/ContentProvider.html</a>.</p>
</li>
</ul>
<p>While it is possible to implement IPC using other mechanisms such as network
@@ -300,7 +310,8 @@ longer permitted.
To be added as a new public CA to the Android stock set, the CA must complete
the <a href="https://wiki.mozilla.org/CA:How_to_apply">Mozilla CA Inclusion
Process</a> and then file a feature request against Android (<a
-href="https://code.google.com/p/android/issues/entry">https://code.google.com/p/android/issues/entry</a>)
+href="https://code.google.com/p/android/issues/entry">
+https://code.google.com/p/android/issues/entry</a>)
to have the CA added to the stock Android CA set in the <a
href="https://android.googlesource.com/">Android Open Source Project</a>
(AOSP).
@@ -310,17 +321,17 @@ There are still CAs that are device-specific and should not be included in the
core set of AOSP CAs, like carriers’ private CAs that may be needed to securely
access components of the carrier’s infrastructure, such as SMS/MMS gateways.
Device manufacturers are encouraged to include the private CAs only in the
-components/apps that need to trust these CAs. See <a
-href="https://developer.android.com/preview/features/security-config.html">Network
-Security Configuration</a> for more details.
+components/apps that need to trust these CAs. For more details, see
+<a href="https://developer.android.com/training/articles/security-config">
+Network Security Configuration</a>.
</p>
<h2 id="application-signing">Application Signing</h2>
<p><a href="/security/apksigning/index.html">Code signing</a>
allows developers to identify the author of the application and to
update their application without creating complicated interfaces and
permissions. Every application that is run on the Android platform must be
- signed by the developer. Applications that attempt to install without being
- signed will rejected by either Google Play or the package installer on
+ signed by the developer. Applications that attempt to install without being
+ signed are rejected by either Google Play or the package installer on
the Android device.</p>
<p>On Google Play, application signing bridges the trust Google has with the
developer and the trust the developer has with their application. Developers
@@ -345,8 +356,9 @@ Security Configuration</a> for more details.
<p>Applications are also able to declare security permissions at the Signature
protection level, restricting access only to applications signed with the same
key while maintaining distinct UIDs and Application Sandboxes. A closer
- relationship with a shared Application Sandbox is allowed via the <a href="https://developer.android.com/guide/topics/manifest/manifest-element.html#uid">shared UID
- feature</a> where two or more applications signed with same developer key can
+ relationship with a shared Application Sandbox is allowed via the
+ <a href="https://developer.android.com/guide/topics/manifest/manifest-element.html#uid">
+ shared UID feature</a> where two or more applications signed with same developer key can
declare a shared UID in their manifest.</p>
<h2 id="app-verification">Application Verification</h2>
<p> Android 4.2 and later support application verification. Users can choose to
@@ -360,8 +372,8 @@ Security Configuration</a> for more details.
constraints that are associated with the content. The DRM framework supports
many DRM schemes; which DRM schemes a device supports is left to the device
manufacturer.</p>
-<p>The <a href="https://developer.android.com/reference/android/drm/package-summary.html">Android DRM
- framework</a> is implemented in two architectural layers (see figure below):</p>
+<p>The <a href="https://developer.android.com/reference/android/drm/package-summary.html">
+Android DRM framework</a> is implemented in two architectural layers (see figure below):</p>
<ul>
<li>
<p>A DRM framework API, which is exposed to applications through the Android
diff --git a/en/setup/start/build-numbers.html b/en/setup/start/build-numbers.html
index 6889f568..9cda12fa 100644
--- a/en/setup/start/build-numbers.html
+++ b/en/setup/start/build-numbers.html
@@ -259,6 +259,12 @@ following table.
<td>Pixel 2 XL, Pixel 2</td>
</tr>
<tr>
+ <td>OPM2.171019.029.A1</td>
+ <td>android-8.1.0_r25</td>
+ <td>Oreo</td>
+ <td>Nexus 6P</td>
+ </tr>
+ <tr>
<td>OPM4.171019.015.A1</td>
<td>android-8.1.0_r23</td>
<td>Oreo</td>
diff --git a/zh-cn/_book.yaml b/zh-cn/_book.yaml
index ea93f7e7..6012ec1f 100644
--- a/zh-cn/_book.yaml
+++ b/zh-cn/_book.yaml
@@ -515,6 +515,8 @@ upper_tabs:
title: 概览
- path: /devices/bluetooth/services
title: 服务
+ - path: /devices/bluetooth/ble
+ title: 蓝牙低功耗
- path: /devices/bluetooth/ble_advertising
title: BLE 广告
- path: /devices/bluetooth/verifying_debugging
diff --git a/zh-cn/compatibility/vts/multi-device-testing.html b/zh-cn/compatibility/vts/multi-device-testing.html
new file mode 100644
index 00000000..49038ac5
--- /dev/null
+++ b/zh-cn/compatibility/vts/multi-device-testing.html
@@ -0,0 +1,169 @@
+<html devsite><head>
+ <title>多设备测试</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2018 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>VTS 支持需要在多部 Android 设备之间进行交互的测试。</p>
+
+<h2 id="architecture">架构</h2>
+<p>VTS 使用 TradeFed 框架获取设备序列号并将其传递给测试模块。</p>
+
+<p><img src="images/vts_device_serials.png"/></p>
+<figcaption><strong>图 1.</strong> VTS 对设备序列号进行传递的过程。</figcaption>
+
+<p>设备要求(如设备数量和设备类型)在测试计划配置中指定。例如,您可以在测试计划中指定需要两部具有 Sailfish 编译目标的 Android 设备。</p>
+
+<h3 id="device-allocation">设备分配</h3>
+<p>测试基础架构(通常是测试调度程序)将满足测试计划配置中指定要求的可用设备分配给 VTS 框架。即使测试模块没有使用分配的设备,这些设备仍会保留用于测试计划。然后将 VTS 代理二进制文件推送到所有已分配设备上,并在设备上运行(除非有不要运行的特殊指示)。这可确保用于 shell 命令和 HAL RPC 的 TCP 连接可用于测试脚本中的所有设备。</p>
+
+<h3 id="test-preparers">测试准备器</h3>
+<p>框架会为所收到的序列号对应的所有设备运行测试准备器。目标准备器可以是单设备准备器或多设备准备器:</p>
+<ul>
+<li>单设备目标准备器(<a href="https://android.googlesource.com/platform/test/vts/+/master/harnesses/tradefed/src/com/android/tradefed/targetprep/VtsDeviceInfoCollector.java" class="external">VtsDeviceInfoCollector</a> 上的示例):<ul>
+<li>只能在测试计划配置中根据所需的设备列表指定(未来版本将允许在模块配置中指定)。</li>
+<li>只接收一个设备序列号。</li>
+<li>针对特定设备运行准备和清理任务。</li>
+</ul>
+</li>
+<li>多设备目标准备器(<a href="https://android.googlesource.com/platform/test/vts/+/master/harnesses/tradefed/src/com/android/tradefed/targetprep/VtsPythonVirtualenvPreparer.java" class="external">VtsPythonVirtualenvPreparer</a> 上的示例):<ul>
+<li>可以在测试计划配置或测试模块配置中指定</li>
+<li>接收所有设备序列号</li>
+<li>为每部设备或所有设备运行准备和清理任务。</li>
+</ul>
+</li>
+</ul>
+
+<h3 id="test-modules">测试模块</h3>
+<p>在测试准备器设置完主机/设备后,测试模块会获取设备列表。系统会针对每个多设备测试模块运行一个主机端 Python 测试模块。分配的 Android 设备可以从 Python 测试模块(以 <a href="https://android.googlesource.com/platform/test/vts/+/master/utils/python/controllers/android_device.py#322" class="external">AndroidDevice</a> 对象列表形式)访问:</p>
+<pre class="devsite-click-to-copy">
+devices = self.android_devices
+device1 = devices[0]
+device1_serial = device1.serial
+</pre>
+
+<p>即使测试计划中的测试模块仅使用了一部设备,所有已分配的设备都会保留用于测试计划。</p>
+
+<h2 id="device-communication">测试期间的设备通信</h2>
+<p>有效的多 Android 设备测试需要在已分配设备之间进行通信。在开发此类测试时,您必须确定如何在已分配设备之间建立通信。以下部分提供了三个通信示例(但是,测试开发者可以自由设计其他模型)。</p>
+
+<h3 id="type1">类型 1:主机端 HAL 测试</h3>
+<p>主机端 HAL 测试可以使用默认推送到设备的 VTS HAL 驱动程序:</p>
+
+<p><img src="images/vts_hostside_hal.png"/></p>
+<figcaption><strong>图 2.</strong> 主机端 HAL 测试。</figcaption>
+
+<p>在这种情况下:</p>
+<ul>
+<li>测试逻辑在主机上执行。</li>
+<li>主机端测试脚本向每部设备上的驱动程序发出 RPC 调用。</li>
+<li>主机端协调设备的交互。</li>
+</ul>
+
+<h3 id="type2">类型 2:基于代理的主机端测试</h3>
+<p>除了在设备上使用 VTS 代理外,主机端测试还可以将自己的代理(应用或二进制文件)推送到每部设备:</p>
+
+<p><img src="images/vts_hostside_agent.png"/></p>
+<figcaption><strong>图 3.</strong> 基于代理的主机端测试。</figcaption>
+
+<p>在这种情况下:</p>
+<ul>
+<li>测试逻辑在主机上执行。</li>
+<li>代理应用(或二进制文件)安装在每部设备上。</li>
+<li>主机端测试脚本向每部设备上的应用发出命令。</li>
+<li>主机端协调设备的交互。</li>
+</ul>
+
+<p>例如,当前 VTS repo 中的<a href="https://android.googlesource.com/platform/test/vts-testcase/nbu/+/master" class="external">下一批十亿用户测试</a>是基于应用的主机端多设备测试。</p>
+
+<h3 id="type3">类型 3:目标端 HIDL 测试</h3>
+<p>目标端、多设备 HIDL 测试将所有测试逻辑置于设备端测试二进制文件中,这要求测试在测试执行期间同步设备:</p>
+
+<p><img src="images/vts_target_hidl.png"/></p>
+<figcaption><strong>图 4. </strong>基于目标的 HIDL 测试。</figcaption>
+
+<p>在这种情况下:</p>
+<ul>
+<li>在设备上执行测试逻辑。</li>
+<li>主机端框架提供了初始设备标识。</li>
+<li>目标端测试二进制文件需要同步:<ul>
+<li>所有设备使用的测试二进制文件相同。</li>
+<li>每个角色使用的测试二进制文件不同。</li>
+</ul>
+</li>
+</ul>
+
+<h2 id="example-multi-device">示例:多设备测试计划</h2>
+<p>此示例为两部设备指定了配置:</p>
+<ul>
+<li>设备 1 包括一个编译版本提供程序和 <code>VtsDeviceInfoCollector</code> 目标准备器。</li>
+<li>设备 2 包括一个额外的 <code>FilePusher</code> 准备器,可将一组主机驱动的相关文件推送至设备。</li>
+</ul>
+
+<pre class="devsite-click-to-copy">
+&lt;configuration description="VTS Codelab Plan"&gt;
+ ...
+&lt;device name="device1"&gt;
+&lt;build_provider class="com.android.compatibility.common.tradefed.build.CompatibilityBuildProvider" /&gt;
+&lt;target_preparer class="com.android.tradefed.targetprep.VtsDeviceInfoCollector" /&gt;
+&lt;/device&gt;
+&lt;device name="device2" &gt;
+&lt;build_provider class="com.android.compatibility.common.tradefed.build.CompatibilityBuildProvider" /&gt;
+&lt;target_preparer class="com.android.tradefed.targetprep.VtsDeviceInfoCollector" /&gt;
+&lt;target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher"&gt;
+&lt;option name="push-group" value="HostDrivenTest.push" /&gt;
+&lt;/target_preparer&gt;
+&lt;/device&gt;
+&lt;option name="compatibility:include-filter" value="VtsCodelabHelloWorldMultiDeviceTest" /&gt;
+&lt;/configuration&gt;
+</pre>
+
+<h2 id="example-hostside">示例:主机端 Python 测试脚本</h2>
+<p>有关测试准备器的详细信息和示例,请参阅<a href="#Test-preparers">测试准备器</a>。有关完整的主机端多设备示例,请参阅 <a href="https://android.googlesource.com/platform/test/vts/+/master/testcases/codelab/hello_world_multi" class="external">hello_world_multi codelab</a>。
+</p>
+
+<pre class="devsite-click-to-copy">
+def setUpClass(self):
+logging.info('number of device: %s', self.android_devices)
+asserts.assertEqual(len(self.android_devices), 2, 'number of device is wrong.')
+self.dut1 = self.android_devices[0]
+self.dut2 = self.android_devices[1]
+self.shell1 = self.dut1.shell
+self.shell2 = self.dut2.shell
+
+def testSerialNotEqual(self):
+'''Checks serial number from two device not being equal.'''
+command = 'getprop | grep ro.serial'
+res1 = self.shell1.Execute(command)
+res2 = self.shell2.Execute(command)
+
+def getSerialFromShellOutput(output):
+'''Get serial from getprop query'''
+return output[const.STDOUT][0].strip().split(' ')[-1][1:-1]
+serial1 = getSerialFromShellOutput(res1)
+serial2 = getSerialFromShellOutput(res2)
+
+logging.info('Serial number of device 1 shell output: %s', serial1)
+logging.info('Serial number of device 2 shell output: %s', serial2)
+asserts.assertNotEqual(serial1, serial2, 'serials from two devices should not be the same')
+asserts.assertEqual(serial1, self.dut1.serial, 'serial got from device system property is different from allocated serial')
+asserts.assertEqual(serial2, self.dut2.serial, 'serial got from device system property is different from allocated serial')
+</pre>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/compatibility/vts/shell-commands.html b/zh-cn/compatibility/vts/shell-commands.html
new file mode 100644
index 00000000..47dd09ee
--- /dev/null
+++ b/zh-cn/compatibility/vts/shell-commands.html
@@ -0,0 +1,112 @@
+<html devsite><head>
+ <title>设备 Shell 命令</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2018 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>在 VTS 测试期间,shell 命令用于执行目标端测试二进制文件,获取/设置属性、环境变量和系统信息以及启动/停止 Android 框架。您可以使用 <code>adb shell</code> 命令或设备上运行的 VTS shell 驱动程序(推荐本方式)执行 VTS 设备 shell 命令。</p>
+
+<h2 id="adb-shell">使用 ADB shell</h2>
+<p>如果在测试期间需要关闭 USB 端口或重新启动设备,则必须使用 ADB shell,因为如果没有持久的 USB 连接,VTS shell 驱动程序将不可用。您可以从 Python 测试脚本中的 <code>AndroidDevice</code> 对象调用 ADB shell。例如:</p>
+<ul>
+<li>获取 Android 设备对象:
+<pre class="devsite-click-to-copy">
+self.device = self.android_devices[0]
+</pre>
+</li>
+<li>发出一个 shell 命令:
+<pre class="devsite-click-to-copy">
+result = self.device.adb.shell(‘ls')
+</pre>
+</li>
+</ul>
+
+<h2 id="vts-shell-driver">使用 VTS shell 驱动程序</h2>
+<p>VTS shell 驱动程序是一个代理二进制文件,该文件会在设备上运行并执行 shell 命令。默认情况下,如果 shell 驱动程序在设备上运行,则 VTS 将使用该驱动程序,因为此方法比使用 <code>adb
+shell</code> 命令的延迟更短。</p>
+
+<p><img src="images/vts_shell_driver.png"/></p>
+<figcaption><strong>图 1.</strong> VTS shell 驱动程序。</figcaption>
+
+<p>VTS 框架支持多设备测试,其中每部 Android 设备都在基础运行器中表示为 AndroidDevice 对象。默认情况下,VTS 框架会将 VTS 代理和 VTS shell 驱动程序二进制文件推送到每部 Android 设备,并与这些设备上的 VTS 代理建立 TCP 连接。</p>
+
+<p>要执行 shell 命令,主机端 Python 脚本会对 AndroidDevice 对象内的 ShellMirror 对象发出函数调用。ShellMirror 对象将 shell 命令文本打包成 <a href="https://developers.google.com/protocol-buffers/" class="external">protobuf</a> 消息,并通过 TCP 通道将其发送至 Android 设备上的 VTS 代理。然后,设备上运行的代理通过 Unix 套接字将 shell 命令转发给 VTS shell 驱动程序。</p>
+
+<p>当 VTS shell 驱动程序收到一个 shell 命令时,它会在设备 shell 上通过 <a href="https://en.wikipedia.org/wiki/Nohup" class="external">nohup</a> 执行该命令以防止中断。然后从 <code>nohup</code> 检索 stdout、stderr 和返回代码并将其发送回 VTS 代理。最后,代理通过将命令结果封装成 <code>protobuf</code> 消息来回复主机。</p>
+
+<h3 id="advantages">优点</h3>
+<p>使用 VTS shell 驱动程序(而不是 <code>adb
+shell</code>)的优点包括:</p>
+<ul>
+<li><strong>可靠性。</strong> VTS shell 驱动程序使用 <code>nohup</code> 执行命令(采用默认设置)。由于 VTS 测试主要是较低级别的 HAL 和内核测试,因此 <code>nohup</code> 确保 shell 命令在执行期间不会中断。</li>
+<li><strong>性能</strong>。虽然 <code>adb shell</code> 命令会缓存一些结果(例如列出目录中的文件),但在执行任务(例如执行测试二进制文件)时,它会产生连接开销。VTS shell 驱动程序在整个测试过程中保持有效连接,所以唯一的开销是 USB 通信。在我们的测试中,使用 VTS shell 驱动程序执行一个具有 100 个空 Gtest 二进制文件调用的命令比使用 <code>adb shell</code> 快 20%。由于 VTS shell 通信需要完成大量日志记录工作,因此实际差异更大。</li>
+<li><strong>状态保持</strong>。VTS shell 驱动程序为每个终端名称(默认终端名称为“default”)保持一个终端会话。<em></em>在某个终端会话中设置的环境变量仅适用于同一会话中的后续命令。</li>
+<li><strong>可扩展性</strong>。VTS 框架和设备驱动程序之间的 shell 命令通信封装在 protobuf 中,以便日后能够进行压缩、远程控制、加密等。还存在其他提高性能的可能性,包括通信开销大于结果字符串解析时的设备端结果解析。</li>
+</ul>
+
+<h3 id="disadvantages">缺点</h3>
+<p>使用 VTS shell 驱动程序(而不是 <code>adb
+shell</code>)的缺点包括:</p>
+<ul>
+<li><strong>额外的二进制文件</strong>。VTS 代理文件必须推送到设备并在测试执行之后清理干净。</li>
+<li><strong>需要有效连接</strong>。如果主机和代理之间的 TCP 连接在测试期间有意或无意地断开(由于 USB 连接断开、端口关闭、设备崩溃等),则 shell 命令无法传输到 VTS 代理。即使自动切换到 <code>adb shell</code>,断开连接之前的命令结果和状态也是未知的。</li>
+</ul>
+
+<h3 id="examples">示例</h3>
+<p>在 VTS 主机端 Python 测试脚本中使用 shell 命令的示例:</p>
+<ul>
+<li>获取 Android 设备对象:
+<pre class="devsite-click-to-copy">
+self.device = self.android_devices[0]
+</pre>
+</li>
+<li>为所选设备获取 shell 对象:
+<pre class="devsite-click-to-copy">
+self.shell = self.device.shell
+</pre>
+</li>
+<li>发出一个 shell 命令:
+<pre class="devsite-click-to-copy">
+results = self.shell.Execute(‘ls')
+</pre>
+</li>
+<li>发出一串 shell 命令:
+<pre class="devsite-click-to-copy">
+results = self.shell.Execute([‘cd /data/local/tmp', ‘ls'])
+</pre>
+</li>
+</ul>
+
+<h3 id="command-result-object">命令结果对象</h3>
+<p>执行 shell 命令后的返回对象是一个包含键 <code>stdouts</code>、<code>stderrs</code> 和 <code>return_codes</code> 的字典。无论 shell 命令是作为单个字符串还是命令字符串列表提供,结果字典的每个值都始终是一个列表。</p>
+
+<p>要验证命令列表的返回代码,测试脚本必须检查索引。例如:</p>
+
+<pre class="devsite-click-to-copy">
+asserts.assertFalse(any(results[‘return_codes']), ‘some command failed.')
+</pre>
+
+<p>或者,脚本可以单独检查每个命令索引。例如:</p>
+
+<pre class="devsite-click-to-copy">
+asserts.assertEqual(results[‘return_codes'][0], 0, ‘first command failed')<br />
+asserts.assertEqual(results[‘return_codes'][1], 0, ‘second command failed')
+</pre>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/compatibility/vts/test-templates.html b/zh-cn/compatibility/vts/test-templates.html
new file mode 100644
index 00000000..8fba0024
--- /dev/null
+++ b/zh-cn/compatibility/vts/test-templates.html
@@ -0,0 +1,273 @@
+<html devsite><head>
+ <title>测试模板</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2018 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>AOSP 为不是 VTS 运行器 BaseTest 的主机端 Python 子类的测试模块提供了测试模板。</p>
+
+<p><img src="images/vts_template_arch.png"/></p>
+<figcaption><strong>图 1.</strong> 测试模板架构。</figcaption>
+
+<p>开发者可以使用这些模板来尽量减少集成这些测试所需的工作量。本部分介绍了如何配置和使用测试模板(位于 VTS <a href="https://android.googlesource.com/platform/test/vts/+/master/testcases/template/">testcases/template</a> 目录中),并提供了常用模板的示例。</p>
+
+<h2 id="binarytest">BinaryTest 模板</h2>
+<p><a href="https://android.googlesource.com/platform/test/vts/+/sdk-release/testcases/template/binary_test/binary_test.py" class="external">BinaryTest 模板</a>可用于集成在 VTS 中的目标设备上执行的测试。目标端测试包括:</p>
+
+<ul>
+<li>编译并推送到设备的基于 <strong>C++</strong> 的测试</li>
+<li>编译为二进制文件的目标端 <strong>Python</strong> 测试</li>
+<li>在设备上可执行的 <strong>Shell 脚本</strong></li>
+</ul>
+
+<p>这些测试可以集成到 VTS 中(无论是否通过 BinaryTest 模板)。</p>
+
+<h3 id="target-side">将目标端测试与 BinaryTest 模板集成</h3>
+<p>BinaryTest 模板旨在帮助开发者轻松集成目标端测试。在大多数情况下,您可以在 <code>AndroidTest.xml</code> 中添加几行简单的配置代码。来自 <a href="https://android.googlesource.com/platform/test/vts-testcase/kernel/+/master/api/early_mount/AndroidTest.xml" class="external">VtsDeviceTreeEarlyMountTest</a> 的示例配置:
+</p>
+
+<pre class="devsite-click-to-copy">
+&lt;configuration description="Config for VTS VtsDeviceTreeEarlyMountTest."&gt;
+ ...
+&lt;test class="com.android.tradefed.testtype.VtsMultiDeviceTest"&gt;
+&lt;option name="test-module-name" value="VtsDeviceTreeEarlyMountTest"/&gt;
+&lt;option name="binary-test-source" value="_32bit::DATA/nativetest/dt_early_mount_test/dt_early_mount_test" /&gt;
+&lt;option name="binary-test-source" value="_64bit::DATA/nativetest64/dt_early_mount_test/dt_early_mount_test" /&gt;
+&lt;option name="test-timeout" value="5m"/&gt;
+&lt;/test&gt;
+&lt;/configuration&gt;
+</pre>
+
+<p>在本配置中:</p>
+<ul>
+<li><code>binary-test-source</code> 和 <code>binary-test-type</code> 因模板而异。</li>
+<li>指定测试二进制源文件的相对主机路径使模板能够处理以下操作:做出准备、推送文件、执行测试、分析结果和进行清理。</li>
+<li>该模板包含子类可替换的测试用例创建相关方法。</li>
+<li>模板假定每个测试二进制文件模块都有一个测试用例,并且默认情况下,二进制源文件名称用作测试用例名称。</li>
+</ul>
+
+<h4>配置选项</h4>
+<p>BinaryTest 模板支持以下配置选项:</p>
+
+<table>
+<thead>
+<tr>
+<th width="25%">选项名称</th>
+<th width="12%">值类型</th>
+<th>说明</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>binary-test-source</td>
+<td>字符串</td>
+<td>与主机上的 vts test-case 目录相对的二进制测试源文件路径。<br />例如:<code>DATA/nativetest/test</code></td>
+</tr>
+<tr>
+<td>binary-test-working-directory</td>
+<td>字符串</td>
+<td>工作目录(设备端路径)。<br />例如:<code>/data/local/tmp/testing/</code></td>
+</tr>
+<tr>
+<td>binary-test-envp</td>
+<td>字符串</td>
+<td>二进制文件的环境变量。<br />例如:<code>PATH=/new:$PATH</code></td>
+</tr>
+<tr>
+<td>binary-test-args</td>
+<td>字符串</td>
+<td>测试参数或标记。<br />例如:<code>--gtest_filter=test1</code></td>
+</tr>
+<tr>
+<td>binary-test-ld-library-path</td>
+<td>字符串</td>
+<td><code>LD_LIBRARY_PATH</code> 环境变量。<br />例如:<code>/data/local/tmp/lib</code></td>
+</tr>
+<tr>
+<td>binary-test-disable-framework</td>
+<td>布尔型</td>
+<td>运行 <code>adb stop</code> 以在测试之前关闭 Android 框架。例如:<code>true</code></td>
+</tr>
+<tr>
+<td>binary-test-stop-native-servers</td>
+<td>布尔型</td>
+<td>在测试期间停止所有正确配置的原生服务器。例如:<code>true</code></td>
+</tr>
+<tr>
+<td>binary-test-type</td>
+<td>字符串</td>
+<td>模板类型。其他模板类型从此模板扩展而来,但您不必为此模板指定此选项,因为您已指定 <code>binary-test-source</code>。</td>
+</tr>
+</tbody>
+</table>
+
+<p>对于包含值类型 <code>strings</code> 的选项,您可以通过重复配置中的选项来添加多个值。例如,设置两次 <code>binary-test-source</code>(如 <code>VtsDeviceTreeEarlyMountTest</code> 示例中所示)。</p>
+
+<h4>测试标记</h4>
+<p>您可以添加测试标记,方法是将它们作为具有 <code>strings</code> 值的选项的前缀,并使用 <code>::</code> 作为分隔符。在包含具有相同名称但具有不同位数或父目录的二进制源文件时,测试标记尤其有用。例如,为了避免名称相同但源文件目录不同的源文件发生推送或结果名称冲突,您可以为这些源文件指定不同的标记。</p>
+
+<p>正如使用两个 <code>dt_early_mount_test</code> 源文件的 <code>VtsDeviceTreeEarlyMountTest</code> 示例所示,测试标记是 <code>binary-test-source</code> 上的 <code>_32bit::</code> 和 <code>_64bit::</code> 前缀。以 <code>32bit</code> 或 <code>64bit</code> 结尾的标记自动将测试标记为可用于一个 ABI 位;即在 64 位 ABI 上不执行带标记 <code>_32bit</code> 的测试。不指定标记等同于使用带空字符串的标记。</p>
+
+<p>具有相同标记的选项将组合到一起并与其他标记隔开来。例如,带有 <code>_32bit</code> 标记的 <code>binary-test-args</code> 仅应用于具有相同标记的 <code>binary-test-source</code>,并在具有相同标记的 <code>binary-test-working-directory</code> 中执行。<code>binary-test-working-directory</code> 选项对于二进制文件测试是可选的,使您能够为标记指定单个工作目录。当未指定 <code>binary-test-working-directory</code> 选项时,每个标记都使用默认目录。</p>
+
+<p>标记名称在结果报告中直接附加到测试用例名称上。例如,带标记 <code>_32bit</code> 的测试用例 <code>testcase1</code> 在结果报告中显示为 <code>testcase1_32bit</code>。</p>
+
+<h3 id="no-target-side">在不使用 BinaryTest 模板的情况下集成目标端测试</h3>
+<p>在 VTS 中,默认测试格式是从 VTS 运行器中的 BaseTest 扩展的主机端 Python 测试。要集成目标端测试,您必须先将测试文件推送到设备,使用 shell 命令执行测试,然后使用主机端 Python 脚本解析结果。</p>
+
+<h4>推送测试二进制文件</h4>
+<p>我们建议使用 <code>VtsFilePusher</code> 目标准备器推送文件。例如:</p>
+
+<pre class="devsite-click-to-copy">
+&lt;target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher"&gt;
+ &lt;option name="push" value="DATA/test-&gt;/data/local/tmp/test"/&gt;
+ &lt;/target_preparer&gt;
+</pre>
+
+<p><code>VtsFilePusher</code> 会执行以下操作:</p>
+<ol>
+<li>检查设备连接。</li>
+<li>确定源文件绝对路径。</li>
+<li>使用 <code>adb push</code> 命令推送文件。</li>
+<li>测试完成后删除文件。</li>
+</ol>
+<p>或者,您可以使用遵循类似过程的主机端 Python 测试脚本手动推送文件。</p>
+
+<h4>运行测试</h4>
+<p>将文件推送到设备后,在主机端 Python 测试脚本中使用 shell 命令运行测试。例如:</p>
+
+<pre class="devsite-click-to-copy">
+device = self.android_devices[0]
+res = device.shell.Execute(["chmod a+x /data/local/tmp/test", "/data/local/tmp/test"])
+asserts.AssertFalse(any(res[return_codes]))
+</pre>
+
+<h2 id="gtestbinarytest">GtestBinaryTest 模板</h2>
+<p><a href="https://android.googlesource.com/platform/test/vts/+/sdk-release/testcases/template/gtest_binary_test/gtest_binary_test.py" class="external">GtestBinaryTest 模板</a>会托管 GTest 测试二进制文件,每个文件通常包含多个测试用例。该模板通过替换设置、测试用例创建和结果解析方法来扩展 BinaryTest 模板,因此所有 BinaryTest 配置都将得到继承。</p>
+
+<p>GtestBinaryTest 会添加 <code>gtest-batch-mode</code> 选项:</p>
+
+<table>
+<thead>
+<tr>
+<th>选项名称</th>
+<th>值类型</th>
+<th>说明</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>binary-test-type</td>
+<td>字符串</td>
+<td>模板类型。使用值 <code>gtest</code>。</td>
+</tr>
+<tr>
+<td>gtest-batch-mode</td>
+<td>布尔型</td>
+<td>以批处理模式运行 Gtest 二进制文件。例如:<code>true</code></td>
+</tr>
+</tbody>
+</table>
+
+<p>通常,将 <code>gtest-batch-mode</code> 设置为 <code>true</code> 可以提高性能,但是也会稍微降低可靠性。在 VTS 兼容性测试中,许多模块使用批处理模式来提高性能。但是为了达到一定的可靠性,如果您未指定模式,则默认为非批处理模式。</p>
+
+<h3 id="non-batch-mode">非批处理模式</h3>
+<p>非批处理模式会针对每个测试用例对 GTest 进行单独调用。例如,如果 GTest 二进制文件包含 10 个测试用例(在通过主机端配置进行过滤之后),则在设备 shell 上调用该二进制文件 10 次,每次使用不同的测试过滤器。模板会为每个测试用例生成并解析唯一的 GTest 结果输出 XML 文件。</p>
+
+<p><img src="images/vts_non_batch.png"/></p>
+<figcaption><strong>图 2.</strong> 非批处理模式。</figcaption>
+
+<p>使用非批处理模式的优点包括:</p>
+<ul>
+<li><strong>测试用例隔离</strong>。如果某个测试用例出现崩溃或中断现象,不会影响其他测试用例。</li>
+<li><strong>细化程度</strong>。更容易获得每个测试用例的分析/覆盖率测量结果、systrace、错误报告、logcat 等。在每个测试用例完成后立即检索测试结果和日志。</li>
+</ul>
+
+<p>使用非批处理模式的缺点包括:</p>
+<ul>
+<li><strong>冗余加载</strong>。每次调用 GTest 二进制文件时,都会加载相关库并执行初始类设置。</li>
+<li><strong>通信开销</strong>。测试完成后,主机和目标设备会进行通信,以获得结果分析数据和后续命令(未来可能会优化)。</li>
+</ul>
+
+<h3 id="batch-mode">批处理模式</h3>
+<p>在 GTest 批处理模式下,测试二进制文件仅被调用一次,并使用一个很长的测试过滤器值(包含所有通过主机端配置过滤的测试用例,这可以避免非批处理模式下的冗余加载问题)。您可以使用 output.xml 或终端输出来解析 GTest 的测试结果。</p>
+
+<p>使用 output.xml 时(默认设置):</p>
+
+<p><img src="images/vts_batch_output_xml.png"/></p>
+<figcaption><strong>图 3.</strong> 批处理模式(使用 output.xml)。</figcaption>
+
+<p>和在非批处理模式下一样,测试结果通过 GTest 输出 xml 文件进行解析。但是,由于输出 xml 文件是在所有测试完成后生成的,因此如果某个测试用例导致二进制文件或设备崩溃,则不会生成任何结果 xml 文件。
+
+</p><p>使用终端输出时:</p>
+
+<p><img src="images/vts_batch_terminal_output.png"/></p>
+<figcaption><strong>图 4.</strong> 批处理模式(使用终端输出)。</figcaption>
+
+<p>当 GTest 运行时,它会将测试日志和进度输出到终端,且采用框架能够解析(以获取测试状态、结果和日志)的格式。</p>
+
+<p>使用批处理模式的优点包括:</p>
+<ul>
+<li><strong>测试用例隔离</strong>。如果框架在崩溃后使用简化测试过滤器(排除已完成和崩溃的测试用例)重新启动二进制文件/设备,则提供与非批处理模式相同级别的测试用例隔离。</li>
+<li><strong>细化程度</strong>。提供与非批处理模式相同的测试用例细化程度。</li>
+</ul>
+
+<p>使用批处理模式的缺点包括:</p>
+<ul>
+<li><strong>维护成本</strong>。如果 GTest 日志格式改变了,所有测试都会中断。</li>
+<li><strong>混乱</strong>。测试用例会输出类似于 GTest 进度格式的内容,这可能会导致格式混乱。</li>
+</ul>
+<p>由于这些缺点,我们暂时移除了使用命令行输出的选项。我们将在未来重新设计这个选项以提高此功能的可靠性。</p>
+
+<h2 id="hostbinarytest">HostBinaryTest 模板</h2>
+<p>HostBinaryTest 模板包含不在其他目录或 Python 脚本中的主机端可执行文件。这些测试包括:</p>
+<ul>
+<li>可在主机上执行的已编译测试二进制文件</li>
+<li>采用 Shell、Python 或其他语言的可执行脚本</li>
+</ul>
+<p>例如 <a href="https://android.googlesource.com/platform/test/vts-testcase/security/+/master/selinux/policy/AndroidTest.xml" class="external">VTS 安全性 SELinux 策略主机端测试</a>:</p>
+
+<pre class="devsite-click-to-copy">
+&lt;configuration description="Config for VTS Security SELinux policy host-side test cases"&gt;
+ ...
+ &lt;test class="com.android.tradefed.testtype.VtsMultiDeviceTest"&gt;
+ &lt;option name="test-module-name" value="VtsSecuritySelinuxPolicyHost"/&gt;
+ &lt;option name="binary-test-source" value="out/host/linux-x86/bin/VtsSecuritySelinuxPolicyHostTest" /&gt;
+ &lt;option name="binary-test-type" value="host_binary_test"/&gt;
+ &lt;/test&gt;
+&lt;/configuration&gt;
+</pre>
+
+<p>HostBinaryTest 不扩展 BinaryTest 模板,但使用类似的测试配置。在上面的示例中,<code>binary-test-source</code> 选项指定测试可执行文件的主机端相对路径,<code>binary-test-type</code> 为 <code>host_binary_test</code>。与BinaryTest 模板类似,默认情况下,二进制文件名用作测试用例名称。</p>
+
+<h2 id="extending-existing-templates">扩展现有的模板</h2>
+<p>您可以直接在测试配置中使用模板来包含非 Python 测试或在子类中扩展它们以处理特定的测试需求。VTS repo 中的模板具有以下扩展功能:</p>
+
+<p><img src="images/vts_template_extension.png"/></p>
+<figcaption><strong>图 5.</strong> 在 VTS repo 中扩展现有模板。</figcaption>
+
+<p>我们鼓励开发者扩展任何现有的模板以满足任何特定的测试要求。扩展模板的常见原因包括:</p>
+<ul>
+<li>特殊测试设置流程,例如使用特殊命令准备设备。</li>
+<li>生成不同的测试用例和测试名称。</li>
+<li>通过读取命令输出或使用其他条件来解析结果。</li>
+</ul>
+<p>为了简化现有模板扩展过程,模板包含专用于每个功能的方法。如果您已经改进了现有模板的设计,我们建议您为 VTS 代码库做出贡献。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/automotive/camera-hal.html b/zh-cn/devices/automotive/camera-hal.html
index a6b76b93..b45be78e 100644
--- a/zh-cn/devices/automotive/camera-hal.html
+++ b/zh-cn/devices/automotive/camera-hal.html
@@ -26,7 +26,7 @@
<h2 id="system-components">系统组件</h2>
<p>EVS 包括以下系统组件:</p>
-<img src="/devices/automotive/images/vhal_evs_components.png" alt="EVS 系统组件图。"/>
+<img src="/devices/automotive/images/vhal_evs_components.png" alt="EVS 系统组件示意图。"/>
<figcaption><strong>图 1</strong> EVS 系统组件概览。</figcaption>
<h3 id="evs-application">EVS 应用</h3>
@@ -279,7 +279,7 @@ enum DisplayState : uint32 {
<p>EVS 管理器实现与底层 HAL 驱动程序相同的 API,并通过支持多个并发客户端来提供扩展服务(多个客户端可以通过 EVS 管理器打开相机并接收视频流)。</p>
<figure id="evs-manager">
-<img src="/devices/automotive/images/vhal_evs_manager.png" alt="EVS 管理器和 EVS 硬件 API 图。"/>
+<img src="/devices/automotive/images/vhal_evs_manager.png" alt="EVS 管理器和 EVS 硬件 API 示意图。"/>
<figcaption><strong>图 2.</strong> EVS 管理器镜像底层 EVS 硬件 API</figcaption>
</figure>
diff --git a/zh-cn/devices/graphics/build-tests.html b/zh-cn/devices/graphics/build-tests.html
index 1bd2ce0b..8e67072b 100644
--- a/zh-cn/devices/graphics/build-tests.html
+++ b/zh-cn/devices/graphics/build-tests.html
@@ -41,7 +41,7 @@
<tr>
<td><code>DEQP_TARGET</code></td>
<td><p>目标名称,例如“android”</p>
-<p>deqp CMake 脚本将包含文件 <code>targets/<var>DEQP_TARGET</var>/<var>DEQP_TARGET</var>.cmake</code>,而且这里应该可以找到针对特定目标的编译选项。</p>
+<p>deqp CMake 脚本将包含文件 <code>targets/<var>DEQP_TARGET</var>/<var>DEQP_TARGET</var>.cmake</code>,而且该文件中应该存在针对特定目标的编译选项。</p>
</td>
</tr>
<tr>
@@ -60,7 +60,7 @@
<p>针对新目标的 deqp 编译系统使用目标编译文件进行配置。目标编译文件可定义该平台支持哪些功能以及需要哪些库或其他包含路径。目标文件名遵循 <code>targets/<var>NAME</var>/<var>NAME</var>.cmake</code> 格式,且选择目标时会用到 <code>DEQP_TARGET</code> 编译参数。</p>
-<p>目标文件中的文件路径是相对于基本的 <code>deqp</code> 目录(而非 <code>targets/<var>NAME</var></code> 目录)的。目标编译文件可以设置以下标准变量。</p>
+<p>目标文件中的文件路径是相对于基本 <code>deqp</code> 目录(而非 <code>targets/<var>NAME</var></code> 目录)的。目标编译文件可以设置以下标准变量。</p>
<table>
<tbody><tr>
@@ -196,7 +196,7 @@ cmake path\to\src\deqp -G "Visual Studio 12 Win64"
<p>Ant 和 SDK 二进制文件的位置取决于具有特定覆盖默认值的 PATH 环境变量。具体逻辑由 <code>android/scripts/common.py</code> 控制。</p>
-<p>NDK 目录必须为 <code>~/android-ndk-<var>VERSION</var></code> 或 <code>C:/android/android-ndk-<var>VERSION</var></code>,或者通过 <code>ANDROID_NDK_PATH</code> 环境变量进行指定。</p>
+<p>NDK 目录必须为 <code>~/android-ndk-<var>VERSION</var></code> 或 <code>C:/android/android-ndk-<var>VERSION</var></code>,或者通过 <code>ANDROID_NDK_PATH</code> 环境变量进行定义。</p>
<p>Deqp 设备组件、测试执行服务和测试程序均通过执行 <code>android/scripts/build.py</code> 脚本进行编译。最终 .apk 在 <code>android/package/bin</code> 中创建,并可通过 <code>install.py</code> 脚本进行安装。如果使用<a href="port-tests.html#test_execution_service">命令行执行程序</a>,则可以在设备上通过 ADB 使用 <code>launch.py</code> 脚本启动 ExecService。这些脚本可以从任何目录执行。</p>
diff --git a/zh-cn/devices/graphics/index.html b/zh-cn/devices/graphics/index.html
index 067d2c2a..e0b7d6b3 100644
--- a/zh-cn/devices/graphics/index.html
+++ b/zh-cn/devices/graphics/index.html
@@ -26,11 +26,11 @@
<p>应用开发者可通过两种方式将图像绘制到屏幕上:使用 Canvas 或 OpenGL。有关 Android 图形组件的详细说明,请参阅<a href="/devices/graphics/architecture.html">系统级图形架构</a>。</p>
-<p><a href="http://developer.android.com/reference/android/graphics/Canvas.html">android.graphics.Canvas</a> 是一个 2D 图形 API,而且是最受开发者群体青睐的图形 API。Canvas 运算会在 Android 中绘制所有原生和自定义 <a href="http://developer.android.com/reference/android/view/View.html">android.view.View</a>。在 Android 中,Canvas API 通过一个名为 OpenGLRenderer 的绘制库实现硬件加速,该绘制库将 Canvas 运算转换为 OpenGL 运算,以便它们可以在 GPU 上执行。</p>
+<p><a href="http://developer.android.com/reference/android/graphics/Canvas.html">android.graphics.Canvas</a> 是一个 2D 图形 API,而且是最受开发者群体青睐的图形 API。Canvas 运算可在 Android 中绘制所有原生和自定义 <a href="http://developer.android.com/reference/android/view/View.html">android.view.View</a>。在 Android 中,Canvas API 通过一个名为 OpenGLRenderer 的绘制库实现硬件加速,该绘制库将 Canvas 运算转换为 OpenGL 运算,以便它们可以在 GPU 上执行。</p>
<p>从 Android 4.0 开始,硬件加速的 Canvas 默认情况下处于启用状态。因此,支持 OpenGL ES 2.0 的硬件 GPU 对于 Android 4.0 及更高版本的设备来说是强制要求。有关硬件加速绘制路径的工作原理及其行为与软件绘制路径行为之间的差异的说明,请参阅<a href="https://developer.android.com/guide/topics/graphics/hardware-accel.html">硬件加速指南</a>。</p>
-<p>除了 Canvas,开发者渲染图形的另一个主要方式是使用 OpenGL ES 直接渲染到 Surface。Android 在 <a href="http://developer.android.com/reference/android/opengl/package-summary.html">Android.opengl</a> 软件包中提供 OpenGL ES 接口,开发者可以使用这些接口通过 SDK 或原生 API(在 <a href="https://developer.android.com/tools/sdk/ndk/index.html">Android NDK</a> 中提供)来调用其 GL 实现。</p>
+<p>除了 Canvas,开发者渲染图形的另一个主要方式是使用 OpenGL ES 直接渲染到 Surface。Android 会在 <a href="http://developer.android.com/reference/android/opengl/package-summary.html">Android.opengl</a> 软件包中提供 OpenGL ES 接口,开发者可以使用这些接口通过 SDK 或原生 API(在 <a href="https://developer.android.com/tools/sdk/ndk/index.html">Android NDK</a> 中提供)来调用其 GL 实现。</p>
<p>Android 实现人员可以使用 <a href="testing.html">drawElements 质量计划</a>(也称为 deqp)来测试 OpenGL ES 功能。</p>
diff --git a/zh-cn/devices/storage/index.html b/zh-cn/devices/storage/index.html
index 1025962c..386026c9 100644
--- a/zh-cn/devices/storage/index.html
+++ b/zh-cn/devices/storage/index.html
@@ -23,7 +23,7 @@
<img style="float: right; margin: 0px 15px 15px 15px;" src="images/ape_fwk_hal_extstor.png" alt="Android 外部存储设备 HAL 图标"/>
<p>Android 一直在不断发展,可支持各种存储设备类型和功能。所有 Android 版本均支持配有<a href="/devices/storage/traditional.html">传统存储</a>(包括便携式存储和内置存储)的设备。便携式存储是指物理介质(如 SD 卡或 USB 设备),用于进行临时数据传输/文件存储。<em></em>物理介质可以随设备一起保留更长时间,但并非固定在设备上,可以移除。自 Android 1.0 开始,SD 卡已可用作便携式存储;Android 6.0 增加对 USB 的支持。“内置”存储可通过将部分内部存储暴露于模拟层来实现存储,并且从 Android 3.0 开始便已支持此功能。<em></em></p>
-<p>从 Android 6.0 开始,Android 支持<a href="/devices/storage/adoptable.html">可合并的<em></em>存储</a>设备,这类存储设备是指可以像内部存储设备一样进行加密和格式化的物理介质(例如 SD 卡或 USB 设备)。移动存储设备可存储各类应用数据。</p>
+<p>从 Android 6.0 开始,Android 支持<a href="/devices/storage/adoptable.html">可合并的<em></em>存储</a>设备,这种存储设备是指可以像内部存储设备那样进行加密和格式化的物理介质(例如 SD 卡或 USB 设备)。移动存储设备可存储各类应用数据。</p>
<h2 id="permissions">权限</h2>
<p>采用各种 Android 权限保护对外部存储设备的访问。从 Android 1.0 开始,采用 <code>WRITE_EXTERNAL_STORAGE</code> 权限保护写入访问。从 Android 4.1 开始,采用 <code>READ_EXTERNAL_STORAGE</code> 权限保护读取访问。</p>
diff --git a/zh-cn/devices/tech/admin/provision.html b/zh-cn/devices/tech/admin/provision.html
index 46b73ed1..c8bc21e9 100644
--- a/zh-cn/devices/tech/admin/provision.html
+++ b/zh-cn/devices/tech/admin/provision.html
@@ -55,7 +55,7 @@
<p>资料所有者配置假定设备的用户(而不是公司 IT 部门)监督设备管理。要启用资料所有者配置,您必须发送包含相应附加内容的 intent。例如,使用 TestDPC 应用(<a href="https://play.google.com/store/apps/details?id=com.afwsamples.testdpc&hl=zh-cn">从 Google Play 下载</a>或<a href="https://github.com/googlesamples/android-testdpc/">从 GitHub 编译</a>)。在设备上安装 TestDPC,从启动器启动该应用,然后按照应用说明进行操作。启动器抽屉式导航栏中出现带有标记的图标时,则表示配置完成。</p>
-<p>移动设备管理 (MDM) 应用会通过发送包含以下操作的 intent 来触发受管理资料的创建:<a href="https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/admin/DevicePolicyManager.java">DevicePolicyManager.ACTION_PROVISION_MANAGED_PROFILE</a>。以下是触发受管理资料创建并将 DeviceAdminSample 设为资料所有者的示例 intent:</p>
+<p>移动设备管理 (MDM) 应用会发送包含以下操作的 intent,从而触发受管理资料的创建流程:<a href="https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/admin/DevicePolicyManager.java">DevicePolicyManager.ACTION_PROVISION_MANAGED_PROFILE</a>。以下是触发受管理资料创建并将 DeviceAdminSample 设为资料所有者的示例 intent:</p>
<pre class="devsite-click-to-copy">
<code class="devsite-terminal">adb shell am start -a android.app.action.PROVISION_MANAGED_PROFILE \
diff --git a/zh-cn/devices/tech/connect/block-numbers.html b/zh-cn/devices/tech/connect/block-numbers.html
index c7232819..7009b21d 100644
--- a/zh-cn/devices/tech/connect/block-numbers.html
+++ b/zh-cn/devices/tech/connect/block-numbers.html
@@ -112,7 +112,7 @@ getContentResolver().delete(uri, null, null);
</p>
<p>
-如果设备之前具有呼叫/短信限制功能,请调整相应功能,以便所有严格匹配的被屏蔽电话号码都存储在于 <code>BlockedNumberProvider,</code>并且围绕该提供程序的行为满足 Android 兼容性定义文档 (CDD) 中针对此功能的要求。<em></em>
+如果设备在之前出厂时就具备了呼叫/短信限制功能,请调整相应功能,这样一来,所有严格匹配的被屏蔽电话号码都会存储在 <code>BlockedNumberProvider,</code> 中,围绕该提供程序发生的行为也能满足 Android 兼容性定义文档 (CDD) 中针对此功能列出的要求。<em></em>
</p>
<p>
diff --git a/zh-cn/devices/tech/dalvik/gc-debug.html b/zh-cn/devices/tech/dalvik/gc-debug.html
index d6258b70..565dba10 100644
--- a/zh-cn/devices/tech/dalvik/gc-debug.html
+++ b/zh-cn/devices/tech/dalvik/gc-debug.html
@@ -37,7 +37,7 @@
<ul>
<li>与 Dalvik 相比,暂停次数从 2 次减少到 1 次。Dalvik 的第一次暂停主要是为了进行根标记,即在 ART 中进行并发标记,让线程标记自己的根,然后马上恢复运行。
</li><li>与 Dalvik 类似,ART GC 在清除过程开始之前也会暂停 1 次。两者在这方面的主要差异在于:在此暂停期间,某些 Dalvik 环节在 ART 中并发进行。这些环节包括 <code>java.lang.ref.Reference</code> 处理、系统弱清除(例如,jni 弱全局等)、重新标记非线程根和卡片预清理。在 ART 暂停期间仍进行的阶段包括扫描脏卡片以及重新标记线程根,这些操作有助于缩短暂停时间。
- </li><li>相对于 Dalvik,ART GC 改进的最后一个方面是粘性 CMS 回收器增加了 GC 吞吐量。不同于普通的分代 GC,粘性 CMS 不移动。年轻对象被保存在一个分配堆栈(基本上是 <code>java.lang.Object</code> 数组)中,而非为其设置一个专用区域。这样可以避免移动所需的对象以维持低暂停次数,但缺点是容易在堆栈中加入大量复杂对象图像而使堆栈变长。
+ </li><li>相对于 Dalvik,ART GC 改进的最后一个方面是粘性 CMS 回收器增加了 GC 吞吐量。不同于普通的分代 GC,粘性 CMS 不移动。年轻对象会被保存在一个分配堆栈(基本上是 <code>java.lang.Object</code> 数组)中,而非为其设置一个专用区域。这样可以避免移动所需的对象以维持低暂停次数,但缺点是容易在堆栈中加入大量复杂对象图像而使堆栈变长。
</li></ul>
<p>ART GC 与 Dalvik 的另一个主要区别在于 ART GC 引入了移动垃圾回收器。使用移动 GC 的目的在于通过堆压缩来减少后台应用使用的内存。目前,触发堆压缩的事件是 ActivityManager 进程状态的改变。当应用转到后台运行时,它会通知 ART 已进入不再“感知”卡顿的进程状态。此时 ART 会进行一些操作(例如,压缩和监视器压缩),从而导致应用线程长时间暂停。目前正在使用的两个移动 GC 是同构空间压缩和半空间压缩。</p>
diff --git a/zh-cn/devices/tech/datausage/kernel-overview.html b/zh-cn/devices/tech/datausage/kernel-overview.html
index 0266e3a0..82ad62f7 100644
--- a/zh-cn/devices/tech/datausage/kernel-overview.html
+++ b/zh-cn/devices/tech/datausage/kernel-overview.html
@@ -20,10 +20,10 @@
limitations under the License.
-->
-<p>基于应用/授权数据使用情况的监控和跟踪功能依赖于 Android 3.0 的 Linux 内核 (<code>kernel/net/netfilter/xt_qtaguid</code>) 中的 xt_qtaguid 模块来实现。框架 (<code>system/core/libcutils/qtaguid.c</code>) 中的套接字标记功能的实现主要依赖于从内核模块 <code>xt_qtaguid</code> 中导出到 <code>/proc/net/xt_qtaguid/ctrl</code> 的接口的存在。</p>
-<p><code>quota2</code> netfilter 模块(最初是属于 <code>xtables-addons</code>)可支持设置指定的配额限制的功能;此外,经过扩展后,该模块还可支持在达到特定配额限制时通知用户空间。一旦达到配额限制,<code>quota2</code> 模块将丢弃所有的后续网络流量。该框架还可以指定额外的规则来限制应用的后台数据流量(请参阅 <code>com.android.server.NetworkManagementSocketTagger.setKernelCounterSet</code> 和 <code>android.net.NetworkPolicyManager.POLICY_REJECT_METERED_BACKGROUND</code>)。</p>
+<p>基于应用/委托的流量使用情况监控和跟踪功能依赖于 Android 3.0 的 Linux 内核 (<code>kernel/net/netfilter/xt_qtaguid</code>) 中的 xt_qtaguid 模块来实现。框架 (<code>system/core/libcutils/qtaguid.c</code>) 中的套接字标记功能的实现主要依赖于从内核模块 <code>xt_qtaguid</code> 中导出到 <code>/proc/net/xt_qtaguid/ctrl</code> 的接口的存在。</p>
+<p><code>quota2</code> netfilter 模块(最初是属于 <code>xtables-addons</code>)为设置指定的配额限制的功能提供了支持;此外,经过扩展后,该模块还可支持在达到特定配额限制时通知用户空间。一旦达到配额限制,<code>quota2</code> 模块将丢弃所有的后续网络流量。该框架还可以指定额外的规则来限制应用的后台数据流量(请参阅 <code>com.android.server.NetworkManagementSocketTagger.setKernelCounterSet</code> 和 <code>android.net.NetworkPolicyManager.POLICY_REJECT_METERED_BACKGROUND</code>)。</p>
<h1 id="how-does-it-work">工作原理</h1>
-<p><code>qtaguid</code> netfilter 模块使用应用的专属 UID,按套接字对每个应用的网络流量进行跟踪。系统中有两个标签组件与套接字相关联。第一个是 UID,用来明确标识进行数据传输的应用(Linux 允许将每个网络套接字的所有权与调用应用的 UID 相关联)。第二个标签组件用于支持附加于流量上的开发者指定的类别描述。应用可使用这些应用级标签,将流量归类到若干子类别。</p>
+<p><code>qtaguid</code> netfilter 模块使用应用的专属 UID,按套接字对每个应用的网络流量进行跟踪。系统中有两个标记组件与套接字相关联。第一个是 UID,用来明确标识进行数据传输的应用(Linux 允许将每个网络套接字的所有权与调用应用的 UID 相关联)。第二个标记组件用于支持附加于流量上的开发者指定的类别描述。应用可使用这些应用级标记,将流量归类到若干子类别。</p>
<p>当应用以服务(如下载管理器、媒体流式传输服务等)的方式传输网络数据时,可通过调用 <code>TrafficStats.setThreadStatsUid()</code> 函数将传输作业的所有权与发出请求的应用的 UID 相关联。调用程序必须具备“<code>android.permission.MODIFY_NETWORK_ACCOUNTING</code>”权限才能重新分配网络流量的所有权。</p>
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/tech/debug/sanitizers.html b/zh-cn/devices/tech/debug/sanitizers.html
index 7d073231..dfd25ddc 100644
--- a/zh-cn/devices/tech/debug/sanitizers.html
+++ b/zh-cn/devices/tech/debug/sanitizers.html
@@ -37,7 +37,7 @@ Android 编译版本最好在启用排错程序(如 AddressSanitizer 和 Undef
<li>释放后再使用</li>
</ul>
<p>
-Android 允许在完整编译级别和在<a href="/devices/tech/debug/asan">应用级别</a>通过 asanwrapper 进行 <a href="/devices/tech/debug/asan#addresssanitizer_in_the_apps">ASan instrumentation</a>。
+Android 允许在完整编译级别和在<a href="/devices/tech/debug/asan#addresssanitizer_in_the_apps">应用级别</a>通过 asanwrapper 进行 <a href="/devices/tech/debug/asan">ASan instrumentation</a>。
</p>
<p>
AddressSanitizer 对所有与内存相关的函数调用(包括 alloca、malloc 和 free)进行插桩,并使用被读取或写入时会触发 ASan 回调的内存填充所有变量和已分配的内存区域。
diff --git a/zh-cn/devices/tech/display/adaptive-icons.html b/zh-cn/devices/tech/display/adaptive-icons.html
index c28254b9..2c025a60 100644
--- a/zh-cn/devices/tech/display/adaptive-icons.html
+++ b/zh-cn/devices/tech/display/adaptive-icons.html
@@ -35,9 +35,12 @@
开发者文档:
</p><ul>
- <li><a href="https://developer.android.com/preview/features/adaptive-icons.html">https://developer.android.com/preview/features/adaptive-icons.html</a>
- </li><li><a href="https://developer.android.com/reference/android/graphics/drawable/AdaptiveIconDrawable.html">https://developer.android.com/reference/android/graphics/drawable/AdaptiveIconDrawable.html</a>
- </li><li><a href="https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithAdaptiveBitmap(android.graphics.Bitmap)">https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithAdaptiveBitmap(android.graphics.Bitmap)</a></li></ul>
+ <li><a href="https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive">
+ https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive</a>
+ </li><li><a href="https://developer.android.com/reference/android/graphics/drawable/AdaptiveIconDrawable.html">
+ https://developer.android.com/reference/android/graphics/drawable/AdaptiveIconDrawable.html</a>
+ </li><li><a href="https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithAdaptiveBitmap(android.graphics.Bitmap)">
+ https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithAdaptiveBitmap(android.graphics.Bitmap)</a></li></ul>
<p>
源代码:
@@ -48,7 +51,7 @@
要更改平台上图标的形状,请替换 <code>framework/base/core/res/res/values/config.xml</code> 中的一个字符串,如下所示:</p>
<pre class="prettyprint">&lt;!-- Specifies the path that is used by AdaptiveIconDrawable class to crop launcher icons. --&gt;
- &lt;string name="config_icon_mask" translatable="false"&gt;"M50,0L100,0 100,100 0,100 0,0z"&lt;/string&gt;</pre>
+ &lt;string name="config_icon_mask" translatable="false"&gt;"M50,0L100,0 100,100 0,100 0,0z"&lt;/string&gt;</pre>
<p>
该字符串的格式和语法均遵循<a href="https://www.w3.org/TR/SVG/paths.html">路径定义的 W3-SVG 标准</a>。Android 矢量可绘制资源也支持 PathData 的这种格式。
</p>
@@ -64,22 +67,22 @@
<pre class="prettyprint">package android.graphics.drawable;
public class AdaptiveIconDrawable extends Drawable implements Drawable.Callback {
- method public Drawable getBackground();
- method public Drawable getForeground();
- method public Path getIconMask();
- method public Region getSafeZone();
- method public float getExtraInsetFraction();
- method public int getOpacity();
- method public void invalidateDrawable(Drawable);
- method public void scheduleDrawable(Drawable, Runnable, long);
- method public void setAlpha(int);
- method public void setColorFilter(ColorFilter);
- method public void setOpacity(int);
- method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
+ method public Drawable getBackground();
+ method public Drawable getForeground();
+ method public Path getIconMask();
+ method public Region getSafeZone();
+ method public float getExtraInsetFraction();
+ method public int getOpacity();
+ method public void invalidateDrawable(Drawable);
+ method public void scheduleDrawable(Drawable, Runnable, long);
+ method public void setAlpha(int);
+ method public void setColorFilter(ColorFilter);
+ method public void setOpacity(int);
+ method public void unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable);
}</pre>
<pre class="prettyprint">public class Icon extends Parceleable {
- method public Bitmap createWithAdaptiveBitmap();
+ method public Bitmap createWithAdaptiveBitmap();
}</pre>
<h2>参考实现</h2>
<p>
diff --git a/zh-cn/devices/tech/ota/ab/index.html b/zh-cn/devices/tech/ota/ab/index.html
index 54f698d9..b6739ca0 100644
--- a/zh-cn/devices/tech/ota/ab/index.html
+++ b/zh-cn/devices/tech/ota/ab/index.html
@@ -20,12 +20,13 @@
limitations under the License.
-->
- <p>A/B 系统更新(也称为无缝更新)的目标是确保在<a href="/devices/tech/ota/index.html">无线下载 (OTA) 更新</a>期间在磁盘上保留一个可正常启动和使用的系统。采用这种方式可以降低更新之后设备无法启动的可能性,这意味着用户需要将设备送到维修和保修中心进行更换和刷机的情况将会减少。其他某些商业级操作系统(例如 <a href="https://www.chromium.org/chromium-os">ChromeOS</a>)也成功运用了 A/B 更新机制。
+ <p>A/B 系统更新(也称为无缝更新)的目标是确保在<a href="/devices/tech/ota/index.html">无线下载 (OTA) 更新</a>期间在磁盘上保留一个可正常启动和使用的系统。采用这种方式可以降低更新之后设备无法启动的可能性,这意味着用户需要将设备送到维修和保修中心进行更换和刷机的情况将会减少。其他某些商业级操作系统(例如 <a href="https://www.chromium.org/chromium-os">ChromeOS</a>)也成功使用了 A/B 更新机制。
</p>
<p>要详细了解 A/B 系统更新,请参见<a href="#slots">分区选择(槽位)</a>一节。
+ </p>
- </p><p>A/B 系统更新可带来以下好处:</p>
+ <p>A/B 系统更新可带来以下好处:</p>
<ul>
<li>
@@ -116,7 +117,7 @@ A/B 系统更新使用两组称为槽位(通常是槽位 A 和槽位 B)的
</p>
<p>
-此外,每个槽位还都有一个由用户空间设置的“成功”属性,仅当相应槽位处于可启动状态时,该属性才具有相关性。<em></em>被标记为成功的槽位应该能够自行启动、运行和更新。未被标记为成功的可启动槽位(多次尝试使用它启动之后)应由引导加载程序标记为不可启动,其中包括将活动槽位更改为另一个可启动的槽位(通常是更改为在尝试启动到新的活动槽位之前正在运行的槽位)。关于相应接口的具体详细信息在<code><a href="https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/boot_control.h" class="external-link">
+此外,每个槽位还都有一个由用户空间设置的“成功”属性,仅当相应槽位处于可启动状态时,该属性才具有相关性。<em></em>被标记为成功的槽位应该能够自行启动、运行和更新。未被标记为成功的可启动槽位(多次尝试使用它启动之后)应由引导加载程序标记为不可启动,其中包括将活动槽位更改为另一个可启动的槽位(通常是更改为在尝试启动到新的活动槽位之前正在运行的槽位)。关于相应接口的具体详细信息在 <code><a href="https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/boot_control.h" class="external-link">
boot_control.h</a></code> 中进行了定义。
</p>
@@ -180,7 +181,7 @@ A/B 系统更新过程会使用名为 <code>update_engine</code> 的后台守护
更改 594637</a></li>
</ul>
- <p>这些更改会将最新的 <code>update_engine</code> 日志的副本保存到 <code>/data/misc/update_engine_log/update_engine.<var>YEAR</var>-<var>TIME</var></code>。除当前日志以外,最近的五个日志也会保存在 <code>/data/misc/update_engine_log/</code> 下方。拥有<strong>日志</strong>组 ID 的用户将能够访问相应的文件系统日志。</p>
+ <p>这些更改会将最新的 <code>update_engine</code> 日志的副本保存到 <code>/data/misc/update_engine_log/update_engine.<var>YEAR</var>-<var>TIME</var></code>。除当前日志以外,最近的五个日志也会保存在 <code>/data/misc/update_engine_log/</code> 下。拥有<strong>日志</strong>组 ID 的用户将能够访问相应的文件系统日志。</p>
<h3 id="bootloader-interactions">引导加载程序交互</h3>
@@ -302,7 +303,7 @@ OTA 更新包本身所含的元数据可能会指示可进行流式更新,在
<tr>
<td>8</td>
<td>
-安装后步骤(如下所述)包括从“新更新”版本中运行仍在旧版本中运行的程序。如果此步骤已在 OTA 更新包中定义,则为<strong>强制性</strong>步骤,且程序必须返回并显示退出代码 <code>0</code>,否则更新失败。
+安装后步骤(如下所述)包括从“新更新”版本中运行仍在旧版本中运行的程序。如果此步骤已在 OTA 更新包中定义,则为<strong>强制性</strong>步骤,且程序必须返回并显示退出代码 <code>0</code>,否则更新会失败。
</td>
</tr>
<tr><td>9</td>
diff --git a/zh-cn/devices/tech/power/component.html b/zh-cn/devices/tech/power/component.html
index c94c09c8..0c019c0c 100644
--- a/zh-cn/devices/tech/power/component.html
+++ b/zh-cn/devices/tech/power/component.html
@@ -146,7 +146,7 @@ adb shell cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
<p><code>wifi.on</code> 值测量 Wi-Fi 在启用但未主动发送或接收数据的状态下的功耗。该值通常是测量系统挂起(休眠)状态下启用/禁用 Wi-Fi 之间产生的电流增量。</p>
-<p><code>wifi.scan</code> 值可用于测量 WLAN 接入点扫描过程中的功耗。应用可以使用 WifiManager 类 <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.html"><code>startScan()</code>API</a> 来触发 WLAN 扫描。您也可以依次打开“设置”&gt;“WLAN”,这样 WLAN 每隔几秒钟就会执行一次接入点扫描,扫描过程中功耗会明显上升,但您必须从这些测量值中减去屏幕功耗。</p>
+<p><code>wifi.scan</code> 值可用于测量 WLAN 接入点扫描过程中的功耗。应用可以使用 WifiManager 类 <a href="http://developer.android.com/reference/android/net/wifi/WifiManager.html"><code>startScan()</code>API</a> 来触发 WLAN 扫描。您也可以依次打开“设置”&gt;“WLAN”,这样 WLAN 每隔几秒钟就会执行一次接入点扫描,而且扫描过程中功耗会明显上升,但您必须从这些测量值中减去屏幕功耗。</p>
<p class="note">
<strong>注意</strong>:请使用受控设置(如 <a href="http://en.wikipedia.org/wiki/Iperf">iperf</a>)来生成网络收发流量。</p>
diff --git a/zh-cn/devices/tv/index.html b/zh-cn/devices/tv/index.html
index 997ca2b6..9a9db82c 100644
--- a/zh-cn/devices/tv/index.html
+++ b/zh-cn/devices/tv/index.html
@@ -159,7 +159,7 @@
<img src="images/TIF_PIP-PAP.png" alt="Android TV KeyEvent"/>
<p class="img-caption"><strong>图 6.</strong> Android TV KeyEvent</p>
-<p>上图显示了遥控器上的按钮事件如何传递到特定的 TV Input,从而实现画中画 (PIP) 显示。按下按钮的操作由设备制造商提供的硬件驱动程序进行解析,从而将硬件扫描码转换为 Android 键码,并将它们作为 <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a> 传递到标准的 Android <a href="/devices/input/overview.html">输入管道</a> <code>InputReader</code> 和 <code>InputDispatcher</code> 函数。当 TV 应用获得焦点时,它们就会在 TV 应用上触发事件。</p>
+<p>上图显示了遥控器上的按钮事件如何传递到特定的 TV Input,从而实现画中画 (PIP) 显示。这些按下按钮的操作由设备制造商提供的硬件驱动程序进行解析,从而将硬件扫描码转换为 Android 键码,并将它们作为 <a href="http://developer.android.com/reference/android/view/KeyEvent.html">KeyEvent</a> 传递到标准的 Android <a href="/devices/input/overview.html">输入管道</a> <code>InputReader</code> 和 <code>InputDispatcher</code> 函数。当 TV 应用获得焦点时,它们就会在 TV 应用上触发事件。</p>
<p>只有系统 TV Input 才有资格接收 <code>InputEvents</code>(前提是这些系统 TV Input 具有 <code>RECEIVE_INPUT_EVENT</code> 系统权限)。TV Input 负责确定要消耗哪些 InputEvent,并允许 TV 应用处理它不需要消耗的按键。</p>
@@ -421,6 +421,6 @@
</li><li>广播应用获得 TV 应用中的焦点,并处理用户操作。
</li></ol>
-<p>对于语音搜索/推荐功能,广播应用可能支持以语音搜索的方式进行应用内搜索。</p>
+<p>对于语音搜索/推荐功能,广播应用可以支持以语音搜索的方式进行应用内搜索。</p>
</body></html> \ No newline at end of file
diff --git a/zh-cn/license.html b/zh-cn/license.html
index 619a5a39..5553a9c4 100644
--- a/zh-cn/license.html
+++ b/zh-cn/license.html
@@ -45,7 +45,7 @@
<ul>
<li>尽管我们根据 Apache 2.0 许可向您提供文档本身,但请注意,该许可并未涵盖专有商标和品牌特征。</li>
-<li>该许可未涵盖 Google 的商标和其他品牌特征(包括 <img src="https://developer.android.com/images/android-logo.png" alt="Android" style="margin:0;padding:0 2px;vertical-align:baseline"/> 这种特殊样式的字体徽标)。要了解这种使用情况的相关信息,请参阅<a href="https://developer.android.com/distribute/marketing-tools/brand-guidelines.html">品牌推广指南</a>。</li>
+<li>该许可未涵盖 Google 的商标和其他品牌特征(包括 <img src="https://developer.android.com/images/android-logo.png" alt="Android" style="margin:0;padding:0 2px;vertical-align:baseline"/> 这种特殊字体样式的徽标)。要了解与这方面的使用相关的信息,请参阅<a href="https://developer.android.com/distribute/marketing-tools/brand-guidelines.html">品牌推广指南</a>。</li>
<li>在某些情况下,网页中可能会包含该许可未涵盖的内容(例如图片)。在这种情况下,我们会为未许可的内容添加标签。</li>
diff --git a/zh-cn/security/bulletin/pixel/2017.html b/zh-cn/security/bulletin/pixel/2017.html
index 34afbcb8..c84f34f0 100644
--- a/zh-cn/security/bulletin/pixel/2017.html
+++ b/zh-cn/security/bulletin/pixel/2017.html
@@ -37,11 +37,11 @@
<td><a href="/security/bulletin/pixel/2017-12-01.html">2017 年 12 月</a></td>
<td>
<a href="/security/bulletin/pixel/2017-12-01.html">English</a> /
- <a href="/security/bulletin/pixel/2017-12-01.html?hl=ja">日本語</a> /
- <a href="/security/bulletin/pixel/2017-12-01.html?hl=ko">한국어</a> /
- <a href="/security/bulletin/pixel/2017-12-01.html?hl=ru">ру́сский</a> /
- <a href="/security/bulletin/pixel/2017-12-01.html?hl=zh-cn">中文(中国)</a> /
- <a href="/security/bulletin/pixel/2017-12-01.html?hl=zh-tw">中文(台湾)</a>
+ <a href="/security/bulletin/pixel/2017-12-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/pixel/2017-12-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/pixel/2017-12-01.html?hl=ru">ру́сский</a> /
+ <a href="/security/bulletin/pixel/2017-12-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/pixel/2017-12-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>2017 年 12 月 4 日</td>
<td>2017-12-05</td>
@@ -50,11 +50,11 @@
<td><a href="/security/bulletin/pixel/2017-11-01.html">2017 年 11 月</a></td>
<td>
<a href="/security/bulletin/pixel/2017-11-01.html">English</a> /
- <a href="/security/bulletin/pixel/2017-11-01.html?hl=ja">日本語</a> /
- <a href="/security/bulletin/pixel/2017-11-01.html?hl=ko">한국어</a> /
- <a href="/security/bulletin/pixel/2017-11-01.html?hl=ru">ру́сский</a> /
- <a href="/security/bulletin/pixel/2017-11-01.html?hl=zh-cn">中文(中国)</a> /
- <a href="/security/bulletin/pixel/2017-11-01.html?hl=zh-tw">中文(台湾)</a>
+ <a href="/security/bulletin/pixel/2017-11-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/pixel/2017-11-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/pixel/2017-11-01.html?hl=ru">ру́сский</a> /
+ <a href="/security/bulletin/pixel/2017-11-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/pixel/2017-11-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>2017 年 11 月 6 日</td>
<td>2017-11-05</td>
@@ -63,11 +63,11 @@
<td><a href="/security/bulletin/pixel/2017-10-01.html">2017 年 10 月</a></td>
<td>
<a href="/security/bulletin/pixel/2017-10-01.html">English</a> /
- <a href="/security/bulletin/pixel/2017-10-01.html?hl=ja">日本語</a> /
- <a href="/security/bulletin/pixel/2017-10-01.html?hl=ko">한국어</a> /
- <a href="/security/bulletin/pixel/2017-10-01.html?hl=ru">ру́сский</a> /
- <a href="/security/bulletin/pixel/2017-10-01.html?hl=zh-cn">中文(中国)</a> /
- <a href="/security/bulletin/pixel/2017-10-01.html?hl=zh-tw">中文(台湾)</a>
+ <a href="/security/bulletin/pixel/2017-10-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/pixel/2017-10-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/pixel/2017-10-01.html?hl=ru">ру́сский</a> /
+ <a href="/security/bulletin/pixel/2017-10-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/pixel/2017-10-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>2017 年 10 月 2 日</td>
<td>2017-10-05</td>
diff --git a/zh-cn/security/encryption/full-disk.html b/zh-cn/security/encryption/full-disk.html
index 989f8dfb..f1e4e321 100644
--- a/zh-cn/security/encryption/full-disk.html
+++ b/zh-cn/security/encryption/full-disk.html
@@ -25,7 +25,7 @@
<p>全盘加密是在 Android 4.4 版中引入的,不过 Android 5.0 中又引入了以下新功能:</p>
<ul>
<li>新增了快速加密方式,这种加密方式只会对数据分区中已使用的分块进行加密,以免首次启动用时过长。目前只有 EXT4 和 F2FS 文件系统支持快速加密。
- </li><li>添加了 <a href="/devices/storage/config.html"><code>forceencrypt</code> fstab 标记</a>,以便在首次启动时进行加密。
+ </li><li>添加了 <a href="/devices/storage/config.html"><code>forceencrypt</code>fstab 标记</a>,以便在首次启动时进行加密。
</li><li>添加了对解锁图案和无密码加密的支持。
</li><li>添加了由硬件支持的加密密钥存储空间,该空间使用可信执行环境(TEE,例如 TrustZone)的签名功能。如需更多详细信息,请参阅<a href="#storing_the_encrypted_key">存储已加密的密钥</a>。
</li></ul>
@@ -134,7 +134,7 @@
<p>为了进行原地加密,<code>vold</code> 会启动一个循环来读取实际块设备中每个扇区的数据,然后将其写入到加密块设备。在读取每个扇区的数据以及将其写入到加密块设备之前,<code>vold</code> 都会先检查相应扇区是否处于使用状态。对于几乎没有什么数据的新设备来说,这种方式可以大大加快加密速度。</p>
-<p><strong>设备状态</strong>:设置 <code>ro.crypto.state = "unencrypted"</code>,并执行 <code>on nonencrypted</code> <code>init</code> 触发器以继续启动。</p>
+<p><strong>设备状态</strong>:设置 <code>ro.crypto.state = "unencrypted"</code> 并启动 <code>on nonencrypted</code> <code>init</code> 触发器以继续启动。</p>
<ol>
<li><strong>检查密码</strong>
diff --git a/zh-cn/setup/build/building-kernels.html b/zh-cn/setup/build/building-kernels.html
new file mode 100644
index 00000000..8643ece3
--- /dev/null
+++ b/zh-cn/setup/build/building-kernels.html
@@ -0,0 +1,267 @@
+<html devsite><head>
+ <title>编译内核</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>
+本页详细介绍了如何仅编译<a href="/devices/architecture/kernel/">内核</a>。以下说明假设您尚未下载整个 AOSP;如果您已完成下载,则可以跳过 <code>git clone</code> 对应的步骤,但下载内核源代码的步骤除外。
+</p>
+
+<p>本部分中的所有示例均使用 <a href="devices.html#hikey-boards">hikey</a> 内核。</p>
+
+<h2 id="figuring-out-which-kernel-to-build">选择内核</h2>
+<p>此表列出了内核源代码和二进制文件的名称及所在位置:<table>
+ <tbody><tr>
+ <th>设备</th>
+ <th>二进制文件所在的位置</th>
+ <th>源代码所在的位置</th>
+ <th>编译配置</th>
+ </tr>
+ <tr>
+ <td>taimen</td>
+ <td>device/google/wahoo-kernel</td>
+ <td>kernel/msm</td>
+ <td>wahoo_defconfig</td>
+ </tr>
+ <tr>
+ <td>walleye</td>
+ <td>device/google/wahoo-kernel</td>
+ <td>kernel/msm</td>
+ <td>wahoo_defconfig</td>
+ </tr>
+ <tr>
+ <td>easel</td>
+ <td>N/A</td>
+ <td>kernel/arm64</td>
+ <td>mnh_prod_defconfig</td>
+ </tr>
+ <tr>
+ <td>marlin</td>
+ <td>device/google/marlin-kernel</td>
+ <td>kernel/msm</td>
+ <td>marlin_defconfig</td>
+ </tr>
+ <tr>
+ <td>sailfish</td>
+ <td>device/google/marlin-kernel</td>
+ <td>kernel/msm</td>
+ <td>marlin_defconfig</td>
+ </tr>
+ <tr>
+ <td>hikey</td>
+ <td>device/linaro/hikey-kernel</td>
+ <td>kernel/hikey-linaro</td>
+ <td>hikey_defconfig</td>
+ </tr>
+ <tr>
+ <td>angler</td>
+ <td>device/huawei/angler-kernel</td>
+ <td>kernel/msm</td>
+ <td>angler_defconfig</td>
+ </tr>
+ <tr>
+ <td>bullhead</td>
+ <td>device/lge/bullhead-kernel</td>
+ <td>kernel/msm</td>
+ <td>bullhead_defconfig</td>
+ </tr>
+ <tr>
+ <td>shamu</td>
+ <td>device/moto/shamu-kernel</td>
+ <td>kernel/msm</td>
+ <td>shamu_defconfig</td>
+ </tr>
+ <tr>
+ <td>fugu</td>
+ <td>device/asus/fugu-kernel</td>
+ <td>kernel/x86_64</td>
+ <td>fugu_defconfig</td>
+ </tr>
+ <tr>
+ <td>volantis</td>
+ <td>device/htc/flounder-kernel</td>
+ <td>kernel/tegra</td>
+ <td>flounder_defconfig</td>
+ </tr>
+ <tr>
+ <td>hammerhead</td>
+ <td>device/lge/hammerhead-kernel</td>
+ <td>kernel/msm</td>
+ <td>hammerhead_defconfig</td>
+ </tr>
+ <tr>
+ <td>flo</td>
+ <td>device/asus/flo-kernel/kernel</td>
+ <td>kernel/msm</td>
+ <td>flo_defconfig</td>
+ </tr>
+ <tr>
+ <td>deb</td>
+ <td>device/asus/flo-kernel/kernel</td>
+ <td>kernel/msm</td>
+ <td>flo_defconfig</td>
+ </tr>
+ <tr>
+ <td>manta</td>
+ <td>device/samsung/manta/kernel</td>
+ <td>kernel/exynos</td>
+ <td>manta_defconfig</td>
+ </tr>
+ <tr>
+ <td>mako</td>
+ <td>device/lge/mako-kernel/kernel</td>
+ <td>kernel/msm</td>
+ <td>mako_defconfig</td>
+ </tr>
+ <tr>
+ <td>grouper</td>
+ <td>device/asus/grouper/kernel</td>
+ <td>kernel/tegra</td>
+ <td>tegra3_android_defconfig</td>
+ </tr>
+ <tr>
+ <td>tilapia</td>
+ <td>device/asus/grouper/kernel</td>
+ <td>kernel/tegra</td>
+ <td>tegra3_android_defconfig</td>
+ </tr>
+ <tr>
+ <td>maguro</td>
+ <td>device/samsung/tuna/kernel</td>
+ <td>kernel/omap</td>
+ <td>tuna_defconfig</td>
+ </tr>
+ <tr>
+ <td>toro</td>
+ <td>device/samsung/tuna/kernel</td>
+ <td>kernel/omap</td>
+ <td>tuna_defconfig</td>
+ </tr>
+ <tr>
+ <td>panda</td>
+ <td>device/ti/panda/kernel</td>
+ <td>kernel/omap</td>
+ <td>panda_defconfig</td>
+ </tr>
+ <tr>
+ <td>stingray</td>
+ <td>device/moto/wingray/kernel</td>
+ <td>kernel/tegra</td>
+ <td>stingray_defconfig</td>
+ </tr>
+ <tr>
+ <td>wingray</td>
+ <td>device/moto/wingray/kernel</td>
+ <td>kernel/tegra</td>
+ <td>stingray_defconfig</td>
+ </tr>
+ <tr>
+ <td>crespo</td>
+ <td>device/samsung/crespo/kernel</td>
+ <td>kernel/samsung</td>
+ <td>herring_defconfig</td>
+ </tr>
+ <tr>
+ <td>crespo4g</td>
+ <td>device/samsung/crespo/kernel</td>
+ <td>kernel/samsung</td>
+ <td>herring_defconfig</td>
+ </tr>
+</tbody></table>
+
+</p><p>确定要使用的设备项目之后,请查看内核二进制文件的 Git 日志。设备项目采用 <code>device/<var>VENDOR</var>/<var>NAME</var></code> 形式。</p>
+
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">git clone https://android.googlesource.com/kernel/hikey-linaro</code>
+<code class="devsite-terminal">cd hikey-linaro</code>
+<code class="devsite-terminal">git log --max-count=1 kernel</code>
+</pre>
+
+<p>内核二进制文件的提交消息中包含用于编译二进制文件的内核源代码的部分 Git 日志。该日志中的第一个条目是最新内容(也即用于编译内核的条目)。请记下提交消息,因为您在后续步骤中会用到该消息。</p>
+
+<h2 id="id-version">确定内核版本</h2>
+
+<p>要确定系统映像中使用的内核版本,请对内核文件运行以下命令:</p>
+
+<pre class="devsite-terminal devsite-click-to-copy">
+dd if=kernel bs=1 skip=$(LC_ALL=C grep -a -b -o $'\x1f\x8b\x08\x00\x00\x00\x00\x00' kernel | cut -d ':' -f 1) | zgrep -a 'Linux version'
+</pre>
+
+<p>对于 Nexus 5 (hammerhead),请运行以下命令:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+dd if=zImage-dtb bs=1 skip=$(LC_ALL=C od -Ad -x -w2 zImage-dtb | grep 8b1f | cut -d ' ' -f1 | head -1) | zgrep -a 'Linux version'
+</pre>
+
+<h2 id="downloading-sources">下载源代码</h2>
+<p>使用适当的 <code>git clone</code> 命令,下载您要编译的内核的源代码。例如,以下命令会克隆 <code>common</code> 内核(一种可自定义的通用内核):</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+git clone https://android.googlesource.com/kernel/common
+</pre>
+
+<p>内核项目的完整列表在 <a href="https://android.googlesource.com/kernel">Kernel</a> 目录下。以下是一些常用内核及其各自的 <code>git clone</code> 命令。</p>
+
+<p><code>exynos</code> 项目包含适用于 Nexus 10 的内核源代码,可用作在 Samsung Exynos 芯片组上开展相关工作的着手点。</p>
+<pre class="devsite-terminal devsite-click-to-copy">git clone https://android.googlesource.com/kernel/exynos</pre>
+
+<p><code>goldfish</code> 项目包含适用于模拟平台的内核源代码。</p>
+<pre class="devsite-terminal devsite-click-to-copy">git clone https://android.googlesource.com/kernel/goldfish</pre>
+
+<p><code>hikey-linaro</code> 项目用于 HiKey 参考板,可用作在 HiSilicon 620 芯片组上开展相关工作的着手点。</p>
+<pre class="devsite-terminal devsite-click-to-copy">git clone https://android.googlesource.com/kernel/hikey-linaro</pre>
+
+<p><code>msm</code> 项目包含适用于 ADP1、ADP2、Nexus One、Nexus 4、Nexus 5、Nexus 6、Nexus 5X、Nexus 6P、Nexus 7 (2013)、Pixel 和 Pixel XL 的源代码,可用作在 Qualcomm MSM 芯片组上开展相关工作的着手点。</p>
+<pre class="devsite-terminal devsite-click-to-copy">git clone https://android.googlesource.com/kernel/msm</pre>
+
+<p><code>omap</code> 项目用于 PandaBoard 和 Galaxy Nexus,可用作在 TI OMAP 芯片组上开展相关工作的着手点。</p>
+<pre class="devsite-terminal devsite-click-to-copy">git clone https://android.googlesource.com/kernel/omap</pre>
+
+<p><code>samsung</code> 项目用于 Nexus S,可用作在 Samsung Hummingbird 芯片组上开展相关工作的着手点。</p>
+<pre class="devsite-terminal devsite-click-to-copy">git clone https://android.googlesource.com/kernel/samsung</pre>
+
+<p><code>tegra</code> 项目用于 Xoom、Nexus 7 (2012)、Nexus 9,可用作在 NVIDIA Tegra 芯片组上开展相关工作的着手点。</p>
+<pre class="devsite-terminal devsite-click-to-copy">git clone https://android.googlesource.com/kernel/tegra</pre>
+
+<p><code>x86_64</code> 项目包含适用于 Nexus Player 的内核源代码,可用作在 Intel x86_64 芯片组上开展相关工作的着手点。</p>
+<pre class="devsite-terminal devsite-click-to-copy">git clone https://android.googlesource.com/kernel/x86_64</pre>
+
+<h2 id="building">编译内核</h2>
+<p>当您了解了内核的最后一条提交消息并已成功下载内核源代码和预编译的 gcc 后,就可以编译内核了。以下编译命令使用了 hikey 内核:</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">export ARCH=arm64</code>
+<code class="devsite-terminal">export CROSS_COMPILE=aarch64-linux-android-</code>
+<code class="devsite-terminal">cd hikey-linaro</code>
+<code class="devsite-terminal">git checkout -b android-hikey-linaro-4.1 origin/android-hikey-linaro-4.1</code>
+<code class="devsite-terminal">make hikey_defconfig</code>
+<code class="devsite-terminal">make</code>
+</pre>
+
+<p>要编译不同的内核,只需将 <code>hikey-linaro</code> 替换为您要编译的内核的名称即可。</p>
+
+<p>映像会输出到 <code>arch/arm64/boot/Image</code> 目录;内核二进制文件会输出到 <code>arch/arm64/boot/dts/hisilicon/hi6220-hikey.dtb</code> 文件。请将 <code>Image</code> 目录和 <code>hi6220-hikey.dtb</code> 文件复制到 <code>hikey-kernel</code> 目录。</p>
+
+<p>或者,您可以在使用 <code>make bootimage</code>(或编译启动映像的任何其他 <code>make</code> 命令行)时添加 <code>TARGET_PREBUILT_KERNEL</code> 变量。所有设备均支持该变量,因为它是通过 <code>device/common/populate-new-device.sh</code> 进行设置的。例如:</p>
+
+<pre class="devsite-terminal devsite-click-to-copy">
+export TARGET_PREBUILT_KERNEL=$your_kernel_path/arch/arm/boot/zImage-dtb
+</pre>
+
+<p class="note"><strong>注意</strong>:内核名称因设备而异。要找到内核的正确文件名,请参阅内核源代码中的 <code>device/<var>VENDOR</var>/<var>NAME</var></code>。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/build/building.html b/zh-cn/setup/build/building.html
new file mode 100644
index 00000000..65ea322a
--- /dev/null
+++ b/zh-cn/setup/build/building.html
@@ -0,0 +1,165 @@
+<html devsite><head>
+ <title>准备编译</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>以下关于编译 Android 源代码树的说明适用于所有分支,包括 <code>master</code>。编译命令的基本顺序如下:</p>
+
+<h2 id="obtaining-proprietary-binaries">下载专有二进制文件</h2>
+
+<p>您不能只通过纯源代码来使用 AOSP,还需要运行与硬件相关的其他专有库(例如用于硬件图形加速的专有库)。如需其他资源的下载链接和<a href="requirements.html#binaries">设备二进制文件</a>,请参阅以下各部分。</p>
+
+<aside class="note">部分设备会将这些专有二进制文件打包到其 <code>/vendor</code> 分区。</aside>
+
+<h3 id="downloading-proprietary-binaries">下载专有二进制文件</h3>
+
+<p>对于运行带标记的 AOSP 版本分支的受支持设备,您可以从 <a href="https://developers.google.com/android/drivers" class="external">Google 的驱动程序</a>下载相关的官方二进制文件。有了这些二进制文件,您将有权使用那些采用非开源代码的其他硬件功能。要编译 AOSP 的 master 分支,请使用<a href="https://developers.google.com/android/blobs-preview" class="external">二进制文件预览</a>。在针对某种设备编译 master 分支时,请使用适用于<a href="/setup/start/build-numbers.html">最新编号版本</a>的二进制文件或具有最新日期的二进制文件。</p>
+
+<h3 id="extracting-proprietary-binaries">解压专有二进制文件</h3>
+
+<p>每组二进制文件都是压缩包中的一个自解压脚本。解压每个压缩包,从源代码树的根目录运行附带的自解压脚本,然后确认您同意附带的许可协议的条款。二进制文件及其对应的 Makefile 将会安装在源代码树的 <code>vendor/</code> 层次结构中。</p>
+
+<h3 id="cleaning-up">清理</h3>
+
+<p>为了确保新安装的二进制文件在解压后会被适当考虑在内,请使用以下命令删除所有以前编译操作的已有输出:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+make clobber
+</pre>
+
+<h2 id="initialize">设置环境</h2>
+<p>使用 <code>envsetup.sh</code> 脚本初始化环境。请注意,将 <code>source</code> 替换成 <code>.</code>(一个点)可以省去一些字符,这种简写形式在文档中更为常用。</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+source build/envsetup.sh
+</pre>
+<p>或</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+. build/envsetup.sh
+</pre>
+
+<h2 id="choose-a-target">选择目标</h2>
+<p>使用 <code>lunch</code> 选择要编译的目标。确切的配置可作为参数进行传递。例如,以下命令表示针对模拟器进行完整编译,并且所有调试功能均处于启用状态。</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+lunch aosp_arm-eng
+</pre>
+<p>如果您没有提供任何参数就运行命令,<code>lunch</code> 将提示您从菜单中选择一个目标。</p>
+<p>所有编译目标都采用 <code>BUILD-BUILDTYPE</code> 形式,其中 <code>BUILD</code> 是表示特定功能组合的代号。BUILDTYPE 是以下类型之一:</p>
+<table>
+<thead>
+<tr>
+<th>编译类型</th>
+<th>使用情况</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>user</td>
+<td>权限受限;适用于生产环境</td>
+</tr>
+<tr>
+<td>userdebug</td>
+<td>与“user”类似,但具有 root 权限和可调试性;是进行调试时的首选编译类型</td>
+</tr>
+<tr>
+<td>eng</td>
+<td>具有额外调试工具的开发配置</td>
+</tr>
+</tbody>
+</table>
+<p>要详细了解如何针对实际硬件进行编译以及如何在实际硬件上运行编译系统,请参阅<a href="running.html">运行编译系统</a>。</p>
+
+<h2 id="build-the-code">编译代码</h2>
+
+<p>本部分只是一个摘要,用于确保设置已完成。如需关于编译 Android 的详细说明,请参阅<a href="running.html">运行编译系统</a>。</p>
+
+<p>您可以使用 <code>make</code> 编译任何代码。GNU Make 可以借助 <code>-jN</code> 参数处理并行任务,通常使用的任务数 N 介于编译时所用计算机上硬件线程数的 1-2 倍之间。例如,在一台双核 E5520 计算机(2 个 CPU,每个 CPU 4 个内核,每个内核 2 个线程)上,要实现最快的编译速度,可以使用介于 <code>make -j16</code> 到 <code>make -j32</code> 之间的命令。</p>
+
+<pre class="devsite-terminal devsite-click-to-copy">
+make -j4
+</pre>
+
+<h2 id="run-it">开始运行!</h2>
+
+<p>您可以在模拟器上运行自己的版本,也可以将其刷到设备上。请注意,因为您之前已使用 <code>lunch</code> 选择编译目标,因此很可能无法在编译目标之外的目标上运行您的编译系统。</p>
+
+<aside class="note"><strong>注意</strong>:请记得<a href="#obtaining-proprietary-binaries">下载专有二进制文件</a>,否则您的编译系统将无法在目标硬件上成功启动。如果您在此时下载二进制 Blob,则需要将其解压、<code>make clobber</code> 并重新编译。</aside>
+
+<h3 id="flash-a-device">使用 fastboot 刷机</h3>
+
+<p>要对设备进行刷机,您需要使用 <code>fastboot</code>(编译成功后,它应该会包含在您的路径中)。如需相关说明,请参阅<a href="running.html#flashing-a-device">对设备进行刷机</a>。</p>
+
+<h3 id="emulate-an-android-device">模拟 Android 设备</h3>
+
+<p>编译流程会自动将模拟器添加到您的路径中。要运行模拟器,请输入以下命令:</p>
+
+<pre class="devsite-terminal devsite-click-to-copy">
+emulator
+</pre>
+
+<h2 id="troubleshooting-common-build-errors">排查常见编译错误</h2>
+
+<h3 id="wrong-java-version">Java 版本不正确</h3>
+
+<p>如果您尝试编译的 Android 版本与您的 Java 版本不一致,<code>make</code> 将会终止并显示诸如以下消息:</p>
+<pre>
+************************************************************
+You are attempting to build with the incorrect version
+of java.
+
+Your version is: WRONG_VERSION.
+The correct version is: RIGHT_VERSION.
+
+Please follow the machine setup instructions at
+ https://source.android.com/source/initializing.html
+************************************************************
+</pre>
+
+<p>这可能是由以下原因引起的:</p>
+
+<ul>
+<li>未能安装 <a href="requirements.html#jdk">JDK 要求</a>中指定的正确 JDK。</li>
+<li>之前安装的另一个 JDK 出现在您的路径中。将正确的 JDK 附加到路径开头,或者移除有问题的 JDK。</li>
+</ul>
+
+<h3 id="python-version-3">Python 版本 3</h3>
+
+<p>Repo 是基于 Python 2.x 中的特定功能构建的,但遗憾的是与 Python 3 不兼容。要使用 Repo,请安装 Python 2.x:</p>
+
+<pre class="devsite-terminal devsite-click-to-copy">
+apt-get install python
+</pre>
+
+<h3 id="case-insensitive-filesystem">不区分大小写的文件系统</h3>
+
+<p>在 Mac OS 中的 HFS 文件系统上进行编译时,可能会遇到诸如以下错误:</p>
+<pre>
+************************************************************
+You are building on a case-insensitive filesystem.
+Please move your source tree to a case-sensitive filesystem.
+************************************************************
+</pre>
+<p>请按照<a href="initializing.html">构建编译环境</a>中的相关说明创建区分大小写的磁盘映像。</p>
+
+<h3 id="no-usb-permission">没有 USB 权限</h3>
+
+<p>在大多数 Linux 系统中,无特权的用户默认情况下无法使用 USB 端口。如果您看到权限遭拒错误,请按照<a href="initializing.html">初始化编译环境</a>中的相关说明配置 USB 使用权限。</p>
+
+<p>如果 adb 已在运行,并且在这些规则设置完成后无法连接到设备,您可以使用 <code>adb kill-server</code> 将其终止。这将使 adb 采用新的配置重启。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/build/devices.html b/zh-cn/setup/build/devices.html
new file mode 100644
index 00000000..b6cee410
--- /dev/null
+++ b/zh-cn/setup/build/devices.html
@@ -0,0 +1,302 @@
+<html devsite><head>
+ <title>使用参考开发板</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>您可以使用 Android 开源项目 (AOSP) 细分版本和针对特定硬件的相关二进制文件来开发适用于 Nexus 设备的细分版本。要查看可用的 Android 细分版本和针对的设备,请参阅<a href="../start/build-numbers.html#source-code-tags-and-builds">源代码、标记和细分版本</a>。</p>
+
+<p>您也可以开发适用于 <a href="https://android.googlesource.com/device/linaro/hikey/" class="external">HiKey</a> Android 参考开发板的细分版本,此类参考开发板旨在协助非 Nexus 组件供应商开发驱动程序并将其移植到各 Android 版本。使用参考开发板可以简化升级工作,缩短将新 Android 设备推向市场所需的时间,降低设备成本(因为使用参考开发板时,原始设计制造商 (ODM)/原始设备制造商 (OEM) 可以从更多兼容组件中进行选择),并加快组件供应商的创新速度。</p>
+
+<p>Google 支持使用经 <a href="#960hikey">HiKey960</a> 和 <a href="#620hikey">HiKey</a> 认证的 <a href="https://www.96boards.org/products/ce/" class="external">96Boards</a> 作为 Android 参考开发板。AOSP 可为 HiKey 提供内核源代码和开发板支持,这样开发者就能够以更低的原始设备制造商 (OEM) 费用轻松开发和调试新的及现有的外围设备驱动程序、进行内核开发,以及执行其他任务。要开发采用新传感器或 LED 的新 ContextHub 功能,您还可以使用连接到 HiKey 或 HiKey960 开发板的 <a href="#neonkey">Neonkey SensorHub</a>。</p>
+
+<h2 id="960hikey">HiKey960 开发板</h2>
+
+<p>HiKey960 开发板由 LeMaker(通过 <a href="https://www.amazon.com/dp/B071RD3V34" class="external">Amazon.com</a>)和 <a href="http://www.lenovator.com/product/80.html" class="external">Lenovator</a><a> 提供,采用 3GB RAM 配置。
+</a></p><a>
+
+<img src="../images/hikey960.png" alt="HiKey960 开发板图片"/>
+<figcaption><strong>图 1.</strong> Lenovator 提供的 HiKey960 开发板</figcaption>
+
+<p>其他资源:</p>
+</a><ul><a>
+</a><li><a>
+</a><a href="https://github.com/96boards/documentation/blob/master/ConsumerEdition/HiKey960/HardwareDocs/HiKey960_Schematics.pdf" class="external">HiKey960 示意图</a>
+</li>
+<li>
+<a href="http://www.96boards.org/documentation/ConsumerEdition/HiKey960/HardwareDocs/HardwareUserManual.md/" class="external">HiKey960 用户指南</a></li>
+<li>
+<a href="https://github.com/96boards/documentation/wiki/" class="external">96boards Wiki</a></li>
+</ul>
+
+<p>您可以使用以下命令下载、编译 Android 并在 HiKey960 开发板上运行 Android。</p>
+
+<h3 id="960userspace">编译用户空间</h3>
+<ol>
+ <li>下载 Android 源代码树:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">repo init -u <a href="https://android.googlesource.com/platform/manifest">https://android.googlesource.com/platform/manifest</a> -b master</code>
+<code class="devsite-terminal">repo sync -j24</code>
+</pre>
+ </li>
+ <li>下载二进制文件,并将其解压到 Android 源代码树中:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">wget https://dl.google.com/dl/android/aosp/arm-hikey960-OPR-cf4e0c80.tgz</code>
+<code class="devsite-terminal">tar xzf arm-hikey960-OPR-cf4e0c80.tgz</code>
+<code class="devsite-terimnal">./extract-arm-hikey960.sh</code>
+</pre>
+ </li>
+ <li>编译:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">. ./build/envsetup.sh</code>
+<code class="devsite-terminal">lunch hikey960-userdebug</code>
+<code class="devsite-terminal">make -j32</code>
+</pre>
+ </li>
+</ol>
+
+<h3 id="960fastboot">安装初始映像</h3>
+<ol>
+ <li>打开开关 1 和 3,从而选择 fastboot 模式(有关详情,请参阅 HiKey960 用户指南)。</li>
+ <li>为开发板接通电源。</li>
+ <li>将初始映像刷到设备上:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">cd device/linaro/hikey/installer/hikey960</code>
+<code class="devsite-terminal">./flash-all.sh</code>
+</pre>
+ </li>
+ <li>关闭开关 3,然后重启开发板。</li>
+</ol>
+
+<h3 id="960images">将映像刷到设备上</h3>
+<ol>
+ <li>打开开关 1 和 3,从而进入 fastboot 模式。</li>
+ <li>通过运行以下命令将映像刷到设备上:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">fastboot flash boot out/target/product/hikey960/boot.img</code>
+<code class="devsite-terminal">fastboot flash dts out/target/product/hikey960/dt.img</code>
+<code class="devsite-terminal">fastboot flash system out/target/product/hikey960/system.img</code>
+<code class="devsite-terminal">fastboot flash cache out/target/product/hikey960/cache.img</code>
+<code class="devsite-terminal">fastboot flash userdata out/target/product/hikey960/userdata.img</code>
+</pre>
+ </li>
+ <li>关闭开关 3,然后重启开发板。</li>
+</ol>
+
+<h3 id="960kernel">编译内核</h3>
+<ol>
+ <li>运行以下命令:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">git clone <a href="https://android.googlesource.com/kernel/hikey-linaro">https://android.googlesource.com/kernel/hikey-linaro</a></code>
+<code class="devsite-terminal">cd hikey-linaro</code>
+<code class="devsite-terminal">git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9</code>
+<code class="devsite-terminal">make ARCH=arm64 hikey960_defconfig</code>
+<code class="devsite-terminal">make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j24</code>
+</pre>
+ </li>
+ <li>更新启动映像中的内核。
+ <ul>
+ <li>将 <code>hi3660-hikey960.dtb</code> (<code>arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb</code>) 复制到 <code>hikey-kernel</code> 目录,并将其重命名为 <code>hi3660-hikey960.dtb-4.9</code></li>
+ <li>将映像文件 <code>(arch/arm64/boot/Image.gz-dtb</code>) 复制到 <code>hikey-kernel</code> 目录,并将其重命名为 <code>Image.gz-dtb-hikey960-4.9</code></li>
+ </ul>
+ </li><li>制作启动映像:
+<pre class="devsite-terminal devsite-click-to-copy">
+make bootimage -j24
+</pre>
+ </li>
+</ol>
+
+<h3 id="960serial">设置序列号</h3>
+<p>要设置随机序列号,请运行以下命令:
+</p><pre class="devsite-terminal devsite-click-to-copy">
+fastboot getvar nve:SN@<var>16_DIGIT_NUMBER</var>
+</pre>
+<p>引导加载程序通过 <code>androidboot.serialno=</code> 将生成的序列号导出到内核。
+
+</p><h3 id="960resolution">设置显示器分辨率</h3>
+<p>修改 <code>device/linaro/hikey/hikey960/BoardConfig.mk</code> 参数 <code>BOARD_KERNEL_CMDLINE</code>,并配置 <code>video</code> 设置。
+以下是针对 24 英寸显示器的示例设置:<code>video=HDMI-A-1:1280x800@60</code>。
+</p>
+
+<h2 id="620hikey">HiKey 开发板</h2>
+
+<p>HiKey 开发板(也称为 HiKey620)由 <a href="http://www.lenovator.com" class="external">Lenovator</a> 提供,有 <a href="http://www.lenovator.com/product/86.html" class="external">1GB RAM</a> 和 <a href="http://www.lenovator.com/product/90.html" class="external">2GB RAM</a> 配置可供选择:
+</p>
+
+<img src="../images/hikey620.png" alt="HiKey620 开发板图片"/>
+<figcaption><strong>图 2.</strong> Lenovator 提供的 HiKey 开发板</figcaption>
+
+<p>其他资源:</p>
+<ul>
+<li>
+<a href="https://github.com/96boards/documentation/blob/master/ConsumerEdition/HiKey/HardwareDocs/HiKey_schematics_LeMaker_version_Rev_A1.pdf" class="external">HiKey 示意图</a></li>
+<li>
+<a href="https://www.96boards.org/wp-content/uploads/2015/02/HiKey_User_Guide_Rev0.2.pdf" class="external">HiKey 用户指南</a></li>
+<li><a href="https://github.com/96boards/documentation/wiki/" class="external">96boards Wiki</a></li>
+</ul>
+
+<p>您可以使用以下命令下载、编译 Android 并在 HiKey 开发板上运行 Android。</p>
+
+<h3 id="620userspace">编译用户空间</h3>
+<ol>
+ <li>下载 Android 源代码树:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">repo init -u <a href="https://android.googlesource.com/platform/manifest">https://android.googlesource.com/platform/manifest</a> -b master</code>
+<code class="devsite-terminal">repo sync -j24</code>
+</pre>
+ </li>
+ <li>下载 HDMI 二进制文件,并将其解压到 Android 源代码树中:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">wget <a href="https://dl.google.com/dl/android/aosp/linaro-hikey-20170523-4b9ebaff.tgz">https://dl.google.com/dl/android/aosp/linaro-hikey-20170523-4b9ebaff.tgz</a></code>
+<code class="devsite-terminal">tar xzf linaro-hikey-20170523-4b9ebaff.tgz</code>
+<code class="devsite-terminal">./extract-linaro-hikey.sh</code>
+</pre>
+ </li>
+ <li>安装 mcopy 实用工具:
+<pre class="devsite-terminal devsite-click-to-copy">
+apt-get install mtools
+</pre>
+ </li>
+ <li>编译:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">. ./build/envsetup.sh</code>
+<code class="devsite-terminal">lunch hikey-userdebug</code>
+<code class="devsite-terminal">make -j32</code>
+</pre>
+ </li>
+</ol>
+
+<p class="note"><strong>注意</strong>:如果是 4GB eMMC,请使用 <code>$ make -j32 TARGET_USERDATAIMAGE_4GB=true</code>(而不是 <code>$ make -j32</code>)。</p>
+
+<h3 id="620fastboot">安装初始 fastboot 和 ptable</h3>
+<ol>
+ <li>连接 J15 1-2 和 3-4 引脚,从而选择特殊的引导加载程序模式(有关详情,请参阅 <a href="https://www.96boards.org/wp-content/uploads/2015/02/HiKey_User_Guide_Rev0.2.pdf" class="external">HiKey 用户指南</a>)。</li>
+ <li>将 USB 连接到 PC,以获取 ttyUSB 设备(例如:<code>/dev/ttyUSB1</code>)。</li>
+ <li>为开发板接通电源:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">cd device/linaro/hikey/installer/hikey</code>
+<code class="devsite-terminal">./flash-all.sh /dev/ttyUSB1 [4g]</code>
+</pre>
+ </li>
+ <li>取下跳线 3-4,并为开发板接通电源。</li>
+</ol>
+
+<h3 id="620images">将映像刷到设备上</h3>
+<ol>
+ <li>连接 J15 1-2 和 5-6 引脚,从而进入 fastboot 模式。</li>
+ <li>运行以下命令:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">fastboot flash boot out/target/product/hikey/boot.img</code>
+<code class="devsite-terminal">fastboot flash -w system out/target/product/hikey/system.img</code>
+</pre>
+ </li>
+ <li>取下跳线 5-6,并为开发板接通电源。</li>
+</ol>
+
+<h3 id="620kernel">编译内核</h3>
+<ol>
+ <li>运行以下命令:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">git clone <a href="https://android.googlesource.com/kernel/hikey-linaro">https://android.googlesource.com/kernel/hikey-linaro</a></code>
+<code class="devsite-terminal">cd hikey-linaro</code>
+<code class="devsite-terminal">git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9</code>
+<code class="devsite-terminal">make ARCH=arm64 hikey_defconfig</code>
+<code class="devsite-terminal">make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j24</code>
+</pre>
+ </li>
+ <li>将输出复制到 HiKey 内核目录 (<code>/kernel/hikey-linaro</code>):
+ <ul>
+ <li>将 hi6220-hikey.dtb (<code>arch/arm64/boot/dts/hisilicon/hi6220-hikey.dtb</code>) 复制到 HiKey 内核目录,并将其重命名为 hi6220-hikey.dtb-4.9。</li>
+ <li>将映像文件 <code>(arch/arm64/boot/Image-dtb</code>) 复制到 HiKey 内核目录,并将其重命名为 Image-dtb-4.9。</li>
+ </ul>
+ </li><li>制作启动映像:
+<pre class="devsite-terminal devsite-click-to-copy">
+make bootimage -j24
+</pre>
+ </li>
+</ol>
+
+<h3 id="620resolution">设置显示器分辨率</h3>
+<p>修改 <code>device/linaro/hikey/hikey/BoardConfig.mk</code> 参数 <code>BOARD_KERNEL_CMDLINE</code>,并配置 <code>video</code> 设置。
+以下是 24 英寸显示器的示例设置:<code>video=HDMI-A-1:1280x800@60</code>。</p>
+
+<h3 id="620serial">配置内核串行输出 (uart3)</h3>
+<p>将 J2 低速扩展连接器设为 1 - Gnd、11 - Rx、13 - Tx。有关详情,请参阅 <a href="https://www.96boards.org/wp-content/uploads/2015/02/HiKey_User_Guide_Rev0.2.pdf" class="external">HiKey 用户指南</a>。</p>
+
+<h2 id="neonkey">Neonkey SensorHub</h2>
+<p>要开发采用新传感器或 LED 的新 ContextHub 功能,您可以使用连接到 HiKey 或 Hikey960 开发板的 <a href="http://www.96boards.org/product/neonkey/" class="external">Neonkey SensorHub</a>。</p>
+
+<img src="../images/neonkey-sensorhub.png" alt="Neonkey Sensorhub 图片"/>
+<figcaption><strong>图 3.</strong> Neonkey SensorHub</figcaption>
+
+<p>Neonkey 是 STM32F411CE 上经认证的 <a href="http://www.96boards.org/" class="external">96Boards</a> 夹层基础,具有以下组件:</p>
+
+<ul>
+<li>压力传感器:BMP280</li>
+<li>ALS/近程传感器:RPR-0521RS</li>
+<li>ARM 霍尔效应传感器:MRMS501A</li>
+<li>可支持 15 个 LED 的 LED 驱动程序:LP3943</li>
+<li>加速度计/陀螺仪 + 地磁传感器:BMI160 + BMM150</li>
+<li>温度/湿度传感器:SI7034-A10</li>
+<li>4 个 GPIO 驱动的 LED、I2C 扩展、GPIO(2 条线)扩展、JTAG 连接器</li>
+<li>NOR 闪存:512KB</li>
+<li>SRAM:128 KB,96boards LS 扩展连接器</li>
+</ul>
+
+<p>AOSP 可提供内核源代码和 ContextHub 开发板支持,以协助开发者以较低的 OEM 费用开发和调试新传感器、进行新的 HAL 和内核更改,等等。</p>
+
+<p>要编译、启用并上传 Neonkey,请执行以下操作:</p>
+
+<ol>
+<li>提取 AOSP 源代码:
+<pre class="devsite-terminal">
+repo init -u https://android.googlesource.com/platform/manifest -b master &amp; repo sync -j24
+</pre>
+</li>
+<li>编译:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">. ./build/envsetup.sh</code>
+<code class="devsite-terminal">lunch hikey-userdebug</code>
+<code class="devsite-terminal">. device/google/contexthub/firmware/toolchain-setup.sh</code>
+<code class="devsite-terminal">make -C device/google/contexthub/firmware/variant/neonkey</code>
+<code class="devsite-terminal">adb push device/google/contexthub/firmware/out/nanohub/neonkey/full.bin /data/local/tmp</code>
+</pre>
+</li>
+<li>要启用 Neonkey,请通过以下方法进入启动模式:
+<ol>
+<li>将 BOOT0 连接到 1V8(连接 JTAG P4 1-5 引脚)</li>
+<li>按住 USR 按钮</li>
+<li>按 RST 按钮</li>
+</ol>
+</li>
+<li>要上传固件,请运行以下命令:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">adb root</code>
+<code class="devsite-terminal">adb shell stm32_flash -u -d /dev/ttyAMA2 -e 0xffff -w /data/local/tmp/full.bin</code>
+</pre>
+</li>
+<li>要编译用户空间 HAL,请运行以下命令:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">make TARGET_SENSOR_MEZZANINE=neonkey -j24</code>
+<code class="devsite-terminal">fastboot flashall</code>
+</pre>
+</li>
+</ol>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/build/downloading.html b/zh-cn/setup/build/downloading.html
new file mode 100644
index 00000000..b4fa3872
--- /dev/null
+++ b/zh-cn/setup/build/downloading.html
@@ -0,0 +1,192 @@
+<html devsite><head>
+ <title>下载源代码</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>Android 源代码树位于由 Google 托管的 Git 代码库中。Git 代码库中包含 Android 源代码的元数据,其中包括与对源代码进行的更改以及更改日期相关的元数据。本文档介绍了如何下载特定 Android 代码流水线的源代码树。
+</p>
+<p>
+要从特定设备的出厂映像开始,请参阅<a href="running.html#selecting-device-build">选择设备版本</a>。
+</p>
+<h2 id="installing-repo">安装 Repo</h2>
+<p>Repo 是一款工具,可让您在 Android 环境中更轻松地使用 Git。要详细了解 Repo,请参阅 <a href="../develop/repo.html">Repo 命令参考资料</a>。
+</p>
+<p>要安装 Repo,请执行以下操作:</p>
+<ol>
+ <li>
+ <p>确保主目录下有一个 bin/ 目录,并且该目录包含在路径中:</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">mkdir ~/bin</code>
+<code class="devsite-terminal">PATH=~/bin:$PATH</code>
+</pre>
+ </li>
+ <li>
+ <p>下载 Repo 工具,并确保它可执行:</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">curl https://storage.googleapis.com/git-repo-downloads/repo &gt; ~/bin/repo</code>
+<code class="devsite-terminal">chmod a+x ~/bin/repo</code>
+</pre>
+ </li>
+</ol>
+<p>对于 1.21 版,Repo 的 SHA-1 校验和为 b8bd1804f432ecf1bab730949c82b93b0fc5fede</p>
+<p>对于 1.22 版,Repo 的 SHA-1 校验和为 da0514e484f74648a890c0467d61ca415379f791</p>
+<p>对于 1.23 版,Repo 的 SHA-256 校验和为 e147f0392686c40cfd7d5e6f332c6ee74c4eab4d24e2694b3b0a0c037bf51dc5</p>
+<h2 id="initializing-a-repo-client">初始化 Repo 客户端</h2>
+<p>安装 Repo 后,设置您的客户端以访问 Android 源代码代码库:</p>
+<ol>
+ <li>
+ <p>创建一个空目录来存放您的工作文件。如果您使用的是 MacOS,必须在区分大小写的文件系统中创建该目录。为其指定一个您喜欢的任意名称:</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">mkdir WORKING_DIRECTORY</code>
+<code class="devsite-terminal">cd WORKING_DIRECTORY</code>
+</pre>
+ </li>
+ <li>
+ <p>使用您的真实姓名和电子邮件地址配置 Git。要使用 Gerrit 代码审核工具,您需要一个与<a href="https://www.google.com/accounts">已注册的 Google 帐号</a>关联的电子邮件地址。确保这是您可以接收邮件的有效地址。您在此处提供的姓名将显示在您提交的代码的提供方信息中。
+ </p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">git config --global user.name "Your Name"</code>
+<code class="devsite-terminal">git config --global user.email "you@example.com"</code>
+</pre>
+ </li>
+ <li>
+ <p>
+运行 <code>repo init</code> 以获取最新版本的 Repo 及其最近的所有错误更正内容。您必须为清单指定一个网址,该网址用于指定 Android 源代码中包含的各个代码库将位于工作目录中的什么位置。
+ </p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo init -u https://android.googlesource.com/platform/manifest
+</pre>
+ <p>要检出“master”以外的分支,请使用 <code>-b</code> 指定相应分支。要查看分支列表,请参阅<a href="../start/build-numbers.html#source-code-tags-and-builds">源代码标记和编译版本</a>。
+ </p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
+</pre>
+ </li>
+</ol>
+<p>初始化成功后,系统将显示一条消息,告诉您 Repo 已在工作目录中完成初始化。客户端目录中现在应包含一个 <code>.repo</code> 目录,清单等文件将保存在该目录下。
+</p>
+<h2 id="getting-the-files">下载 Android 源代码树</h2>
+<p>要将 Android 源代码树从默认清单中指定的代码库下载到工作目录,请运行以下命令:</p>
+<pre class="devsite-terminal devsite-click-to-copy">repo sync</pre>
+<p>Android 源代码文件将位于工作目录中对应的项目名称下。初始同步操作将需要 1 个小时或更长时间才能完成。要详细了解 <code>repo
+ sync</code> 和其他 Repo 命令,请参阅<a href="../develop/index.html">开发</a>部分。
+</p>
+<h2 id="using-authentication">使用身份验证</h2>
+<p>默认情况下,访问 Android 源代码均为匿名操作。为了防止服务器被过度使用,每个 IP 地址都有一个相关联的配额。
+</p>
+<p>当与其他用户共用一个 IP 地址时(例如,在越过 NAT 防火墙访问源代码代码库时),系统甚至会针对常规使用模式(例如,许多用户在短时间内从同一个 IP 地址同步新客户端)触发配额。
+</p>
+<p>在这种情况下,可以使用进行身份验证的访问方式,此类访问方式会对每位用户使用单独的配额,而不考虑 IP 地址。
+</p>
+<p>
+第一步是使用<a href="https://android.googlesource.com/new-password">密码生成器</a>生成密码,然后按照密码生成器页面中的说明进行操作。
+</p>
+<p>
+第二步是通过使用以下清单 URI,强制使用进行身份验证的访问方式:<code>https://android.googlesource.com/a/platform/manifest</code>。请注意 <code>/a/</code> 目录前缀如何触发强制性身份验证。您可以通过以下命令将现有客户端转换为使用强制性身份验证:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo init -u https://android.googlesource.com/a/platform/manifest
+</pre>
+<h2 id="troubleshooting-network-issues">排查网络问题</h2>
+<p>在使用代理的情况下下载内容(在一些企业环境中很常见)时,您可能需要明确指定 Repo 随后使用的代理:</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">export HTTP_PROXY=http://&lt;proxy_user_id&gt;:&lt;proxy_password&gt;@&lt;proxy_server&gt;:&lt;proxy_port&gt;</code>
+<code class="devsite-terminal">export HTTPS_PROXY=http://&lt;proxy_user_id&gt;:&lt;proxy_password&gt;@&lt;proxy_server&gt;:&lt;proxy_port&gt;</code>
+</pre>
+<p>一种比较少见的情况是,Linux 客户端遇到连接问题,在下载期间(通常是在“正在接收对象”期间)被卡住。有人曾报告称,调整 TCP/IP 堆栈的设置并使用非并行命令可以改善这种情况。您需要拥有 root 权限才能修改 TCP 设置:</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">sudo sysctl -w net.ipv4.tcp_window_scaling=0</code>
+<code class="devsite-terminal">repo sync -j1</code>
+</pre>
+<h2 id="using-a-local-mirror">使用本地镜像</h2>
+<p>当您使用多个客户端时(尤其是在带宽不足的情况下),最好为所有服务器内容创建一个本地镜像,并从该镜像同步客户端(不需要访问网络)。一个完整镜像的下载文件比两个客户端的下载文件要小一些,而且包含更多信息。
+</p>
+<p>
+以下说明假定在 <code>/usr/local/aosp/mirror</code> 中创建镜像。第一步是创建并同步镜像本身。请注意 <code>--mirror</code> 标记,该标记只能在创建新客户端时指定:
+</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">mkdir -p /usr/local/aosp/mirror</code>
+<code class="devsite-terminal">cd /usr/local/aosp/mirror</code>
+<code class="devsite-terminal">repo init -u https://android.googlesource.com/mirror/manifest --mirror</code>
+<code class="devsite-terminal">repo sync</code>
+</pre>
+<p>同步镜像后,您就可以从镜像创建新客户端了。请注意,务必要指定一个绝对路径:</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">mkdir -p /usr/local/aosp/master</code>
+<code class="devsite-terminal">cd /usr/local/aosp/master</code>
+<code class="devsite-terminal">repo init -u /usr/local/aosp/mirror/platform/manifest.git</code>
+<code class="devsite-terminal">repo sync</code>
+</pre>
+<p>最后,要将客户端与服务器同步,您需要将镜像与服务器同步,然后再将客户端与镜像同步:</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">cd /usr/local/aosp/mirror</code>
+<code class="devsite-terminal">repo sync</code>
+<code class="devsite-terminal">cd /usr/local/aosp/master</code>
+<code class="devsite-terminal">repo sync</code>
+</pre>
+<p>您可以将镜像存储在 LAN 服务器上,然后通过 NFS、SSH 或 Git 访问它。您还可以将其存储在移动存储盘上,并在用户之间或计算机之间传用该存储盘。
+</p>
+<h2 id="verifying-git-tags">验证 Git 标记</h2>
+<p>将以下公钥加载到您的 GnuPG 密钥数据库中。该密钥用于签署代表各版本的带注释标记。
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+gpg --import
+</pre>
+<p>复制并粘贴以下密钥,然后输入 EOF (Ctrl-D) 以结束输入并处理密钥。
+</p>
+<pre class="devsite-click-to-copy">
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.2.2 (GNU/Linux)
+
+mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
+lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
+8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
+u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
+wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
+/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
+jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
+MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
+b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv
+aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k
+cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX
+gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI
+2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
+QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
+hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
+C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
+LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+
+OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
+pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s
+KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
+N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
+vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
+G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
+hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
+EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
+=Wi5D
+-----END PGP PUBLIC KEY BLOCK-----
+</pre>
+<p>导入密钥后,您可以通过以下命令验证任何标记:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+git tag -v TAG_NAME
+</pre>
+<p>如果您尚未<a href="initializing.html#optimizing-a-build-environment">设置 ccache</a>,现在是设置它的最佳时机。
+</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/build/initializing.html b/zh-cn/setup/build/initializing.html
new file mode 100644
index 00000000..e6b8a13d
--- /dev/null
+++ b/zh-cn/setup/build/initializing.html
@@ -0,0 +1,334 @@
+<html devsite><head>
+ <title>搭建编译环境</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>
+本部分介绍了如何设置本地工作环境来编译 Android 源文件。您必须使用 Linux 或 Mac OS。目前不支持在 Windows 环境下进行编译。
+</p>
+<p>
+要简要了解代码审核和代码更新的整个过程,请参阅<a href="../contribute/life-of-a-patch.html">补丁程序的生命周期</a>。
+</p>
+<aside class="note"><strong>注意</strong>:本网站中所有命令的前面都带有美元符号 ($),以便与输出或文件条目区分开来。您可以使用每个命令框右上角的“点击复制”功能来复制所有行(不包括美元符号),也可以三击每行来分别复制各行(不包括美元符号)。<em></em>
+</aside>
+
+<h2 id="choosing-a-branch">选择分支</h2>
+<p>
+针对编译环境的某些要求是由您打算编译的源代码的版本决定的。要查看可用分支的完整列表,请参阅<a href="../start/build-numbers.html">细分版本号</a>。您还可以选择下载并编译最新的源代码(称为 <code>master</code>)。如果您选择这么做,请在初始化代码库时直接忽略分支规范。
+</p>
+<p>
+选择分支后,请按照下面的相应说明来设置编译环境。
+</p>
+
+<h2 id="setting-up-a-linux-build-environment">设置 Linux 编译环境</h2>
+<p>
+以下说明适用于所有分支(包括 <code>master</code>)。
+</p>
+<p>我们会定期在最近推出的一些 Ubuntu LTS (14.04) 版本中对 Android 编译系统进行内部测试,但大多数 Ubuntu 分发版本都应该具有所需的编译工具。欢迎向我们报告在其他分发版本中的测试结果(无论结果是成功还是失败)。
+</p>
+<p>
+如果是 Gingerbread (2.3.x) 及更高版本(包括 <code>master</code> 分支),需要使用 64 位环境。如果是较低的版本,则可以在 32 位系统中进行编译。
+</p>
+<aside class="note"><strong>注意</strong>:要查看完整的硬件和软件要求列表,请参阅<a href="requirements.html">要求</a>。然后,请按照下方适用于 Ubuntu 和 Mac OS 的详细说明进行操作。
+</aside>
+
+<h3 id="installing-the-jdk">安装 JDK</h3>
+<p><a href="https://android.googlesource.com/" class="external">Android 开源项目 (AOSP)</a> 中 Android 的 <code>master</code> 分支在 <code>prebuilts/jdk/</code> 下有预编译版本的 OpenJDK,因此无需另行安装。
+</p>
+<p>
+较低版本的 Android 需要另行安装 JDK。在 Ubuntu 上,请使用 <a href="http://openjdk.java.net/install/" class="external">OpenJDK</a>。要了解确切的版本,请参阅 <a href="requirements.html#jdk">JDK 要求</a>;要了解相关说明,请参阅以下各个部分。
+</p>
+<h4 id="for-ubuntu-15-04">如果 Ubuntu &gt;= 15.04</h4>
+<p>
+请运行以下命令:
+</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">sudo apt-get update</code>
+<code class="devsite-terminal">sudo apt-get install openjdk-8-jdk</code>
+</pre>
+
+<h4 id="for-ubuntu-14-04">如果是 Ubuntu LTS 14.04</h4>
+<p>
+目前没有适用于 Ubuntu 14.04 的受支持 OpenJDK 8 软件包。<strong>Ubuntu 15.04 OpenJDK 8</strong> 软件包能够在 Ubuntu 14.04 中顺利使用。<em>我们发现,按照以下说明操作时,更高的软件包版本(例如适合 15.10、16.04 的版本)在 Ubuntu 14.04 中无法正常工作。</em>
+</p>
+<ol>
+ <li>从 <a href="http://old-releases.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/">old-releases.ubuntu.com</a> 下载适用于 64 位架构的 <code>.deb</code> 软件包:
+ <ul>
+ <li><a href="http://old-releases.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u45-b14-1_amd64.deb">openjdk-8-jre-headless_8u45-b14-1_amd64.deb</a>(SHA256:<code>0f5aba8db39088283b51e00054813063173a4d8809f70033976f83e214ab56c0</code>)
+ </li>
+ <li><a href="http://old-releases.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre_8u45-b14-1_amd64.deb">openjdk-8-jre_8u45-b14-1_amd64.deb</a>(SHA256:<code>9ef76c4562d39432b69baf6c18f199707c5c56a5b4566847df908b7d74e15849</code>)
+ </li>
+ <li><a href="http://old-releases.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk_8u45-b14-1_amd64.deb">openjdk-8-jdk_8u45-b14-1_amd64.deb</a>(SHA256:<code>6e47215cf6205aa829e6a0a64985075bd29d1f428a4006a80c9db371c2fc3c4c</code>)
+ </li>
+ </ul>
+ </li>
+ <li>(可选)对照随以上每个软件包列出的 SHA256 字符串,确认已下载文件的校验和。例如,使用 <code>sha256sum</code> 工具:
+ <pre class="devsite-terminal devsite-click-to-copy">
+ sha256sum {downloaded.deb file}</pre>
+ </li>
+ <li>安装软件包:
+ <pre class="devsite-terminal devsite-click-to-copy">
+ sudo apt-get update</pre>
+为下载的每个 .deb 文件运行 <code>dpkg</code>。运行过程中可能会因缺少依赖项而出现错误:
+ <pre class="devsite-terminal devsite-click-to-copy">
+ sudo dpkg -i {downloaded.deb file}</pre>
+解决缺少依赖项的问题:
+ <pre class="devsite-terminal devsite-click-to-copy">
+ sudo apt-get -f install</pre>
+ </li>
+</ol>
+
+<h4 id="default-java-version">更新默认的 Java 版本 - 可选</h4>
+<p>
+(可选)对于以上 Ubuntu 版本,请通过运行以下命令来更新默认的 Java 版本:</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">sudo update-alternatives --config java</code>
+<code class="devsite-terminal">sudo update-alternatives --config javac</code>
+</pre>
+<p>
+在编译过程中,如果您遇到 Java 版本错误,请按照<a href="building.html#wrong-java-version">错误的 Java 版本</a>部分中的说明设置其路径。
+</p>
+
+<h3 id="installing-required-packages-ubuntu-1404">安装所需的软件包 (Ubuntu 14.04)</h3>
+<p>
+您将需要 64 位版本的 Ubuntu。建议您使用 Ubuntu 14.04。
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip
+</pre>
+<aside class="note"><strong>注意</strong>:要使用 SELinux 工具进行政策分析,您还需要安装 <code>python-networkx</code> 软件包。
+</aside>
+<aside class="note"><strong>注意</strong>:如果您使用 LDAP 并且希望运行 ART 主机测试,则还需要安装 <code>libnss-sss:i386</code> 软件包。
+</aside>
+
+<h3 id="installing-required-packages-ubuntu-1204">安装所需的软件包 (Ubuntu 12.04)
+</h3>
+<p>
+您可以使用 Ubuntu 12.04 来编译较低版本的 Android。master 或最近推出的一些版本不支持 Ubuntu 12.04。
+</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386</code>
+<code class="devsite-terminal">sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so</code>
+</pre>
+
+<h3 id="installing-required-packages-ubuntu-1004-1110">安装所需的软件包 (Ubuntu 10.04 - 11.10)
+</h3>
+<p>
+不再支持在 Ubuntu 10.04-11.10 中进行编译,但它们仍可用来编译较低版本的 AOSP。
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+sudo apt-get install git gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc
+</pre>
+<p>
+在 Ubuntu 10.10 中,请运行以下命令:
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
+</pre>
+<p>
+在 Ubuntu 11.10 中,请运行以下命令:
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+sudo apt-get install libx11-dev:i386
+</pre>
+
+<h3 id="configuring-usb-access">配置 USB 使用权限</h3>
+<p>
+按照说明<a href="https://developer.android.com/studio/run/device.html#setting-up" class="external">设置用于开发的设备</a>,以安装适用于所有 Android 设备且由社区维护的默认 <code>udev</code> 规则集。
+</p>
+
+<h3 id="using-a-separate-output-directory">使用单独的输出目录</h3>
+<p>
+默认情况下,每次编译的输出都会存储在相应源代码树的 <code>out/</code> 子目录下。
+</p>
+<p>
+在一些拥有多个存储设备的计算机上,如果将源文件和输出存储在单独的存储卷中,编译速度会更快。若要进一步提高编译速度,可以将输出存储在已针对速度(而非崩溃稳定性)进行优化的文件系统中,这是因为在文件系统损坏时可以重新生成所有文件。
+</p>
+<p>
+要进行这项设置,请导出 <code>OUT_DIR_COMMON_BASE</code> 变量,使其指向将存储输出目录的位置。
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+export OUT_DIR_COMMON_BASE=&lt;path-to-your-out-directory&gt;
+</pre>
+<p>
+对于每个单独的源代码树,其输出目录都将以其存放目录命名。例如,如果您有源代码树 <code>/source/master1</code> 和 <code>/source/master2</code>,并且 <code>OUT_DIR_COMMON_BASE</code> 设为了 <code>/output</code>,那么输出目录将为 <code>/output/master1</code> 和 <code>/output/master2</code>。
+</p>
+<p>
+在这种情况下,切勿将多个源代码树存储在具有相同名称的目录下,否则会导致输出目录共享终止,并且会出现不可预知的结果。只有 Jelly Bean (4.1) 及更高版本(包括 <code>master</code> 分支)支持这种做法。
+</p>
+<h2 id="setting-up-a-mac-os-x-build-environment">设置 Mac OS 编译环境</h2>
+<p>
+在默认安装过程中,Mac OS 会在一个保留大小写但不区分大小写的文件系统中运行。Git 并不支持此类文件系统,而且此类文件系统会导致某些 Git 命令(例如 <code>git status</code>)的行为出现异常。因此,我们建议您始终在区分大小写的文件系统中处理 AOSP 源文件。使用下文中介绍的磁盘映像可以非常轻松地做到这一点。
+</p>
+<p>
+有了适当的文件系统后,在新型 Mac OS 环境中编译 <code>master</code> 分支就会变得非常简单。要编译较早版本的分支,则需要一些额外的工具和 SDK。
+</p>
+
+<h3 id="creating-a-case-sensitive-disk-image">创建区分大小写的磁盘映像</h3>
+<p>
+您可以使用磁盘映像在现有的 Mac OS 环境中创建区分大小写的文件系统。要创建磁盘映像,请启动磁盘工具,然后选择“新建映像”。完成编译至少需要 25GB 空间;更大的空间能够更好地满足未来的需求。使用稀疏映像有助于节省空间,而且以后可以随着需求的增加进行扩展。请务必选择“Case sensitive, Journaled”存储卷格式。
+</p>
+<p>
+您也可以通过 shell 使用以下命令创建磁盘映像:
+</p>
+<pre class="devsite-click-to-copy devsite-terminal" data-terminal-prefix="# ">
+hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/android.dmg
+</pre>
+<p>
+这将创建一个 <code>.dmg</code>(也可能是 <code>.dmg.sparseimage</code>)文件,该文件在装载后可用作具有 Android 开发所需格式的驱动盘。
+</p>
+<p>
+如果您以后需要更大的存储卷,还可以使用以下命令来调整稀疏映像的大小:
+</p>
+<pre class="devsite-click-to-copy devsite-terminal" data-terminal-prefix="# ">hdiutil resize -size &lt;new-size-you-want&gt;g ~/android.dmg.sparseimage
+</pre>
+<p>
+对于存储在主目录下的名为 <code>android.dmg</code> 的磁盘映像,您可以向 <code>~/.bash_profile</code> 中添加辅助函数:
+</p>
+<ul>
+ <li>要在执行 <code>mountAndroid</code> 时装载磁盘映像,请运行以下命令:
+ <pre class="devsite-click-to-copy">
+ # mount the android file image
+ mountAndroid() { hdiutil attach ~/android.dmg -mountpoint /Volumes/android; }</pre>
+ <aside class="note"><strong>注意</strong>:如果系统创建的是 <code>.dmg.sparseimage</code> 文件,请将 <code>~/android.dmg</code> 替换为 <code>~/android.dmg.sparseimage</code>。
+ </aside>
+ </li>
+ <li>要在执行 <code>umountAndroid</code> 时卸载磁盘映像,请运行以下命令:
+ <pre class="devsite-click-to-copy">
+ # unmount the android file image
+ umountAndroid() { hdiutil detach /Volumes/android; }</pre>
+ </li>
+</ul>
+<p>
+装载 <code>android</code> 存储卷后,您将在其中开展所有工作。您可以像对待外接式驱动盘一样将其弹出(卸载)。
+</p>
+
+<h3 id="installing-the-mac-jdk">安装 JDK</h3>
+<p>
+要查看要在开发各种 Android 版本时使用的 Java 版本,请参阅相关<a href="requirements.html">要求</a>。
+</p>
+
+<h4 id="installing-required-packages">安装所需的软件包</h4>
+<ol>
+ <li>使用以下命令安装 Xcode 命令行工具:
+ <pre class="devsite-terminal devsite-click-to-copy">
+ xcode-select --install</pre>
+对于较低版本的 Mac OS(10.8 或更低版本),您必须通过 <a href="http://developer.apple.com/" class="external">Apple 开发者网站</a>安装 Xcode。如果您尚未注册成为 Apple 开发者,则必须创建一个 Apple ID 才能下载。
+ </li>
+ <li>通过 <a href="http://www.macports.org/install.php">macports.org</a> 安装 MacPorts。请确保 <code>/opt/local/bin</code> 在路径中显示在 <code>/usr/bin</code> <strong>前面</strong>。否则,请将以下内容添加到 <code>~/.bash_profile</code> 文件中:
+ <pre class="devsite-click-to-copy">
+ export PATH=/opt/local/bin:$PATH</pre>
+ <aside class="note"><strong>注意</strong>:如果主目录中没有 <code>.bash_profile</code> 文件,请创建一个。
+ </aside>
+ </li>
+ <li>通过 MacPorts 获取 Make、Git 和 GPG 软件包:
+ <pre class="devsite-terminal devsite-click-to-copy">
+ POSIXLY_CORRECT=1 sudo port install gmake libsdl git gnupg</pre>
+如果您使用的是 Mac OS X v10.4,还需要安装 bison:
+ <pre class="devsite-terminal devsite-click-to-copy">
+ POSIXLY_CORRECT=1 sudo port install bison</pre>
+ </li>
+</ol>
+
+<h4 id="reverting-from-make-382">将 make 3.82 还原到较低版本</h4>
+<p>
+在 Android 4.0.x (Ice Cream Sandwich) 及更低版本中,gmake 3.82 中存在一个会导致 Android 无法编译的错误。您可以按照以下步骤使用 MacPorts 来安装 3.81 版:
+</p>
+<ol>
+ <li>修改 <code>/opt/local/etc/macports/sources.conf</code>,在 rsync 行上方添加下面这行内容:
+ <pre class="devsite-click-to-copy">
+ file:///Users/Shared/dports</pre>
+然后创建该目录:
+ <pre class="devsite-terminal devsite-click-to-copy">
+ mkdir /Users/Shared/dports</pre>
+ </li>
+ <li>在新的 <code>dports</code> 目录下,运行以下命令:
+ <pre class="devsite-terminal devsite-click-to-copy">
+ svn co --revision 50980 http://svn.macports.org/repository/macports/trunk/dports/devel/gmake/ devel/gmake/</pre>
+ </li>
+ <li>为新的本地代码库创建一个端口索引:
+ <pre class="devsite-terminal devsite-click-to-copy">
+ portindex /Users/Shared/dports</pre>
+ </li>
+ <li>使用以下命令安装旧版 gmake:
+ <pre class="devsite-terminal devsite-click-to-copy">
+ sudo port install gmake @3.81</pre>
+ </li>
+</ol>
+
+<h4 id="setting-a-file-descriptor-limit">设置文件描述符数量上限</h4>
+<p>
+在 Mac OS 中,可同时打开的文件描述符的默认数量上限太低,在高度并行的编译流程中,可能会超出此上限。要提高此上限,请将下列行添加到 <code>~/.bash_profile</code> 中:
+</p>
+<pre class="devsite-click-to-copy">
+# set the number of open files to be 1024
+ulimit -S -n 1024</pre>
+
+<h2 id="optimizing-a-build-environment">优化编译环境(可选)</h2>
+<p>
+您可以视需要指示编译系统使用 ccache 编译工具,ccache 是适用于 C 和 C++ 的编译器缓存,有助于提高编译速度。这对于编译服务器和其他高容量生产环境来说尤其有用。ccache 可用作用于加快重新编译速度的编译器缓存。如果您经常使用 <code>make clean</code>,或者经常在不同的编译产品之间切换,则非常适合使用 ccache。
+</p>
+<aside class="note"><strong>注意</strong>:如果您是在执行增量编译(例如个人开发者而非编译服务器),ccache 可能会让您为缓存未命中埋单,从而减慢您的编译速度。
+</aside>
+<p>
+要使用 ccache,请在源代码树的根目录下执行以下命令:
+</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">export USE_CCACHE=1</code>
+<code class="devsite-terminal">export CCACHE_DIR=/&lt;path_of_your_choice&gt;/.ccache</code>
+<code class="devsite-terminal">prebuilts/misc/linux-x86/ccache/ccache -M 50G</code>
+</pre>
+<p>
+建议的缓存大小为 50G 到 100G。请将以下内容添加到 <code>.bashrc</code>(或等同文件)中:
+</p>
+<pre class="devsite-click-to-copy">
+export USE_CCACHE=1
+</pre>
+<p>
+默认情况下,缓存将存储在 <code>~/.ccache</code> 下。如果您的主目录位于 NFS 或一些其他的非本地文件系统中,您还需要在 <code>.bashrc</code> 文件中指定目录。
+</p>
+<p>
+在 Mac OS 中,您应将 <code>linux-x86</code> 替换成 <code>darwin-x86</code>:
+</p>
+<pre class="devsite-click-to-copy">
+prebuilts/misc/darwin-x86/ccache/ccache -M 50G
+</pre>
+<p>
+在编译 Ice Cream Sandwich (4.0.x) 或更低版本时,ccache 位于其他位置:
+</p>
+<pre class="devsite-click-to-copy">
+prebuilt/linux-x86/ccache/ccache -M 50G
+</pre>
+<p>
+该设置会存储在 CCACHE_DIR 中,并且为永久设置。
+</p>
+<p>
+在 Linux 中,您可以运行以下命令来观看使用 ccache 时的情况:
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+watch -n1 -d prebuilts/misc/linux-x86/ccache/ccache -s
+</pre>
+
+<h2 id="next-download-the-source">下一篇:下载源代码</h2>
+<p>
+编译环境已准备就绪!请继续阅读<a href="downloading.html">下载源代码</a>一文。
+</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/build/jack.html b/zh-cn/setup/build/jack.html
new file mode 100644
index 00000000..b728f683
--- /dev/null
+++ b/zh-cn/setup/build/jack.html
@@ -0,0 +1,258 @@
+<html devsite><head>
+ <title>使用 Jack 编译</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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.
+ -->
+
+<aside class="warning"><strong>警告</strong>:在 <a href="https://android-developers.googleblog.com/2017/03/future-of-java-8-language-feature.html" class="external">2017 年 3 月 14 日公告</a>发布之后,Jack 工具链已被弃用。虽然您可以继续使用 Jack,但我们强烈建议您使用最新的 <a href="https://developer.android.com/studio/preview/index.html" class="external">Android Studio 预览版</a>,该版本可为内置到默认工具链中的 <a href="https://developer.android.com/studio/preview/features/java8-support.html" class="external">Java 8 语言功能</a>提供更好的支持。</aside>
+
+<p>Jack 是一种 Android 工具链,用于将 Java 源代码编译成 Android dex 字节码。它取代了之前由 javac、ProGuard、jarjar 和 dx 等多种工具组成的 Android 工具链。由于 Jack 是 Android 6.x 的默认 Android 编译工具链,因此要使用 Jack,您只需使用标准的 Makefile 命令来编译源代码树或您的项目即可,无需进行其他任何操作。</p>
+
+<h2 class="overview">Jack 简介</h2>
+<p>Jack 工具链具有以下优势:</p>
+
+<img src="../images/jack_overview.png" alt="Jack 概览"/>
+<figcaption><strong>图 1.</strong> Jack 概览。</figcaption>
+
+<ul>
+<li><strong>完全开放的源代码</strong>。Jack 是在 AOSP 中提供的;我们欢迎用户贡献内容。</li>
+<li><strong>提高编译速度</strong>。Jack 提供以下具体支持来缩短编译时间:dex 预处理、增量编译和 Jack 编译服务器。</li>
+<li><strong>能够处理以下任务:压缩、混淆、重新打包和多 dex 处理</strong>。
+不再需要使用单独的软件包(如 ProGuard)。</li>
+</ul>
+
+<p>从 Android 7.0 起,Jack 支持使用 JaCoCo 衡量代码覆盖率。如需了解详情,请参阅<a href="https://android.googlesource.com/platform/prebuilts/sdk/+/master/tools/README-jack-code-coverage.md" class="external">使用 JaCoCo 衡量代码覆盖率</a>和 <a href="https://developer.android.com/preview/j8-jack.html" class="external">Java 8 语言功能</a>。</p>
+
+<h3 id="jack_library">Jack 库格式</h3>
+
+<p>Jack 具有自己的 .jack 文件格式,其中包含相应库的预编译 dex 代码,可实现更快速的编译(dex 预处理)。</p>
+
+<img src="../images/jack_library.png" alt="Jack 库文件内容"/>
+<figcaption><strong>图 2.</strong> Jack 库文件内容。</figcaption>
+
+<h3 id="jill">Jill</h3>
+
+<p>Jill 工具可将现有的 .jar 库转换为新的库格式,如下图所示。</p>
+
+<img src="../images/jack_jill.png" alt="使用 Jill 导入 .jar 库"/>
+<figcaption><strong>图 3.</strong> 导入现有 .jar 库的工作流程。</figcaption>
+
+<h2 id="using_jack">Jack 编译服务器</h2>
+
+<aside class="note"><strong>注意</strong>:以下说明仅适用于在 Android 6.x 中使用 Jack 的情况;如需关于在 Android 7.x 及更高版本中使用 Jack 的说明,请参阅 <a href="https://android.googlesource.com/platform/prebuilts/sdk/+/master/tools/README-jack-server.md" class="external">Jack 服务器文档</a>。</aside>
+
+<p>首次使用 Jack 时,它会在您的计算机上启动一个本地 Jack 编译服务器。该服务器:</p>
+
+<ul>
+<li>能够实现内在加速,因为它可以避免在每次编译时都启动新的主机 JRE JVM、加载 Jack 代码、初始化 Jack 以及准备 JIT。此外,它还会在小规模编译期间(例如增量模式下)尽可能优化编译所需时间。</li>
+<li>是短期内控制并行 Jack 编译数量的解决方案。该服务器可以避免计算机过载(内存或磁盘问题),因为它会限制并行编译的数量。</li>
+</ul>
+
+<p>如果没有任何编译工作,在空闲一段时间之后,Jack 服务器会自行关闭。它使用 localhost 接口上的两个 TCP 端口,因此无法从外部访问。您可以通过修改 <code>$HOME/.jack</code> 文件来修改所有参数(并行编译的数量、超时、端口号等)。</p>
+
+<h3 id="home_jack_file">$HOME/.jack 文件</h3>
+
+<p><code>$HOME/.jack</code> 文件包含以下针对 Jack 服务器变量的设置,采用纯 bash 语法:</p>
+
+<ul>
+<li><code>SERVER=true</code>:启用 Jack 的服务器功能。</li>
+<li><code>SERVER_PORT_SERVICE=8072</code>:设置该服务器上用于编译的 TCP 端口号。</li>
+<li><code>SERVER_PORT_ADMIN=8073</code>:设置该服务器上用于管理的 TCP 端口号。</li>
+<li><code>SERVER_COUNT=1</code>:未使用。
+</li><li><code>SERVER_NB_COMPILE=4</code>:设置允许的最大并行编译数量。</li>
+<li><code>SERVER_TIMEOUT=60</code>:设置无编译工作时服务器在自行关闭之前必须等待的空闲秒数。</li>
+<li><code>SERVER_LOG=${SERVER_LOG:=$SERVER_DIR/jack-$SERVER_PORT_SERVICE.log}</code>:设置在其中写入服务器日志的文件。默认情况下,此变量可被环境变量重载。</li>
+<li><code>JACK_VM_COMMAND=${JACK_VM_COMMAND:=java}</code>:设置用于在主机上启动 JVM 的默认命令。默认情况下,此变量可被环境变量重载。</li>
+</ul>
+
+<h3 id="jack_troubleshooting">Jack 编译问题排查</h3>
+
+<table>
+<tbody><tr>
+<th>问题</th>
+<th>操作</th>
+</tr>
+<tr>
+<td>您的计算机在编译期间无响应,或者 Jack 编译因“Out of memory error”(内存不足错误)而失败</td>
+<td>您可以通过修改 <code>$HOME/.jack</code> 并将 <code>SERVER_NB_COMPILE</code> 改为较低的值来减少同时进行的 Jack 编译的数量,从而改善这种情况。</td>
+</tr>
+<tr>
+<td>编译因“Cannot launch background server”(无法启动后台服务器)而失败</td>
+<td>最可能的原因是您计算机上的 TCP 端口都被占用了。您可以通过修改 <code>$HOME/.jack</code>(<code>SERVER_PORT_SERVICE</code> 和 <code>SERVER_PORT_ADMIN</code> 变量)来更改端口。
+
+<br /><br />如果上述方法无法解决问题,请报告该错误(务必附上您的编译日志和 <a href="#jack_log">Jack 服务器日志</a>)。要解决这种问题,请通过修改 <code>$HOME/.jack</code> 并将 <code>SERVER</code> 更改为 false 来停用 Jack 编译服务器。遗憾的是,这将大大降低编译速度,并可能会迫使您使用加载控制(<code>make</code> 的选项 <code>-l</code> )启动 <code>make -j</code>。
+</td>
+</tr>
+<tr>
+<td>编译卡住了,没有任何进展</td>
+<td>报告并提供以下信息(如果可能):
+<br />
+<ul>
+<li>卡住时所在的命令行。</li>
+<li>此命令行的输出。</li>
+<li>执行 <code>jack-admin server-stat</code> 获得的结果。</li>
+<li><code>$HOME/.jack</code> 文件。</li>
+<li><a href="#jack_log">Jack 服务器日志</a>(已转储服务器状态)的内容。要获取服务器日志,请执行以下操作:
+ <ul>
+ <li>通过运行 <code>jack-admin list-server</code> 查找 Jack 后台服务器进程。</li>
+ <li>向该服务器发送 <code>kill -3</code> 命令,将其状态转储到日志文件中。</li>
+ </ul>
+</li>
+<li>执行 <code>ls -lR $TMPDIR/jack-$USER</code> 获得的结果。</li>
+<li>运行 <code>ps j -U $USER</code> 获得的结果。</li>
+</ul>
+
+要解决这种问题,请使用 <code>jack-admin kill-server</code> 停止 Jack 后台服务器,然后移除临时目录(<code>/tmp</code> 或 <code>$TMPDIR</code>)的 <code>jack-$USER</code> 中包含的临时目录。
+</td>
+</tr>
+<tr>
+<td>其他问题</td>
+<td>要报告错误或请求功能,请使用 <a href="http://b.android.com" class="external">http://b.android.com</a> 中的公开问题跟踪工具。使用 <a href="https://code.google.com/p/android/issues/entry?template=Jack%20bug%20report" class="external">Jack 工具错误报告</a>或 <a href="https://code.google.com/p/android/issues/entry?template=Jack%20feature%20request" class="external">Jack 工具功能请求</a>模板,并记得将 Jack 日志附到错误报告中。</td>
+</tr>
+</tbody></table>
+
+<h3 id="jack_log">查找 Jack 日志</h3>
+如果您曾针对 dist 目标运行 <code>make</code> 命令,则 Jack 日志位于 <code>$ANDROID_BUILD_TOP/out/dist/logs/jack-server.log</code> 中。如果没有,则您可以通过运行 <code>jack-admin server-log</code> 找到该日志。对于可重现的 Jack 错误,您可以通过设置以下变量来获取更详细的日志:<p></p>
+
+<pre class="devsite-terminal devsite-click-to-copy">
+export ANDROID_JACK_EXTRA_ARGS="--verbose debug --sanity-checks on -D sched.runner=single-threaded"
+</pre>
+
+<p>使用标准 Makefile 命令编译源代码树(或您的项目),并附上标准输出和错误。要移除详细的编译日志,请运行以下命令:</p>
+
+<pre class="devsite-terminal devsite-click-to-copy">
+unset ANDROID_JACK_EXTRA_ARGS
+</pre>
+
+<h3 id="jack_limitations">Jack 的使用限制</h3>
+
+<ul>
+<li>默认情况下,Jack 服务器为单用户模式,一台计算机上只能有一位用户使用。要支持更多用户,请为每位用户选择不同的端口号,并相应地调整 <code>SERVER_NB_COMPILE</code>。您还可以通过在 <code>$HOME/.jack</code> 中设置 <code>SERVER=false</code> 来停用 Jack 服务器。</li>
+<li>当前的 <code>vm-tests-tf</code> 集成方案会导致 CTS 编译速度较慢。
+</li><li>不支持字节码处理工具(如 JaCoCo)。</li>
+</ul>
+
+<h2 id="using_jack_features">使用 Jack</h2>
+
+<p>Jack 支持 Java 编程语言 1.7,并集成了下述附加功能。</p>
+
+<h3 id="predexing">dex 预处理</h3>
+
+<p>在生成 Jack 库文件时,系统会生成该库的 .dex 文件并将其作为 dex 预处理文件存储在 .jack 库文件中。在进行编译时,Jack 会重复使用每个库中的 dex 预处理文件。所有库均会经过 dex 预处理:</p>
+
+<img src="../images/jack_predex.png" alt="包含 dex 预处理文件的 Jack 库"/>
+<figcaption><strong>图 4.</strong> 包含 dex 预处理文件的 Jack 库。</figcaption>
+
+<p>如果在编译过程中使用了压缩、混淆或重新打包功能,则 Jack 不会重复使用库的 dex 预处理文件。</p>
+
+<h3 id="incremental_compilation">增量编译</h3>
+
+<p>增量编译指的是,仅重新编译自上次编译后出现过更改的组件及其依赖项。当只有少数组件出现过更改时,进行增量编译可能比完整编译快得多。</p>
+
+<p>增量编译默认处于未启用状态(当压缩、混淆、重新打包或旧版多 dex 处理功能启用后,增量编译会自动被停用)。要启用增量编译,请将以下行添加到您要进行增量编译的项目的 <code>Android.mk</code> 文件中:</p>
+
+<pre class="devsite-click-to-copy">LOCAL_JACK_ENABLED := incremental</pre>
+
+<aside class="note"><strong>注意</strong>:首次使用 Jack 编译项目时,如果某些依赖项未编译,请使用 <code>mma</code> 对其进行编译,之后您可以使用标准编译命令。</aside>
+
+<h3 id="shrinking_and_obfuscation">压缩和混淆</h3>
+
+<p>Jack 会使用 proguard 配置文件来实现压缩和混淆功能。</p>
+
+<p>常用选项包括:</p>
+
+<ul>
+ <li> <code>@</code>
+ </li><li> <code>-include</code>
+ </li><li> <code>-basedirectory</code>
+ </li><li> <code>-injars</code>
+ </li><li> <code>-outjars // only 1 output jar supported</code>
+ </li><li> <code>-libraryjars</code>
+ </li><li> <code>-keep</code>
+ </li><li> <code>-keepclassmembers</code>
+ </li><li> <code>-keepclasseswithmembers</code>
+ </li><li> <code>-keepnames</code>
+ </li><li> <code>-keepclassmembernames</code>
+ </li><li> <code>-keepclasseswithmembernames</code>
+ </li><li> <code>-printseeds</code>
+</li></ul>
+
+<p>压缩选项包括:</p>
+
+<ul>
+ <li><code>-dontshrink</code>
+</li></ul>
+
+<p>混淆选项包括:</p>
+
+<ul>
+ <li> <code>-dontobfuscate</code>
+ </li><li> <code>-printmapping</code>
+ </li><li> <code>-applymapping</code>
+ </li><li> <code>-obfuscationdictionary</code>
+ </li><li> <code>-classobfuscationdictionary</code>
+ </li><li> <code>-packageobfuscationdictionary</code>
+ </li><li> <code>-useuniqueclassmembernames</code>
+ </li><li> <code>-dontusemixedcaseclassnames</code>
+ </li><li> <code>-keeppackagenames</code>
+ </li><li> <code>-flattenpackagehierarchy</code>
+ </li><li> <code>-repackageclasses</code>
+ </li><li> <code>-keepattributes</code>
+ </li><li> <code>-adaptclassstrings</code>
+</li></ul>
+
+<p>忽略的选项包括:</p>
+
+<ul>
+ <li> <code>-dontoptimize // Jack does not optimize</code>
+ </li><li> <code>-dontpreverify // Jack does not preverify</code>
+ </li><li> <code>-skipnonpubliclibraryclasses</code>
+ </li><li> <code>-dontskipnonpubliclibraryclasses</code>
+ </li><li> <code>-dontskipnonpubliclibraryclassmembers</code>
+ </li><li> <code>-keepdirectories</code>
+ </li><li> <code>-target</code>
+ </li><li> <code>-forceprocessing</code>
+ </li><li> <code>-printusage</code>
+ </li><li> <code>-whyareyoukeeping</code>
+ </li><li> <code>-optimizations</code>
+ </li><li> <code>-optimizationpasses</code>
+ </li><li> <code>-assumenosideeffects</code>
+ </li><li> <code>-allowaccessmodification</code>
+ </li><li> <code>-mergeinterfacesaggressively</code>
+ </li><li> <code>-overloadaggressively</code>
+ </li><li> <code>-microedition</code>
+ </li><li> <code>-verbose</code>
+ </li><li> <code>-dontnote</code>
+ </li><li> <code>-dontwarn</code>
+ </li><li> <code>-ignorewarnings</code>
+ </li><li> <code>-printconfiguration</code>
+ </li><li> <code>-dump</code>
+</li></ul>
+
+<aside class="note"><strong>注意</strong>:其他选项会引发错误。</aside>
+
+<h3 id="repackaging">重新打包</h3>
+
+<p>Jack 使用 jarjar 配置文件来进行重新打包。虽然 Jack 与“rule”规则类型兼容,但与“zap”或“keep”规则类型不兼容。如果您需要使用“zap”或“keep”规则类型,请提交功能请求,并在其中说明您在应用中如何使用该功能。</p>
+
+<h3 id="multidex_support">多 dex 处理支持</h3>
+
+<p>Jack 支持本地多 dex 处理和旧版多 dex 处理。由于 dex 文件的方法数上限为 65K,因此方法数超过 65K 的应用必须拆分成多个 dex 文件。有关详情,请参阅<a href="http://developer.android.com/tools/building/multidex.html" class="external">编译方法数超过 65K 的应用</a>。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/build/known-issues.html b/zh-cn/setup/build/known-issues.html
new file mode 100644
index 00000000..06ce270d
--- /dev/null
+++ b/zh-cn/setup/build/known-issues.html
@@ -0,0 +1,56 @@
+<html devsite><head>
+ <title>源代码同步问题</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>尽管我们一直万分谨慎,但 Android 源代码有时还是会出现一些小问题。本页详细介绍了您在尝试同步 Android 源代码时可能会遇到的一些已知问题。
+
+</p><h2 id="difficulties-syncing-the-source-code-proxy-issues">
+同步源代码时遇到的问题(代理问题)</h2>
+<p><strong>症状</strong>:<code>repo init</code> 或 <code>repo sync</code> 失败,并显示 HTTP 错误,通常为 403 或 500。</p>
+<p><strong>原因</strong>:有很多可能的原因,大多数情况下都与 HTTP 代理有关,这些代理无法顺利传输大量数据。</p>
+<p><strong>解决方法</strong>:虽然还没有通用的解决方法,但有人报告说使用 Python 2.7 以及明确使用 <code>repo sync -j1</code> 可以改善某些用户的情况。</p>
+
+<h2 id="difficulties-syncing-the-source-tree-dns-issues">
+同步源代码树时遇到的问题(DNS 问题)</h2>
+<p><strong>症状</strong>:在运行 <code>repo sync</code> 时进程失败,并显示与无法识别主机名相关的各种错误。其中一种错误是 <code>&lt;urlopen error [Errno -2] Name or service not known&gt;</code>。</p>
+<p><strong>原因</strong>:有些 DNS 系统难以应对同步源代码树时涉及的大量查询(在最糟糕的情况下,可能会有数百条查询请求)。</p>
+<p><strong>解决方法</strong>:手动解析相关主机名,并在本地对解析结果进行硬编码。</p>
+<p>您可以使用 <code>nslookup</code> 命令解析主机名,该命令将为每个主机名指定一个数字 IP 地址(通常是在输出的“Address”(地址)部分)。</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">nslookup googlesource.com</code>
+<code class="devsite-terminal">nslookup android.googlesource.com</code>
+</pre>
+<p>然后,您可以在本地对它们进行硬编码,方法是修改 <code>/etc/hosts</code>,在该文件中添加两行内容,形式如下:</p>
+<pre class="devsite-click-to-copy">
+aaa.bbb.ccc.ddd googlesource.com
+eee.fff.ggg.hhh android.googlesource.com
+</pre>
+<p>请注意,这种方法只适用于服务器的地址不会更改的情况;如果服务器的地址发生更改,导致您无法连接,那么您必须重新解析这些主机名,并相应地修改 <code>etc/hosts</code>。</p>
+
+<h2 id="difficulties-syncing-the-source-tree-tcp-issues">
+同步源代码树时遇到的问题(TCP 问题)</h2>
+<p><strong>症状</strong>:在同步时 <code>repo sync</code> 挂起,通常是在同步操作完成 99% 时出现这种情况。</p>
+<p><strong>原因</strong>:TCP/IP 堆栈中的某些设置在有些网络环境中会导致出现问题,使得 <code>repo sync</code> 既无法完成,也不会失败。</p>
+<p><strong>解决方法</strong>:在 Linux 中,请输入以下命令:</p>
+<pre class="devsite-terminal devsite-click-to-copy">sysctl -w net.ipv4.tcp_window_scaling=0</pre>
+<p>在 MacOS 中,请在网络设置部分停用 rfc1323 扩展程序。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/build/requirements.html b/zh-cn/setup/build/requirements.html
new file mode 100644
index 00000000..7caa8449
--- /dev/null
+++ b/zh-cn/setup/build/requirements.html
@@ -0,0 +1,134 @@
+<html devsite><head>
+ <title>要求</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>
+下载和编译 Android 源代码之前,请先确保您的系统符合以下要求。然后,请参阅<a href="initializing.html">构建编译环境</a>,查看适用于相应操作系统的安装说明。
+</p>
+
+<h2 id="hardware-requirements">硬件要求</h2>
+<p>
+您的开发工作站必须达到或超出以下硬件要求:</p>
+<ul>
+ <li>如果是 Android 2.3.x (Gingerbread) 及更高版本(包括 master 分支),需要使用 64 位环境。如果是较低的版本,则可以在 32 位系统中进行编译。
+ </li>
+ <li>如果要检出代码,至少需要 100GB 可用磁盘空间;如果要进行编译,则还需要 150GB。如果要进行多次编译或使用 ccache,则需要更多空间。
+ </li>
+ <li>如果在虚拟机中运行 Linux,则至少需要 16GB 的 RAM/交换空间。
+ </li>
+</ul>
+
+<h2 id="software-requirements">软件要求</h2>
+<p><a href="https://android.googlesource.com/" class="external">Android 开源项目 (AOSP)</a> <code>master</code> 分支历来都是在 Ubuntu Long Term Support (LTS) 版本中进行开发和测试,但您也可以使用其他 Ubuntu 分发版本。要查看建议使用的版本,请参阅下面的列表。
+</p>
+<p>
+您的工作站必须具有下面列出的软件。要查看所需的其他软件包以及用于安装这些软件包的命令,请参阅<a href="initializing.html">构建编译环境</a>。
+</p>
+
+<h3 id="latest-version">操作系统和 JDK</h3>
+<p>
+如果您要针对 AOSP <code>master</code> 分支进行开发,请使用下列操作系统之一:Ubuntu 14.04 (Trusty)/Mac OS v10.10 (Yosemite) 或更高版本(具有 Xcode 4.5.2 和命令行工具)。
+</p>
+<p>
+对于 Java 开发套件 (JDK),需要注意的是 AOSP 中 Android 的 <code>master</code> 分支带有预编译版本的 OpenJDK;因此无需另行安装。较低的版本则需要单独进行安装。
+</p>
+<p>请参阅<a href="#older-versions">较低 Android 版本的软件包</a>。
+
+</p><h3 id="packages">主要软件包</h3>
+<ul>
+ <li><a href="http://www.python.org/download/" class="external">python.org</a> 中提供的 Python 2.6 - 2.7</li>
+ <li><a href="http://ftp.gnu.org/gnu/make/" class="external">gnu.org</a> 中提供的 GNU Make 3.81 - 3.82</li>
+ <li><a href="http://git-scm.com/download" class="external">git-scm.com</a> 中提供的 Git 1.7 或更高版本</li>
+</ul>
+
+<h3 id="binaries">设备二进制文件</h3>
+<p>
+下载预览、出厂映像、驱动程序、无线下载 (OTA) 更新和下列其他 Blob。有关详情,请参阅<a href="building.html#obtaining-proprietary-binaries">下载专有二进制文件</a>。
+</p>
+<ul>
+ <li><a href="https://developers.google.com/android/blobs-preview" class="external">预览二进制文件 (Blob)</a>。针对 AOSP <code>master</code> 分支开发。
+ </li>
+ <li><a href="https://developers.google.com/android/images" class="external">出厂映像</a>。针对运行带标记的 AOSP 版本分支的受支持设备。
+ </li>
+ <li><a href="https://developers.google.com/android/drivers" class="external">硬件支持二进制文件</a>。针对运行带标记的 AOSP 版本分支的设备。
+ </li>
+</ul>
+
+<h3 id="toolchain">编译工具链</h3>
+<p>
+Android 8.0 及更高版本仅支持使用 <a href="https://developer.android.com/ndk/guides/standalone_toolchain.html#working_with_clang" class="external">Clang/LLVM</a> 来编译 Android 平台。您可以加入 <a href="https://groups.google.com/forum/#!forum/android-llvm" class="external">android-llvm</a> 网上论坛来提出问题并获取帮助。在 <a href="https://github.com/android-ndk/ndk" class="external">NDK GitHub</a> 上报告 NDK/编译器问题。
+</p>
+<p>
+对于<a href="https://developer.android.com/ndk/guides/index.html" class="external">原生开发工具包 (NDK)</a> 和旧版内核,您也可以使用 AOSP master 分支中包含的 GCC 4.9(在 <code>prebuilts/</code> 下)。
+</p>
+
+<h3 id="older-versions">较低 Android 版本的软件包</h3>
+<p>
+本部分详细介绍了较低 Android 版本的相关操作系统和 JDK 软件包。
+</p>
+
+<h4 id="operating-systems">操作系统</h4>
+<p>
+Android 通常是在 GNU/Linux 或 Mac OS 操作系统中进行编译。您也可以使用虚拟机在不支持的系统(例如 Windows)中编译 Android。
+</p>
+
+<p>我们建议您在 GNU/Linux(而不是其他操作系统)上进行编译。Android 编译系统通常使用编译设备上运行的 ART 来预编译系统 dex 文件。由于 ART 只能在 Linux 上运行,因此编译系统会在非 Linux 操作系统上跳过这个预编译步骤,从而导致 Android 编译的性能下降。
+</p>
+
+<h5 id="linux">GNU/Linux</h5>
+<ul>
+ <li>Android 6.0 (Marshmallow) - AOSP master:Ubuntu 14.04 (Trusty)</li>
+ <li>Android 2.3.x (Gingerbread) - Android 5.x (Lollipop):Ubuntu 12.04 (Precise)</li>
+ <li>Android 1.5 (Cupcake) - Android 2.2.x (Froyo):Ubuntu 10.04 (Lucid)</li>
+</ul>
+<h5 id="mac">Mac OS (Intel/x86)</h5>
+<ul>
+ <li>Android 6.0 (Marshmallow) - AOSP master:Mac OS v10.10 (Yosemite) 或更高版本,具有 Xcode 4.5.2 和命令行工具
+ </li>
+ <li>Android 5.x (Lollipop):Mac OS v10.8 (Mountain Lion),具有 Xcode 4.5.2 和命令行工具
+ </li>
+ <li>Android 4.1.x-4.3.x (Jelly Bean) - Android 4.4.x (KitKat):Mac OS v10.6 (Snow Leopard) 或 Mac OS X v10.7 (Lion),以及 Xcode 4.2(Apple 的开发者工具)
+ </li>
+ <li>Android 1.5 (Cupcake) - Android 4.0.x (Ice Cream Sandwich):Mac OS v10.5 (Leopard) 或 Mac OS X v10.6 (Snow Leopard),以及 Mac OS X v10.5 SDK
+ </li>
+</ul>
+
+<h4 id="jdk">JDK</h4>
+<p>
+有关较低 Android 版本的预编译路径和安装说明,请参阅<a href="initializing.html#installing-the-jdk">安装 JDK</a>。
+</p>
+<ul>
+ <li>Android 7.0 (Nougat) - Android 8.0 (Oreo):Ubuntu - <a href="http://openjdk.java.net/install/" class="external">OpenJDK 8</a>;Mac OS - <a href="http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jdk-8u45-oth-JPR" class="external">jdk 8u45 或更高版本</a>
+ </li>
+ <li>Android 5.x (Lollipop) - Android 6.0 (Marshmallow):Ubuntu - <a href="http://openjdk.java.net/install/" class="external">OpenJDK 7</a>;Mac OS - <a href="https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jdk-7u71-oth-JPR" class="external">jdk-7u71-macosx-x64.dmg</a>
+ </li>
+ <li>Android 2.3.x (Gingerbread) - Android 4.4.x (KitKat):Ubuntu - <a href="http://www.oracle.com/technetwork/java/javase/archive-139210.html" class="external">Java JDK 6</a>;Mac OS - <a href="http://support.apple.com/kb/dl1572" class="external">Java JDK 6</a>
+ </li>
+ <li>Android 1.5 (Cupcake) - Android 2.2.x (Froyo):Ubuntu - <a href="http://www.oracle.com/technetwork/java/javase/archive-139210.html" class="external">Java JDK 5</a>
+ </li>
+</ul>
+
+<h4 id="make">品牌</h4>
+<p>
+Android 4.0.x (Ice Cream Sandwich) 及更低版本必须<a href="initializing.html#reverting-from-make-382">将 make 3.82 还原到较低版本</a>,以避免出现编译错误。
+</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/build/running.html b/zh-cn/setup/build/running.html
new file mode 100644
index 00000000..3e4c6738
--- /dev/null
+++ b/zh-cn/setup/build/running.html
@@ -0,0 +1,380 @@
+<html devsite><head>
+ <title>运行编译系统</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>本页提供了关于在特定设备上运行编译系统的详细信息,是对<a href="building.html">编译准备工作</a>部分的补充。
+</p>
+
+<h2 id="building-fastboot-and-adb">编译 fastboot 和 adb</h2>
+<p>如果您还没有 <code>fastboot</code> 和 <code>adb</code>,则可以使用常规编译系统来编译。请按照<a href="building.html">编译准备工作</a>中的说明操作,将主 <code>make</code> 命令替换为以下命令:</p>
+<pre class="devsite-click-to-copy devsite-terminal">make fastboot adb</pre>
+
+<h2 id="booting-into-fastboot-mode">启动进入 fastboot 模式</h2>
+<p><code>Fastboot</code> 是一种引导加载程序模式,您可以在该模式下刷写设备。
+在设备冷启动过程中,可使用以下组合键进入 <code>fastboot</code> 模式:</p>
+<table>
+<thead>
+<tr>
+<th>设备</th>
+<th>代号</th>
+<th>组合键</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Pixel XL</td>
+<td>marlin</td>
+<td>按住音量调低键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>Pixel</td>
+<td>sailfish</td>
+<td>按住音量调低键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>hikey</td>
+<td>hikey</td>
+<td>连接 J15 的引脚 1-2 和 5-6。</td>
+</tr>
+<tr>
+<td>Nexus 6P</td>
+<td>angler</td>
+<td>按住音量调低键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus 5X</td>
+<td>bullhead</td>
+<td>按住音量调低键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus 6</td>
+<td>shamu</td>
+<td>按住音量调低键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus Player</td>
+<td>fugu</td>
+<td>按住电源键<em></em>。</td>
+</tr>
+<tr>
+<td>Nexus 9</td>
+<td>volantis</td>
+<td>按住音量调低键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus 5</td>
+<td>hammerhead</td>
+<td>同时按住音量调高键和音量调低键,然后按住电源键。<em></em><em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus 7</td>
+<td>flo</td>
+<td>按住音量调低键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus 7 3G</td>
+<td>deb</td>
+<td>按住音量调低键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus 10</td>
+<td>manta</td>
+<td>同时按住音量调高键和音量调低键,然后按住电源键。<em></em><em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus 4</td>
+<td>mako</td>
+<td>按住音量调低键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus 7 (2012)</td>
+<td>grouper</td>
+<td>按住音量调低键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus 7 3G (2012)</td>
+<td>tilapia</td>
+<td>按住音量调低键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus Q</td>
+<td>phantasm</td>
+<td>启动设备,然后在 LED 指示灯亮起后用一只手盖住设备,直至指示灯变成红色。</td>
+</tr>
+<tr>
+<td>Galaxy Nexus GSM</td>
+<td>maguro</td>
+<td>同时按住音量调高键和音量调低键,然后按住电源键。<em></em><em></em><em></em></td>
+</tr>
+<tr>
+<td>Galaxy Nexus (Verizon)</td>
+<td>toro</td>
+<td>同时按住音量调高键和音量调低键,然后按住电源键。<em></em><em></em><em></em></td>
+</tr>
+<tr>
+<td>Galaxy Nexus (Sprint)</td>
+<td>toroplus</td>
+<td>同时按住音量调高键和音量调低键,然后按住电源键。<em></em><em></em><em></em></td>
+</tr>
+<tr>
+<td>Motorola Xoom</td>
+<td>wingray</td>
+<td>按住音量调低键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus S</td>
+<td>crespo</td>
+<td>按住音量调高键,然后按住电源键。<em></em><em></em></td>
+</tr>
+<tr>
+<td>Nexus SG</td>
+<td>crespo4g</td>
+<td>按住音量调高键,然后按住电源键。<em></em><em></em></td>
+</tr>
+</tbody>
+</table>
+
+<p>您还可以使用命令 <code>adb reboot bootloader</code> 直接在 Android 系统中重新启动进入引导加载程序,而无需使用任何组合键。</p>
+
+<h2 id="unlocking-the-bootloader">解锁引导加载程序</h2>
+
+<p>只有在引导加载程序允许的情况下,您才可以刷写定制系统,而引导加载程序默认处于锁定状态。您可以解锁引导加载程序,但这样做会导致系统出于保护隐私方面的考虑而删除用户数据。<em></em>解锁之后,系统会清空设备上的所有数据,即应用中的个人数据以及可通过 USB 访问的共享数据(包括照片和影片)。请务必先备份设备上的所有重要文件,然后再尝试解锁引导加载程序。</p>
+
+<p>您只需解锁引导加载程序一次即可,并可视需要将其重新锁定。</p>
+
+<h3>解锁新款设备</h3>
+<p>自 2014 年以来发布的所有 Nexus 和 Pixel 设备(从 Nexus 6 和 Nexus 9 开始)都内置有恢复出厂设置保护功能,需要通过多个步骤才能解锁引导加载程序。</p>
+
+<ol>
+<li>要在设备上启用 OEM 解锁功能,请执行以下操作:
+<ol>
+ <li>在“设置”中,点按<strong>关于手机</strong>,然后点按<strong>版本号</strong>七 (7) 次。</li>
+ <li>当看到“您已处于开发者模式”这条消息后,点按返回按钮。</li>
+ <li>点按<strong>开发者选项</strong>,然后启用 <strong>OEM 解锁</strong>和 <strong>USB 调试</strong>(如果 OEM 解锁处于停用状态,请连接到互联网,以便设备可以至少签到一次。如果 OEM 解锁仍处于停用状态,则说明您的设备可能已被运营商锁定 SIM 卡,系统无法解锁引导加载程序)。</li>
+ </ol>
+</li>
+<li>重新启动进入引导加载程序,然后使用 <code>fastboot</code> 解锁。
+ <ul>
+ <li>对于新款设备(2015 年及之后发布的设备):
+ <pre class="devsite-click-to-copy devsite-terminal">fastboot flashing unlock</pre>
+ </li>
+ <li>对于老款设备(2014 年及之前发布的设备):
+ <pre class="devsite-click-to-copy devsite-terminal">fastboot oem unlock</pre>
+ </li>
+ </ul>
+</li>
+<li>在屏幕上确认解锁。</li>
+</ol>
+
+<aside class="note"><strong>注意</strong>:在 Nexus 10 上,解锁引导加载程序后,内部存储空间仍将保持未格式化状态。您可以依次使用 <code>fastboot format cache</code> 和 <code>fastboot format userdata</code> 来格式化设备。</aside>
+
+<h3 id="relocking-the-bootloader">重新锁定引导加载程序</h3>
+<p>要重新锁定引导加载程序,请执行以下命令:</p>
+<ul>
+<li>对于新款设备(2015 年及之后发布的设备):
+<pre class="devsite-click-to-copy devsite-terminal">fastboot flashing lock</pre>
+</li>
+<li>对于老款设备(2014 年及之前发布的设备):
+<pre class="devsite-click-to-copy devsite-terminal">fastboot oem lock</pre>
+</li>
+</ul>
+
+<aside class="note"><strong>注意</strong>:在 Motorola Xoom 上重新锁定引导加载程序会清空用户数据(包括共享的 USB 数据)。</aside>
+
+<h2 id="flash-unlock">使用刷写解锁</h2>
+<p><code>getFlashLockState()</code> 系统 API 会传输引导加载程序状态,<code>PersistentDataBlockManager.getFlashLockState()</code> 系统 API 会返回兼容设备上引导加载程序的锁定状态。</p>
+
+<table>
+<tbody><tr>
+<th>返回的值</th>
+<th>条件</th>
+</tr>
+<tr>
+<td><code>FLASH_LOCK_UNKNOWN</code></td>
+<td>仅升级到 Android 7.x 或更高版本的符合以下条件的设备会返回此值:设备支持刷写锁定/解锁功能,但之前不支持获取刷写锁定状态所需的引导加载程序变更。<br />
+<ul>
+<li>运行 Android 7.x 或更高版本的新设备必须为 <code>FLASH_LOCK_LOCKED</code> 或 <code>FLASH_LOCK_UNLOCKED</code> 状态。</li>
+<li>升级到 Android 7.x 或更高版本且不支持刷写解锁/锁定功能的设备应返回 <code>FLASH_LOCK_LOCKED</code> 状态。</li>
+</ul>
+</td>
+</tr>
+<tr>
+<td><code>FLASH_LOCK_LOCKED</code></td>
+<td>不支持刷写锁定/解锁的设备(即设备始终处于锁定状态)或支持刷写锁定/解锁且处于锁定状态的设备应该会返回此值。</td>
+</tr>
+<tr>
+<td><code>FLASH_LOCK_UNLOCKED</code></td>
+<td>支持刷写锁定/解锁且当前处于已解锁状态的设备会返回此值。</td>
+</tr>
+</tbody></table>
+
+<p>制造商应测试由已锁定/解锁引导加载程序的设备返回的值。例如,Android 开源项目 (AOSP) 包含根据 <code>ro.boot.flash.locked</code> 启动属性返回值的参考实现。示例代码位于以下目录中:</p>
+
+<ul>
+<li><code>frameworks/base/services/core/java/com/android/server/PersistentDataBlockService.java</code></li>
+<li><code>frameworks/base/core/java/android/service/persistentdata/PersistentDataBlockManager.java</code></li>
+</ul>
+
+<h2 id="selecting-device-build">选择设备编译系统</h2>
+
+<p><code>lunch</code>菜单中提供了建议的设备编译系统,在不使用任何参数的情况下运行 <code>lunch</code> 命令即可查看。
+您可以从 developers.google.com 下载 Nexus 设备的出厂映像和二进制文件。请参阅<a href="requirements#binaries">设备二进制文件</a>进行下载。有关详情以及其他资源,请参阅<a href="building.html#obtaining-proprietary-binaries">下载专有二进制文件</a>。
+
+<table>
+<thead>
+<tr>
+<th>设备</th>
+<th>代号</th>
+<th>编译配置</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Pixel XL</td>
+<td>marlin</td>
+<td>aosp_marlin-userdebug</td>
+</tr>
+<tr>
+<td>Pixel</td>
+<td>sailfish</td>
+<td>aosp_sailfish-userdebug</td>
+</tr>
+<tr>
+<td>HiKey</td>
+<td>hikey</td>
+<td>hikey-userdebug</td>
+</tr>
+<tr>
+<td>Nexus 6P</td>
+<td>angler</td>
+<td>aosp_angler-userdebug</td>
+</tr>
+<tr>
+<td>Nexus 5X</td>
+<td>bullhead</td>
+<td>aosp_bullhead-userdebug</td>
+</tr>
+<tr>
+<td>Nexus 6</td>
+<td>shamu</td>
+<td>aosp_shamu-userdebug</td>
+</tr>
+<tr>
+<td>Nexus Player</td>
+<td>fugu</td>
+<td>aosp_fugu-userdebug</td>
+</tr>
+<tr>
+<td>Nexus 9</td>
+<td>volantis (flounder)</td>
+<td>aosp_flounder-userdebug</td>
+</tr>
+<tr>
+<td>Nexus 5 (GSM/LTE)</td>
+<td>hammerhead</td>
+<td>aosp_hammerhead-userdebug</td>
+</tr>
+<tr>
+<td>Nexus 7 (WLAN)</td>
+<td>razor (flo)</td>
+<td>aosp_flo-userdebug</td>
+</tr>
+<tr>
+<td>Nexus 7(移动版)</td>
+<td>razorg (deb)</td>
+<td>aosp_deb-userdebug</td>
+</tr>
+<tr>
+<td>Nexus 10</td>
+<td>mantaray (manta)</td>
+<td>full_manta-userdebug</td>
+</tr>
+<tr>
+<td>Nexus 4</td>
+<td>occam (mako)</td>
+<td>full_mako-userdebug</td>
+</tr>
+<tr>
+<td>Nexus 7 (WLAN)</td>
+<td>nakasi (grouper)</td>
+<td>full_grouper-userdebug</td>
+</tr>
+<tr>
+<td>Nexus 7(移动版)</td>
+<td>nakasig (tilapia)</td>
+<td>full_tilapia-userdebug</td>
+</tr>
+<tr>
+<td>Galaxy Nexus (GSM/HSPA+)</td>
+<td>yakju (maguro)</td>
+<td>full_maguro-userdebug</td>
+</tr>
+<tr>
+<td>Galaxy Nexus (Verizon)</td>
+<td>mysid (toro)</td>
+<td>aosp_toro-userdebug</td>
+</tr>
+<tr>
+<td>Galaxy Nexus(试验版)</td>
+<td>mysidspr (toroplus)</td>
+<td>aosp_toroplus-userdebug</td>
+</tr>
+<tr>
+<td>Motorola Xoom(美国 WLAN 版)</td>
+<td>wingray</td>
+<td>full_wingray-userdebug</td>
+</tr>
+<tr>
+<td>Nexus S</td>
+<td>soju (crespo)</td>
+<td>full_crespo-userdebug</td>
+</tr>
+<tr>
+<td>Nexus S 4G</td>
+<td>sojus (crespo4g)</td>
+<td>full_crespo4g-userdebug</td>
+</tr>
+</tbody>
+</table>
+
+</p><aside class="note"><strong>注意</strong>:请不要在原本搭载 Android 4.1.2 或更高版本的 Nexus 7 上使用 Android 4.1.1。</aside>
+
+<h2 id="flashing-a-device">刷写设备</h2>
+
+<p>您可以通过运行一个命令来刷写整个 Android 系统;这样做可验证正在刷写的系统与已安装的引导加载程序和无线通信模块的驱动程序是否兼容,还可以将启动、恢复和系统分区一起写入,然后重新启动系统。与 <code>fastboot oem
+unlock</code> 类似,刷写设备也会清空所有用户数据。</p>
+
+<p>要刷写设备,请执行以下操作:</p>
+<ol>
+<li>在启动时按住相应的组合键或使用以下命令使设备进入 <code>fastboot</code> 模式:<pre class="devsite-click-to-copy devsite-terminal">adb reboot bootloader</pre></li>
+<li>在设备处于 fastboot 模式后,运行以下命令:
+<pre class="devsite-click-to-copy devsite-terminal">fastboot flashall -w</pre>
+<code>-w</code> 选项会清除设备上的 <code>/data</code> 分区;该选项在您第一次刷写特定设备时非常有用,但在其他情况下则没必要使用。</li>
+</ol>
+
+<aside class="note"><strong>注意</strong>:在 Motorola Xoom 上通过 <code>fastboot</code> 创建的文件系统无法发挥最佳作用。建议您使用 <code>$ adb reboot
+recovery</code> 命令通过恢复功能来重新创建文件系统。在执行恢复操作时,打开菜单(同时按电源键和音量调高键),擦除缓存分区,然后擦除数据。</aside>
+
+<h2 id="restoring-devices-to-factory-state">将设备恢复到出厂状态</h2>
+
+<p>您可以在 <a href="https://developers.google.com/android/nexus/images" class="external">Nexus 和 Pixel 设备的出厂映像</a>上查看 Google 设备的出厂映像。Motorola Xoom 的出厂映像由 Motorola 直接提供。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/community.html b/zh-cn/setup/community.html
index 457e12d1..7593a612 100644
--- a/zh-cn/setup/community.html
+++ b/zh-cn/setup/community.html
@@ -28,7 +28,7 @@
<h2 id="resources">资源</h2>
-<p>本网站介绍了如何构建自定义 Android 堆栈、如何为设备和配件移植 Android,以及如何满足兼容性要求。Android 操作系统是一个包含众多文件的 Git 代码库,而不是可供下载的单个文件(.zip、.tar、.exe 等)。您可以按照<a href="downloading.html">下载源代码</a>页面中的说明着手进行 Android 源代码工作。如需 Android 的其他相关信息,请参阅以下资源。</p>
+<p>本网站介绍了如何构建自定义 Android 堆栈、如何为设备和配件移植 Android,以及如何满足兼容性要求。Android 操作系统是一个包含众多文件的 Git 代码库,而不是可供下载的单个文件(.zip、.tar、.exe 等)。您可以按照<a href="build/downloading.html">下载源代码</a>页面中的说明着手进行 Android 源代码工作。如需 Android 的其他相关信息,请参阅以下资源。</p>
<table class="columns">
@@ -52,7 +52,7 @@
<p></p>
<h5>发送反馈</h5>
-<a href="/setup/report-bugs.html">报告 AOSP 错误</a><br />
+<a href="contribute/report-bugs.html">报告 AOSP 错误</a><br />
<p></p>
</td>
diff --git a/zh-cn/setup/contribute/code-style.html b/zh-cn/setup/contribute/code-style.html
new file mode 100644
index 00000000..fa06052c
--- /dev/null
+++ b/zh-cn/setup/contribute/code-style.html
@@ -0,0 +1,464 @@
+<html devsite><head>
+ <title>面向贡献者的 AOSP Java 代码样式指南</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>以下代码样式是向 Android 开源项目 (AOSP) 贡献 Java 代码时必须严格遵守的规则。如果向 Android 平台贡献的代码没有遵守这些规则,则通常不会被接受。<em></em>我们知道,并非所有现有的代码都遵守这些规则,但我们希望所有新代码都遵守这些规则。</p>
+
+<p class="note"><strong>注意</strong>:这些规则针对的是 Android 平台,Android 应用开发者可以不遵守这些规则。应用开发者可以遵守他们选择的标准,如 <a href="https://google.github.io/styleguide/javaguide.html">Google Java 样式指南</a>。</p>
+
+<h2 id="java-language-rules">Java 语言规则</h2>
+<p>Android 遵循标准 Java 编码规范以及下文所述的其他规则。</p>
+
+<h3 id="dont-ignore-exceptions">请勿忽略异常</h3>
+<p>开发者可能会倾向于编写完全忽略异常的代码,例如:</p>
+<pre><code>void setServerPort(String value) {
+ try {
+ serverPort = Integer.parseInt(value);
+ } catch (NumberFormatException e) { }
+}
+</code></pre>
+<p>千万不要这样做。虽然您可能认为自己的代码永远不会遇到这种错误,或者无需费心处理这种错误,但像上例那样忽略异常会在您的代码中埋下隐患,这种错误总有一天会被他人触发。您必须有原则地处理代码中的每个异常;具体处理方式因情况而异。</p>
+<p><em>无论何时,只要遇到空的 catch 子句,就应该保持警惕。当然,在某些时候,空的 catch 语句确实没什么问题,但至少你得想一想。</em>在 Java 中,无论怎么小心都不为过。- <a href="http://www.artima.com/intv/solid4.html">James Gosling</a></p>
+<p>可接受的替代方案(按优先顺序排列)包括:</p>
+<ul>
+<li>将异常抛给方法调用者。
+<pre><code>void setServerPort(String value) throws NumberFormatException {
+ serverPort = Integer.parseInt(value);
+}
+</code></pre>
+</li>
+<li>抛出一个适合您的抽象级别的新异常。
+<pre><code>void setServerPort(String value) throws ConfigurationException {
+ try {
+ serverPort = Integer.parseInt(value);
+ } catch (NumberFormatException e) {
+ throw new ConfigurationException("Port " + value + " is not valid.");
+ }
+}
+</code></pre>
+</li>
+<li>妥善处理错误,并替换 catch {} 块中的相应值。
+<pre><code>/** Set port. If value is not a valid number, 80 is substituted. */
+
+void setServerPort(String value) {
+ try {
+ serverPort = Integer.parseInt(value);
+ } catch (NumberFormatException e) {
+ serverPort = 80; // default port for server
+ }
+}
+</code></pre>
+</li>
+<li>捕获异常并抛出一个新的 <code>RuntimeException</code>。这样做比较危险,因此请仅在下述情况下采用这种方案:您确定,如果发生此错误,最适当的处理方式就是让应用崩溃。
+<pre><code>/** Set port. If value is not a valid number, die. */
+
+void setServerPort(String value) {
+ try {
+ serverPort = Integer.parseInt(value);
+ } catch (NumberFormatException e) {
+ throw new RuntimeException("port " + value " is invalid, ", e);
+ }
+}
+</code></pre>
+<p class="note"><strong>注意</strong>:原始异常会传递到 RuntimeException 的构造函数。如果您的代码必须采用 Java 1.3 进行编译,则必须忽略表示原因的异常。</p>
+</li>
+<li>最后一种方案:如果您确信忽略异常是合适的处理方式,那么您可以忽略异常,但您必须添加备注以充分说明理由:
+<pre><code>/** If value is not a valid number, original port number is used. */
+void setServerPort(String value) {
+ try {
+ serverPort = Integer.parseInt(value);
+ } catch (NumberFormatException e) {
+ // Method is documented to just ignore invalid user input.
+ // serverPort will just be unchanged.
+ }
+}
+</code></pre>
+</li>
+</ul>
+
+<h3 id="dont-catch-generic-exception">请勿捕获常规异常</h3>
+<p>在捕获异常时,开发者可能会为了偷懒而倾向于采用以下处理方式:</p>
+<pre><code>try {
+ someComplicatedIOFunction(); // may throw IOException
+ someComplicatedParsingFunction(); // may throw ParsingException
+ someComplicatedSecurityFunction(); // may throw SecurityException
+ // phew, made it all the way
+} catch (Exception e) { // I'll just catch all exceptions
+ handleError(); // with one generic handler!
+}
+</code></pre>
+<p>千万不要这样做。几乎所有情况下都不适合捕获常规异常或 Throwable(最好不要捕获 Throwable,因为它包含 Error 异常)。这样做非常危险,因为这意味着系统会在处理应用级错误期间捕获到您从未预料到的异常(包括 ClassCastException 之类的 RuntimeException)。它掩盖了代码的故障处理属性,也就是说,如果有人在您所调用的代码中添加了一种新类型的异常,编译器不会帮助您意识到您需要采取不同的方式来处理该错误。在大多数情况下,您不应以相同的方式处理不同类型的异常。</p>
+<p>这条规则的特例是:在测试代码和顶级代码中,您希望捕获所有类型的错误(以防它们显示在界面中或者以便一直进行批处理作业)。在这些情况下,您可以捕获常规异常(或 Throwable)并适当地处理错误。但在这样做之前,请务必三思,然后添加备注以说明为何在此处执行这类操作是安全之举。</p>
+<p>捕获常规异常的替代方案:</p>
+<ul>
+<li>
+<p>在单个 try 之后将每个异常作为单独的 catch 块分别进行捕获。这样做可能显得比较笨拙,但仍比捕获所有异常更可取。请注意,不要在 catch 块中过多地重复使用代码。</p></li><p></p>
+
+<li>
+<p>通过多个 try 块重构您的代码,使得错误处理过程更精细。从解析中分离出 IO,然后分别处理每种情况下的错误。</p>
+</li>
+<li>
+<p>重新抛出异常。很多时候,您无需在该级别捕获异常,只需让相应方法抛出异常即可。</p>
+</li>
+</ul>
+<p>请谨记:异常是您的朋友!当编译器抱怨您没有捕获异常时,别闷闷不乐!您应该微笑:因为编译器让您能够更加轻松地捕获代码中的运行时错误。</p>
+<h3 id="dont-use-finalizers">请勿使用终结器</h3>
+<p>终结器可以在对象被垃圾回收器回收时执行一段代码。虽然终结器非常便于进行资源清理(尤其是外部资源),但并不能保证终结器何时被调用(甚至根本不会被调用)。</p>
+<p>Android 不使用终结器。在大多数情况下,您可以通过良好的异常处理流程实现终结器功能。如果您的确需要终结器,请定义一个 close() 方法(或类似方法),并注明需要调用该方法的确切时间(有关示例,请参阅 InputStream)。这种情况下,可以(但并非必须)在终结器中输出简短的日志消息,前提是不会输出大量日志消息。</p>
+
+<h3 id="fully-qualify-imports">完全合格的导入</h3>
+<p>当您想要使用 foo 包中的 Bar 类时,可以使用以下两种方式导入:</p>
+<ul>
+<li><code>import foo.*;</code>
+<p>可能会减少 import 语句的数量。</p></li>
+<li><code>import foo.Bar;</code>
+<p>明确指出实际使用了哪些类,而且代码对于维护者来说更易读。</p></li></ul>
+<p>使用 <code>import foo.Bar;</code> 导入所有 Android 代码。对于 Java 标准库(<code>java.util.*</code>、<code>java.io.*</code> 等)和单元测试代码 (<code>junit.framework.*</code>),确立了一种明确的例外情况。</p>
+
+<h2 id="java-library-rules">Java 库规则</h2>
+<p>使用 Android 的 Java 库和工具需要遵守相关规范。在某些情况下,具体规范发生了一些重大变化,旧代码可能使用的是已弃用的模式或库。使用此类代码时,可以继续遵循现有样式。不过,在创建新组件时,请不要再使用已弃用的库。</p>
+
+<h2 id="java-style-rules">Java 样式规则</h2>
+
+<h3 id="use-javadoc-standard-comments">使用 Javadoc 标准备注</h3>
+<p>每个文件都应该在顶部放置版权声明,其后是 package 和 import 语句(各个块之间用空行分隔),最后是类或接口声明。在 Javadoc 备注中说明类或接口的作用。</p>
+<pre><code>/*
+ * Copyright 2017 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.
+ */
+
+package com.android.internal.foo;
+
+import android.os.Blah;
+import android.view.Yada;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+/**
+ * Does X and Y and provides an abstraction for Z.
+ */
+
+public class Foo {
+ ...
+}
+</code></pre>
+<p>您编写的每个类和重要的公开方法都必须包含 Javadoc 备注,至少用一句话说明类或方法的用途。<em></em>句式应以第三人称描述性动词开头。</p>
+<p>示例:</p>
+<pre><code>/** Returns the correctly rounded positive square root of a double value. */
+static double sqrt(double a) {
+ ...
+}
+</code></pre>
+<p>或</p>
+<pre><code>/**
+ * Constructs a new String by converting the specified array of
+ * bytes using the platform's default character encoding.
+ */
+public String(byte[] bytes) {
+ ...
+}
+</code></pre>
+<p>对于普通的 get 和 set 方法(如 <code>setFoo()</code>),您无需编写 Javadoc,要写也不过是“设置 Foo”。如果该方法执行更复杂的操作(例如强制实施约束条件或具有重大副作用),那么您必须添加备注。如果属性“Foo”的意思不明确,您也应该添加备注。
+</p><p>您所编写的每一种方法(无论是公开方法还是其他方法)都将受益于 Javadoc。公开方法是 API 的一部分,因此需要 Javadoc。Android 目前并不强制要求采用特定样式来编写 Javadoc 备注,但建议您参照<a href="http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html">如何为 Javadoc 工具编写文档备注</a>中的说明。</p>
+
+<h3 id="write-short-methods">编写简短方法</h3>
+<p>在可行的情况下,尽量编写短小精炼的方法。我们了解,有些情况下较长的方法是恰当的,因此对方法的代码长度没有做出硬性限制。如果某个方法的代码超出 40 行,请考虑是否可以在不破坏程序结构的前提下对其拆解。</p>
+
+<h3 id="define-fields-in-standard-places">在标准位置定义字段</h3>
+<p>在文件的顶部或者在使用它们的方法之前定义字段。</p>
+
+<h3 id="limit-variable-scope">限制变量的作用域</h3>
+<p>尽可能缩小局部变量的作用域。这样做有助于提高代码的可读性和可维护性,并降低出错的可能性。每个变量应该在包含变量所有使用场合的最内层的块中进行声明。</p>
+<p>局部变量应该在首次使用时声明。几乎每个局部变量声明都应该包含一个初始化程序。如果您还没有足够的信息来合理地初始化某个变量,请推迟到信息充足时再进行声明。</p>
+<p>try-catch 语句是例外情况。如果通过一个会抛出受检异常的方法的返回值来初始化变量,则必须在 try 块中进行初始化。如果该值必须在 try 块之外使用,那么您必须在 try 块之前对其进行声明,因为它在 try 块中尚无法合理地初始化:</p>
+<pre><code>// Instantiate class cl, which represents some sort of Set
+Set s = null;
+try {
+ s = (Set) cl.newInstance();
+} catch(IllegalAccessException e) {
+ throw new IllegalArgumentException(cl + " not accessible");
+} catch(InstantiationException e) {
+ throw new IllegalArgumentException(cl + " not instantiable");
+}
+
+// Exercise the set
+s.addAll(Arrays.asList(args));
+</code></pre>
+<p>不过,即使是这种情况,也可以通过将 try-catch 块封装在某个方法中来避免:</p>
+<pre><code>Set createSet(Class cl) {
+ // Instantiate class cl, which represents some sort of Set
+ try {
+ return (Set) cl.newInstance();
+ } catch(IllegalAccessException e) {
+ throw new IllegalArgumentException(cl + " not accessible");
+ } catch(InstantiationException e) {
+ throw new IllegalArgumentException(cl + " not instantiable");
+ }
+}
+
+...
+
+// Exercise the set
+Set s = createSet(cl);
+s.addAll(Arrays.asList(args));
+</code></pre>
+<p>循环变量应该在 for 语句本身中进行声明,除非有令人信服的理由不这么做:</p>
+<pre><code>for (int i = 0; i &lt; n; i++) {
+ doSomething(i);
+}
+</code></pre>
+<p>和</p>
+<pre><code>for (Iterator i = c.iterator(); i.hasNext(); ) {
+ doSomethingElse(i.next());
+}
+</code></pre>
+
+<h3 id="order-import-statements">为 import 语句排序</h3>
+<p>import 语句的顺序为:</p>
+<ol>
+<li>
+<p>导入 Android 包</p>
+</li>
+<li>
+<p>导入第三方包(<code>com</code>、<code>junit</code>、<code>net</code>、<code>org</code>)</p>
+</li>
+<li>
+<p><code>java</code> 和 <code>javax</code></p>
+</li>
+</ol>
+<p>要完全符合 IDE 设置,导入顺序应为:</p>
+<ul>
+<li>
+<p>每个分组内按字母顺序排序,其中大写字母开头的语句位于小写字母开头的语句前面(例如 Z 在 a 前面)。</p>
+</li>
+<li>
+<p>每个主要分组(<code>android</code>、<code>com</code>、<code>junit</code>、<code>net</code>、<code>org</code>、<code>java</code>、<code>javax</code>)之间用空行隔开。</p>
+</li>
+</ul>
+<p>最初对于语句顺序并没有样式要求,这意味着 IDE 经常会改变顺序,或者 IDE 开发者必须停用自动导入管理功能并手动维护导入语句。这样相当不方便。当提及 Java 样式时,开发者们喜欢的样式五花八门,最终针对 Android 简单归结为“选择一种兼容一致的排序方式”。因此我们选择了一种样式,更新了样式指南,并让 IDE 遵循该指南。我们希望 IDE 用户在编写代码时,系统对所有软件包的导入都符合此模式,无需再进行额外的工程处理。</p>
+<p>这种样式是按以下原则选取的:</p>
+<ul>
+<li>
+<p>用户希望先看到的导入往往位于顶部 (<code>android</code>)。</p>
+</li>
+<li>
+<p>用户最不希望看到的导入往往位于底部 (<code>java</code>)。</p>
+</li>
+<li>
+<p>用户可以轻松遵循的样式。</p>
+</li>
+<li>
+<p>IDE 可以遵循的样式。</p>
+</li>
+</ul>
+<p>将静态导入置于所有其他导入之上(与常规导入一样的排序方式)。</p>
+
+<h3 id="use-spaces-for-indentation">使用空格缩进</h3>
+<p>我们使用四 (4) 个空格来缩进块,而不要使用制表符。如果您有疑问,请与周围的代码保持一致。</p>
+<p>我们使用八 (8) 个空格来缩进自动换行,包括函数调用和赋值。正确示例如下:</p>
+<pre><code>Instrument i =
+ someLongExpression(that, wouldNotFit, on, one, line);
+</code></pre>
+<p>错误示例如下:</p>
+<pre><code>Instrument i =
+ someLongExpression(that, wouldNotFit, on, one, line);
+</code></pre>
+
+<h3 id="follow-field-naming-conventions">遵循字段命名规范</h3>
+<ul>
+<li>
+<p>非公开且非静态字段的名称以 m 开头。</p>
+</li>
+<li>
+<p>静态字段的名称以 s 开头。</p>
+</li>
+<li>
+<p>其他字段以小写字母开头。</p>
+</li>
+<li>
+<p>公开静态 final 字段(常量)为全部大写并用下划线连接 (ALL_CAPS_WITH_UNDERSCORES)。</p>
+</li>
+</ul>
+<p>例如:</p>
+<pre><code>public class MyClass {
+ public static final int SOME_CONSTANT = 42;
+ public int publicField;
+ private static MyClass sSingleton;
+ int mPackagePrivate;
+ private int mPrivate;
+ protected int mProtected;
+}
+</code></pre>
+<h3 id="use-standard-brace-style">使用标准大括号样式</h3>
+<p>左大括号不单独占一行,与其前面的代码位于同一行:</p>
+<pre><code>class MyClass {
+ int func() {
+ if (something) {
+ // ...
+ } else if (somethingElse) {
+ // ...
+ } else {
+ // ...
+ }
+ }
+}
+</code></pre>
+<p>我们需要在条件语句周围添加大括号。例外情况:如果整个条件语句(条件和主体)适合放在同一行,那么您可以(但不是必须)将其全部放在一行上。例如,我们接受以下样式:</p>
+<pre><code>if (condition) {
+ body();
+}
+</code></pre>
+<p>同样也接受以下样式:</p>
+<pre><code>if (condition) body();
+</code></pre>
+<p>但不接受以下样式:</p>
+<pre><code>if (condition)
+ body(); // bad!
+</code></pre>
+
+<h3 id="limit-line-length">限制代码行长度</h3>
+<p>您的代码中每一行文本的长度都应该不超过 100 个字符。虽然关于此规则存在很多争论,但最终决定仍是以 100 个字符为上限,不过存在以下例外情况:<em></em></p>
+<ul>
+<li>如果备注行包含长度超过 100 个字符的示例命令或文字网址,那么为了便于剪切和粘贴,该行可以超过 100 个字符。</li>
+<li>导入语句行可以超出此限制,因为用户很少会看到它们(这也简化了工具编写流程)。</li>
+</ul>
+
+<h3 id="use-standard-java-annotations">使用标准 Java 注释</h3>
+<p>注释应该位于同一语言元素的其他修饰符之前。简单的标记注释(例如 @Override)可以与语言元素列在同一行。如果有多个注释或参数化注释,则应各占一行并按字母顺序排列。</p>
+<p>Java 中 3 个预定义注释的 Android 标准做法如下:</p>
+<ul>
+<li><code>@Deprecated</code>:在不建议使用注释元素时,必须使用 @Deprecated 注释。如果您使用 @Deprecated 注释,则还必须为其添加 @deprecated Javadoc 标记,并且该标记应该指定一个替代实现方案。另外请注意,@Deprecated 方法应该仍然可以使用。<em></em>如果您看到带有 @deprecated Javadoc 标记的旧代码,请添加 @Deprecated 注释。
+</li>
+<li><code>@Override</code>:当某个方法替换了超类中的声明或实现时,必须使用 @Override 注释。例如,如果您使用 @inheritdocs Javadoc 标记,并且派生于某个类(而非接口),则必须再为方法添加 @Override 注释,说明该方法替换了父类的方法。</li>
+<li><code>@SuppressWarnings</code>:@SuppressWarnings 注释应该仅在无法消除警告的情况下使用。如果某个警告通过了“无法消除”测试,则必须使用 @SuppressWarnings 注释,以确保所有警告都会反映出代码中的实际问题。<em></em>
+<p>当需要 @SuppressWarnings 注释时,必须在前面添加一个 TODO 备注,用于说明“无法消除”情况。这通常会标识出是哪个违规类使用了糟糕的接口。例如:</p>
+<pre><code>// TODO: The third-party class com.third.useful.Utility.rotate() needs generics
+@SuppressWarnings("generic-cast")
+List&lt;String&gt; blix = Utility.rotate(blax);
+</code></pre>
+<p>当需要 @SuppressWarnings 注释时,您应该重构代码以分离出需要使用该注释的软件元素。</p>
+</li>
+</ul>
+
+<h3 id="treat-acronyms-as-words">将首字母缩写词视为字词</h3>
+<p>在为变量、方法和类命名时,请将首字母缩写词和缩写形式视为字词,使名称更具可读性:</p>
+<table>
+<thead>
+<tr>
+<th>良好</th>
+<th>不佳</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>XmlHttpRequest</td>
+<td>XMLHTTPRequest</td>
+</tr>
+<tr>
+<td>getCustomerId</td>
+<td>getCustomerID</td>
+</tr>
+<tr>
+<td>class Html</td>
+<td>class HTML</td>
+</tr>
+<tr>
+<td>String url</td>
+<td>String URL</td>
+</tr>
+<tr>
+<td>long id</td>
+<td>long ID</td>
+</tr>
+</tbody>
+</table>
+<p>由于 JDK 和 Android 代码库在首字母缩写词上非常不一致,几乎也不可能与周围的代码保持一致。因此,请务必将首字母缩写词视为字词。</p>
+
+<h3 id="use-todo-comments">使用 TODO 备注</h3>
+<p>为代码使用 TODO 备注是短期的临时解决方案,或者说足够好但并不完美。TODO 备注应该以全部大写的字符串 TODO 开头,后跟一个冒号:</p>
+<pre><code>// TODO: Remove this code after the UrlTable2 has been checked in.
+</code></pre>
+<p>和</p>
+<pre><code>// TODO: Change this to use a flag instead of a constant.
+</code></pre>
+<p>如果您的 TODO 采用“在未来的某个日期做某事”的形式,请确保在其中包含一个非常具体的日期(“在 2005 年 11 月前修复”)或者一个非常具体的事件(“在所有生产环境合成器都可处理 V7 协议后移除此代码”)。</p>
+
+<h3 id="log-sparingly">谨慎使用日志记录</h3>
+<p>虽然日志记录非常有必要,但对性能却有明显的负面影响,如果不能保持一定程度的简洁性,就会迅速失去其实用性。日志记录工具提供以下 5 种不同级别的日志记录:</p>
+<ul>
+<li><code>ERROR</code>:在出现极其严重的情况时使用。例如,某些事件会导致用户可见的后果,如果不明确删除某些数据、卸载应用、清除数据分区或重写整个设备(或更糟),则无法恢复。系统一直会记录此级别的日志。一般情况下,最好向统计信息收集服务器报告能够说明 ERROR 级别的一些日志记录情况的问题。</li>
+<li><code>WARNING</code>:在出现比较严重和意外的情况时使用。例如,某些事件会导致用户可见的后果,但是通过执行某些明确的操作(从等待或重启应用,一直到重新下载新版应用或重新启动设备)可在不丢失数据的情况下恢复。系统一直会记录此级别的日志。可以考虑向统计信息收集服务器报告能够说明 WARNING 级别的一些日志记录情况的问题。</li>
+<li><code>INFORMATIVE:</code>用于记录大多数人感兴趣的信息。例如,当检测到某种情况会造成广泛的影响时,尽管不一定是错误,系统也会记录下来。这种情况应该仅由一个被视为该领域最具权威性的模块来记录(避免由非权威组件重复记录)。系统一直会记录此级别的日志。
+</li>
+<li><code>DEBUG</code>:用于进一步记录设备上发生的可能与调查和调试意外行为相关的情况。您应该只记录收集有关组件的足够信息所需的信息。如果您的调试日志是主要日志,那么您可能应采用 VERBOSE 级别的日志记录。
+<p>系统会记录此级别的日志(即使在发布版本中),并且周围要有 <code>if (LOCAL_LOG)</code> 或 <code>if (LOCAL_LOGD)</code> 块,其中 <code>LOCAL_LOG[D]</code> 在您的类或子组件中定义。这样一来,系统有可能停用所有此类日志记录。因此,<code>if (LOCAL_LOG)</code> 块中不得包含有效逻辑。为日志编译的所有字符串也需要放在 <code>if
+(LOCAL_LOG)</code> 块中。如果日志记录调用会导致字符串编译在 <code>if (LOCAL_LOG)</code> 块之外发生,则不应将其重构为方法调用。</p>
+<p>有些代码仍然在使用 <code>if (localLOGV)</code>。虽然名称并不规范,但也可接受。</p>
+</li>
+<li><code>VERBOSE</code>:用于记录其他所有信息。系统仅针对调试版本记录此级别的日志,并且周围要有 <code>if (LOCAL_LOGV)</code> 块(或同类块),以便能够默认编译。所有字符串编译都将从发布版本中删除,并且需要在 <code>if (LOCAL_LOGV)</code> 块中显示。
+</li>
+</ul>
+<p><em>注意事项:</em> </p>
+<ul>
+<li>在指定模块中,除了 VERBOSE 级别之外,一个错误应该只报告一次(如果可能的话)。在模块内的单个函数调用链中,只有最内层的函数应当返回错误,同一模块中的调用者只能添加一些明显有助于隔离问题的日志记录。</li>
+<li>在一个模块链中,除了 VERBOSE 级别之外,当较低级别的模块检测到来自较高级别模块的无效数据时,低级模块应该只在 DEBUG 日志中记录该情况,并且仅当该日志提供的信息对调用者来说无法获取时进行记录。具体来说,当抛出异常(异常中应该会包含所有相关信息)或者所记录的所有信息都包含在错误代码中时,则不需要记录此类情况。这在框架和应用之间的交互中尤为重要,而且由第三方应用造成的情况经过框架妥善处理后,不应该触发高于 DEBUG 级别的日志记录。应该触发 INFORMATIVE 级别或更高级别日志记录的唯一情况是,模块或应用在其自身级别或更低级别检测到错误。</li>
+<li>当事实证明某些日志记录可能会发生多次时,最好实施一种频率限制机制来防止出现具有相同(或非常相似)信息的大量重复日志副本。</li>
+<li>失去网络连接属于完全在预期之内的常见情况,没必要记录下来。如果失去网络连接后导致在应用内出现某种后果,则应该记录为 DEBUG 或 VERBOSE 级别(具体取决于后果是否足够严重以及足够意外,足以记录在发布版本中)。</li>
+<li>如果在第三方应用可访问或代表第三方应用的文件系统上拥有完整的文件系统,则不应该记录高于 INFORMATIVE 级别的日志。</li>
+<li>来自任何不受信任来源(包括共享存储空间中的任何文件或通过任何网络连接获取的数据)的无效数据被视为符合预期,在被检测到无效时不应触发高于 DEBUG 级别的任何日志记录(甚至应该尽可能地限制日志记录)。</li>
+<li>请注意,在对 String 使用 <code>+</code> 运算符时,它会隐式创建一个具有默认缓冲区(大小为 16 个字符)的 <code>StringBuilder</code>,还可能会创建其他临时 String 对象。例如,显式创建 StringBuilder 并不比依赖默认的“+”运算符成本更高(实际上可能更高效)。请注意,即使没有读取日志信息,调用 <code>Log.v()</code> 的代码也会在发布版本中进行编译和执行,包括编译字符串。</li>
+<li>任何供其他人阅读并且在发布版本中提供的日志记录都应当简洁明了、合理易懂。这包括一直到 DEBUG 级别的所有日志记录。</li>
+<li>在内容有意义的情况下尽可能使日志记录在一行之内。一行长度在 80 到 100 个字符内是完全可以接受的,应当尽可能避免长度超过 130 或 160 个字符(包括标记的长度)。</li>
+<li>绝不能使用高于 VERBOSE 级别的日志记录报告成功事件。</li>
+<li>用于诊断难以重现的问题的临时日志记录应采用 DEBUG 或 VERBOSE 级别,并且应当包裹在 if 块中,以便在编译期间将其完全停用。</li>
+<li>请务必谨慎,避免在日志中泄露安全方面的信息。应避免提供个人信息,且必须避免提供有关受保护内容的信息。这在编写框架代码时尤为重要,因为事先无法轻易得知哪些是个人信息或受保护的内容,哪些不是。</li>
+<li>请勿使用 <code>System.out.println()</code>(或针对原生代码使用 <code>printf()</code>)。System.out 和 System.err 会重定向到 /dev/null,因此您的 print 语句不会产生可见效果。不过,为这些调用编译的所有字符串仍会得以执行。</li>
+<li><em>日志记录的黄金法则是,您的日志不一定要将其他日志排挤出缓冲区,正如其他日志不会这样对您的日志一样。</em></li>
+</ul>
+
+<h3 id="be-consistent">保持一致</h3>
+<p>总而言之:保持一致。如果您正在修改代码,请花几分钟时间看一下周围的代码并确定其样式。如果该代码在 if 语句周围使用空格,那么您也应该这样做。如果代码备注的周围是用星号组成的小方框,您也应该将备注放在这样的小方框内。</p>
+<p>制定样式规范的目的是整理出通用的编码词汇表,以便人们可以专注于您所说的内容,而不是您表达的方式。我们在此提出整体样式规则,让用户都知道这一词汇表,但局部样式也很重要。如果您添加到文件的代码看起来与其周围的现有代码明显不同,那么当读者读到此处时,这些代码会打乱他们的节奏。请尽量避免这种情况。</p>
+
+<h2 id="javatests-style-rules">Javatests 样式规则</h2>
+<p>请遵循测试方法的命名规范,并使用下划线将被测试的内容与被测试的具体情况区分开来。这种样式可让您更容易看出正在测试的情况。例如:</p>
+<pre><code>testMethod_specificCase1 testMethod_specificCase2
+
+void testIsDistinguishable_protanopia() {
+ ColorMatcher colorMatcher = new ColorMatcher(PROTANOPIA)
+ assertFalse(colorMatcher.isDistinguishable(Color.RED, Color.BLACK))
+ assertTrue(colorMatcher.isDistinguishable(Color.X, Color.Y))
+}
+</code></pre>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/contribute/index.html b/zh-cn/setup/contribute/index.html
new file mode 100644
index 00000000..1a7695f4
--- /dev/null
+++ b/zh-cn/setup/contribute/index.html
@@ -0,0 +1,40 @@
+<html devsite><head>
+ <title>做出贡献</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>感谢您对 Android 的关注!您可以通过以下几种方式进入 Android 的世界并帮助我们改进 Android。如需了解 Android 项目的背景和我们的目标,请查看<a href="../index.html">概览</a>页面。</p>
+
+<h2 id="report-bugs">报告错误</h2>
+
+<p>您可以帮助我们改进 Android 的最简单和最有效的方式之一是提交错误。如需了解详情,请访问<a href="report-bugs.html">报告错误</a>页面。</p>
+<p>请注意,我们无法保证会在任何特定版本中修复任何特定错误。要了解在您报告错误之后它们会经历些什么,请阅读<a href="life-of-a-bug.html">错误的生命周期</a>。</p>
+
+<h2 id="develop-apps">开发应用</h2>
+<p>我们构建 Android 的一个目标就是方便所有开发者通过一个开放的平台向用户分发应用。您可以帮助 Android 的最佳方式之一就是编写用户喜欢的超酷应用!</p>
+
+<p>要开始开发应用,请访问 <a href="https://developer.android.com">developer.android.com</a>。该网站为您提供了使用 SDK 编写适用于 Android 兼容设备的应用所需的信息和工具。</p>
+
+<h2 id="contribute-to-the-code">贡献代码</h2>
+<p>代码是一切的基础。我们很乐意审核您提交的任何更改,因此请检查我们的源代码,找出错误或功能方面的可改进之处,然后开始编码。请注意,您提交的补丁程序越小、越有针对性,就越方便我们进行审核。</p>
+
+<p>要开始帮助改进 Android,您可以通过左侧的链接了解<a href="life-of-a-patch.html">补丁程序的生命周期</a>、<code>git</code>、<code>repo</code> 以及其他工具。您还可以在我们的 <a href="https://android-review.googlesource.com/">Gerrit 服务器</a>上查看所有贡献的动态。如果您在此过程中需要帮助,可以加入我们的<a href="../community.html">论坛</a>。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/contribute/life-of-a-bug.html b/zh-cn/setup/contribute/life-of-a-bug.html
new file mode 100644
index 00000000..2b6f039e
--- /dev/null
+++ b/zh-cn/setup/contribute/life-of-a-bug.html
@@ -0,0 +1,90 @@
+<html devsite><head>
+ <title>错误的生命周期</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>Android 开放源代码项目维护着一个公开的问题跟踪器,您可以在其中针对 Android 核心软件堆栈报告错误及请求功能。(要详细了解此问题跟踪器,请参阅<a href="report-bugs.html">报告错误</a>页面。)
+报告错误意义重大(谢谢!),但在您提交错误报告后它们会经历些什么?本页将介绍错误的生命周期。</p>
+
+<p class="note">Android 开源项目 (AOSP) 问题跟踪器仅适用于与 Android 核心软件堆栈相关的错误和功能请求,是一款面向开源社区的技术工具。</p>
+
+<p>它不是一个客户支持论坛。要获取支持信息,请参阅 <a href="https://support.google.com/nexus">Nexus</a> 和 <a href="https://support.google.com/pixelphone">Pixel</a> 帮助中心。其他设备的支持由设备制造商或销售这些设备的运营商提供。</p>
+
+<p>通过 <a href="http://support.google.com/">Google 的支持网站</a>,可以获得 Google 应用方面的支持。对于第三方应用,则由每个应用的开发者提供支持,例如,您可以通过 Google Play 上提供的联系信息与他们联系。</p>
+
+<p>下面简要说明了错误的生命周期:</p>
+<ol>
+<li>用户提交一个错误,该错误的状态将为“New”(新)。</li>
+<li>AOSP 维护人员定期审核错误并进行分类。错误将被划分为以下 4 个类别之一:“New”(新)、“Open”(待解决)、“No-Action”(无需处理)或“Resolved”(已解决)。<em></em></li>
+<li>每个类别都包括多种状态,这些状态能够提供有关问题处理情况的更多详细信息。</li>
+<li>标记为“已解决”的错误最终将在未来版本的 Android 软件中予以修复。</li>
+</ol>
+
+<h2 id="bucket-details">类别详细信息</h2>
+<p>
+我们使用问题跟踪器中的 <strong>Status(状态)</strong>字段来指定问题处于解决过程中的什么状态。这与<a href="https://developers.google.com/issue-tracker/concepts/issues#status">问题跟踪器文档</a>中指定的定义一致。
+</p>
+<h3 id="new-issues">“新”问题</h3>
+<p>
+“新”问题包括尚未进行任何处理的错误报告,具有以下两种状态:
+</p>
+<ul>
+ <li><strong>New(新)</strong>:错误报告尚未被分类(即 AOSP 维护人员尚未审核。)</li>
+ <li><strong>New + Hotlist:NeedsInfo(新 + Hotlist:需要信息)</strong>:错误报告中的信息不充分,我们无法予以处理。报告错误的人员需要提供更多详细信息,然后我们才能对其进行分类。如果报告错误的人员在规定的时间内未提供新信息,相应错误默认可能会被关闭,变为“无需处理”类别下的某种状态。</li>
+</ul>
+<h3 id="open-issues">“待解决”的问题</h3>
+<p>
+此类别包含需要处理但仍未解决的错误(正在等待我们对源代码进行更改)。
+</p>
+<ul>
+ <li><strong>Assigned(已分配)</strong>:错误报告已被认定为细节充分、问题有效,且相应错误已被分配给特定贡献者进行评估和分析。</li>
+ <li><strong>Accepted(已接受)</strong>:被指派的人员已确认并已着手解决相应问题。</li>
+</ul>
+<p>
+通常情况下,错误一开始的状态为<strong>已分配</strong>且一直保持该状态,直到有人有意解决它,此时错误的状态会变为<strong>已接受</strong>。不过请注意,我们并不保证一定会是这样,而错误直接从<strong>已分配</strong>变为“已解决”类别下的某种状态也是很常见的。
+</p>
+<p>
+一般来说,如果错误处于“待解决”类别下的某种状态,则表明 AOSP 团队已将其认定为有效问题,并且贡献者贡献的高质量修复方案很可能会被接受。不过,我们无法保证及时修复任何特定版本的错误。
+</p>
+<h3 id="no-action-issues">“无需处理”的问题</h3>
+<p>
+此类别包含被视为不需要任何处理的错误。
+</p>
+<ul>
+ <li><strong>Won't Fix (Not reproducible)(无法修复(不可重现))</strong>:AOSP 贡献者尝试重现所描述的行为,但无法做到。有时,这意味着错误虽然有效但不常见或难以重现,或因信息不充分而无法解决问题。</li>
+ <li><strong>Won't Fix (Intended behavior)(无法修复(正常情况))</strong>:AOSP 维护人员已确定所描述的行为不是错误,而是正常情况。这种状态通常也称为“正常情况”(WAI)。<em></em>如果是功能请求,则 AOSP 维护人员已确定在 Android 中将不会实现相应请求。</li>
+ <li><strong>Won't Fix (Obsolete)(无法修复(过时))</strong>:由于产品有所变化,相应问题已无关紧要。</li>
+ <li><strong>Won't Fix (Infeasible)(无法修复(不可行))</strong>:解决问题所需进行的更改不可能实现。该状态还用于表示报告的问题无法在 AOSP 中予以处理,通常是因为问题与定制设备或外部应用相关,或者报告者误认为此跟踪器是帮助论坛。</li>
+ <li><strong>Duplicate(重复)</strong>:问题跟踪器中已有相同的报告。如有任何实际处理措施,都将针对相同报告予以报告。</li>
+</ul>
+<h3 id="resolved-issues">“已解决”的问题</h3>
+<p>
+此类别包含已被处理且现在被视为已解决的错误。
+</p>
+<ul>
+ <li><strong>Fixed (verified)(已修复(已通过验证))</strong>:相应错误已被修复,且修复方案已被纳入到一个正式版本中。在设置此状态的同时,我们也会尝试设置一个属性,说明错误是在哪个版本中修复的。</li>
+ <li><strong>Fixed(已修复)</strong>:相应错误已经在源代码树中予以修复(或功能已经实现),但修复方案尚未被纳入到正式版本中。</li>
+</ul>
+<h2 id="other-stuff">其他事项</h2>
+<p>
+上述状态和生命周期是我们通常在尝试跟踪软件时采取的方式。
+不过,由于 Android 包含大量软件,相应地也会收到大量错误报告。因此,有时候错误并没有经过正式流程中的所有状态。虽然我们会尽量确保系统保持最新状态,但我们倾向于定期进行“错误清除”- 在此过程中,我们会检查数据库并进行更新。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/contribute/life-of-a-patch.html b/zh-cn/setup/contribute/life-of-a-patch.html
new file mode 100644
index 00000000..e38b42c7
--- /dev/null
+++ b/zh-cn/setup/contribute/life-of-a-patch.html
@@ -0,0 +1,30 @@
+<html devsite><head>
+ <title>补丁程序的生命周期</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>Android 开源项目 (AOSP) 使用一种基于网页的代码审核工具,该工具称为 <a href="https://android-review.googlesource.com/">Gerrit</a>。下图是一个流程图,详细说明了补丁程序在编写好之后会发生什么。虽然这看起来可能非常复杂,但以下大多数步骤都是在网络应用中执行的。</p>
+<p>如需关于如何完成相关设置来使用 Gerrit 和 Git 的完整说明,请参阅<a href="submit-patches.html">提交补丁程序</a>页面。</p>
+<img src="/images/workflow-0.png" alt="工作流程示意图" id="figure1"/>
+<p class="img-caption">
+ <strong>图 1.</strong> 补丁程序工作流程
+</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/contribute/read-bug-reports.html b/zh-cn/setup/contribute/read-bug-reports.html
new file mode 100644
index 00000000..a3504027
--- /dev/null
+++ b/zh-cn/setup/contribute/read-bug-reports.html
@@ -0,0 +1,863 @@
+<html devsite><head>
+ <title>阅读错误报告</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>无论是任何类型的开发工作,出错都在所难免,而错误报告对于找出和解决问题至关重要。Android 的所有版本都支持通过 <a href="http://developer.android.com/tools/help/adb.html">Android 调试桥 (adb)</a> 获取错误报告;Android 4.2 及更高版本提供一个用于获取错误报告以及通过电子邮件、云端硬盘等分享报告的<a href="http://developer.android.com/tools/device.html#developer-device-options">开发者选项</a>。</p>
+
+<p>Android 错误报告中包含文本 (.txt) 格式的 <code>dumpsys</code>、<code>dumpstate</code> 和 <code>logcat</code> 数据,以便您轻松搜索特定内容。以下各部分详细说明了错误报告的组成部分、介绍了常见问题,并提供了关于查找与这些错误相关的日志的实用提示和 <code>grep</code> 命令。大多数部分中还包括 <code>grep</code> 命令及输出和/或 <code>dumpsys</code> 输出方面的示例。</p>
+
+<h2 id="logcat">Logcat</h2>
+<p><code>logcat</code> 日志是所有 <code>logcat</code> 信息的转储,并采用字符串形式。<strong>system</strong>(系统)部分专门用于记录框架方面的信息,与包含所有其他内容的 <strong>main</strong>(主要内容)部分相比,该部分包含更长时间内的记录。每行都以 <code>timestamp PID TID log-level</code> 开头。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>------ SYSTEM LOG (logcat -v threadtime -d *:v) ------
+--------- beginning of system
+<i>Blah</i>
+<i>Blah</i>
+<i>Blah</i>
+
+--------- beginning of main
+<i>Blah </i>
+<i>Blah</i>
+<i>Blah</i></pre><p></p>
+ </section>
+
+<h3 id="event-log">查看事件日志</h3>
+<p>该日志中包含将二进制格式转换成了字符串形式的日志消息。它比 <code>logcat</code> 日志要清晰明了,但也有些难以阅读。在查看事件日志时,您可以在这一部分中搜索特定进程 ID (PID),以查看相应进程一直在做什么。基本格式为:<code>timestamp PID TID log-level log-tag tag-values</code>。</p>
+
+<p>日志级别包括以下几种:</p>
+<ul>
+<li>V:详细</li>
+<li>D:调试</li>
+<li>I:信息</li>
+<li>W:警告</li>
+<li>E:错误</li>
+</ul>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>------ EVENT LOG (logcat -b events -v threadtime -d *:v) ------
+09-28 13:47:34.179 785 5113 I am_proc_bound: [0,23054,com.google.android.gms.unstable]
+09-28 13:47:34.777 785 1975 I am_proc_start: [0,23134,10032,com.android.chrome,broadcast,com.android.chrome/org.chromium.chrome.browser.precache.PrecacheServiceLauncher]
+09-28 13:47:34.806 785 2764 I am_proc_bound: [0,23134,com.android.chrome]
+...</pre><p></p>
+ </section>
+<p> </p>
+<p>有关其他实用的事件日志标记,请参阅 <a href="https://android.googlesource.com/platform/frameworks/base/+/master/services/core/java/com/android/server/EventLogTags.logtags">/services/core/java/com/android/server/EventLogTags.logtags</a>。</p>
+
+<h2 id="anrs-deadlocks">ANR 和死锁</h2>
+<p>错误报告有助于您找出导致<a href="http://developer.android.com/training/articles/perf-anr.html">应用无响应 (ANR)</a> 错误和死锁事件的原因。</p>
+
+<h3 id="determine-anr-app">找出无响应的应用</h3>
+<p>当某个应用在一定时间内没有响应(通常是由于主线程被阻塞或繁忙)时,系统会终止该进程并将堆栈转储到 <code>/data/anr</code>。要找出 ANR 背后的罪魁祸首,请为二进制事件日志中的 <code>am_anr</code> 执行 grep 命令。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>grep "am_anr" bugreport-2015-10-01-18-13-48.txt
+10-01 18:12:49.599 4600 4614 I am_anr : [0,29761,com.google.android.youtube,953695941,executing service com.google.android.youtube/com.google.android.apps.youtube.app.offline.transfer.OfflineTransferService]
+10-01 18:14:10.211 4600 4614 I am_anr : [0,30363,com.google.android.apps.plus,953728580,executing service com.google.android.apps.plus/com.google.android.apps.photos.service.PhotosService]</pre><p></p>
+ </section>
+
+<p></p>
+<p>您也可以为 <code>logcat</code> 日志(其中包含关于发生 ANR 时是什么在占用 CPU 的更多信息)中的 <code>ANR in</code> 执行 grep 命令。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>grep "ANR in" bugreport-2015-10-01-18-13-48.txt
+10-01 18:13:11.984 4600 4614 E ActivityManager: ANR in com.google.android.youtube
+10-01 18:14:31.720 4600 4614 E ActivityManager: ANR in com.google.android.apps.plus
+10-01 18:14:31.720 4600 4614 E ActivityManager: PID: 30363
+10-01 18:14:31.720 4600 4614 E ActivityManager: Reason: executing service com.google.android.apps.plus/com.google.android.apps.photos.service.PhotosService
+10-01 18:14:31.720 4600 4614 E ActivityManager: Load: 35.27 / 23.9 / 16.18
+10-01 18:14:31.720 4600 4614 E ActivityManager: CPU usage from 16ms to 21868ms later:
+10-01 18:14:31.720 4600 4614 E ActivityManager: 74% 3361/mm-qcamera-daemon: 62% user + 12% kernel / faults: 15276 minor 10 major
+10-01 18:14:31.720 4600 4614 E ActivityManager: 41% 4600/system_server: 18% user + 23% kernel / faults: 18597 minor 309 major
+10-01 18:14:31.720 4600 4614 E ActivityManager: 32% 27420/com.google.android.GoogleCamera: 24% user + 7.8% kernel / faults: 48374 minor 338 major
+10-01 18:14:31.720 4600 4614 E ActivityManager: 16% 130/kswapd0: 0% user + 16% kernel
+10-01 18:14:31.720 4600 4614 E ActivityManager: 15% 283/mmcqd/0: 0% user + 15% kernel
+...
+10-01 18:14:31.720 4600 4614 E ActivityManager: 0.1% 27248/irq/503-synapti: 0%
+10-01 18:14:31.721 4600 4614 I ActivityManager: Killing 30363:com.google.android.apps.plus/u0a206 (adj 0): bg anr</pre><p></p>
+ </section>
+
+<h3 id="find-stack-traces">查找堆栈跟踪</h3>
+<p>通常您可以找到与 ANR 对应的堆栈跟踪。请确保 VM 跟踪上的时间戳和 PID 与您正在调查的 ANR 相符,然后再检查进程的主线程。请注意:</p>
+<ul>
+<li>主线程只能让您了解发生 ANR 时它在做什么,这可能是导致 ANR 的真正原因,也可能不是。(错误报告中的堆栈可能是无辜的;可能有其他线程在恢复正常之前粘滞了很长时间,但不足以导致 ANR。)
+</li>
+<li>可能存在多组堆栈跟踪(<code>VM TRACES JUST NOW</code> 和 <code>VM TRACES AT LAST ANR</code>)。请确保您查看的是正确的部分。</li>
+</ul>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>------ VM TRACES AT LAST ANR (/data/anr/traces.txt: 2015-10-01 18:14:41) ------
+
+----- pid 30363 at 2015-10-01 18:14:11 -----
+Cmd line: com.google.android.apps.plus
+Build fingerprint: 'google/angler/angler:6.0/MDA89D/2294819:userdebug/dev-keys'
+ABI: 'arm'
+Build type: optimized
+Zygote loaded classes=3978 post zygote classes=27
+Intern table: 45068 strong; 21 weak
+JNI: CheckJNI is off; globals=283 (plus 360 weak)
+Libraries: /system/lib/libandroid.so /system/lib/libcompiler_rt.so /system/lib/libjavacrypto.so /system/lib/libjnigraphics.so /system/lib/libmedia_jni.so /system/lib/libwebviewchromium_loader.so libjavacore.so (7)
+Heap: 29% free, 21MB/30MB; 32251 objects
+Dumping cumulative Gc timings
+Total number of allocations 32251
+Total bytes allocated 21MB
+Total bytes freed 0B
+Free memory 9MB
+Free memory until GC 9MB
+Free memory until OOME 490MB
+Total memory 30MB
+Max memory 512MB
+Zygote space size 1260KB
+Total mutator paused time: 0
+Total time waiting for GC to complete: 0
+Total GC count: 0
+Total GC time: 0
+Total blocking GC count: 0
+Total blocking GC time: 0
+
+suspend all histogram: Sum: 119.728ms 99% C.I. 0.010ms-107.765ms Avg: 5.442ms Max: 119.562ms
+DALVIK THREADS (12):
+"Signal Catcher" daemon prio=5 tid=2 Runnable
+ | group="system" sCount=0 dsCount=0 obj=0x12c400a0 self=0xef460000
+ | sysTid=30368 nice=0 cgrp=default sched=0/0 handle=0xf4a69930
+ | state=R schedstat=( 9021773 5500523 26 ) utm=0 stm=0 core=1 HZ=100
+ | stack=0xf496d000-0xf496f000 stackSize=1014KB
+ | held mutexes= "mutator lock"(shared held)
+ native: #00 pc 0035a217 /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;&amp;, int, char const*, art::ArtMethod*, void*)+126)
+ native: #01 pc 0033b03b /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;&amp;) const+138)
+ native: #02 pc 00344701 /system/lib/libart.so (art::DumpCheckpoint::Run(art::Thread*)+424)
+ native: #03 pc 00345265 /system/lib/libart.so (art::ThreadList::RunCheckpoint(art::Closure*)+200)
+ native: #04 pc 00345769 /system/lib/libart.so (art::ThreadList::Dump(std::__1::basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;&amp;)+124)
+ native: #05 pc 00345e51 /system/lib/libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;&amp;)+312)
+ native: #06 pc 0031f829 /system/lib/libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;&amp;)+68)
+ native: #07 pc 00326831 /system/lib/libart.so (art::SignalCatcher::HandleSigQuit()+896)
+ native: #08 pc 003270a1 /system/lib/libart.so (art::SignalCatcher::Run(void*)+324)
+ native: #09 pc 0003f813 /system/lib/libc.so (__pthread_start(void*)+30)
+ native: #10 pc 00019f75 /system/lib/libc.so (__start_thread+6)
+ (no managed stack frames)
+
+"main" prio=5 tid=1 Suspended
+ | group="main" sCount=1 dsCount=0 obj=0x747552a0 self=0xf5376500
+ | sysTid=30363 nice=0 cgrp=default sched=0/0 handle=0xf74feb34
+ | state=S schedstat=( 331107086 164153349 851 ) utm=6 stm=27 core=3 HZ=100
+ | stack=0xff00f000-0xff011000 stackSize=8MB
+ | held mutexes=
+ kernel: __switch_to+0x7c/0x88
+ kernel: futex_wait_queue_me+0xd4/0x130
+ kernel: futex_wait+0xf0/0x1f4
+ kernel: do_futex+0xcc/0x8f4
+ kernel: compat_SyS_futex+0xd0/0x14c
+ kernel: cpu_switch_to+0x48/0x4c
+ native: #00 pc 000175e8 /system/lib/libc.so (syscall+28)
+ native: #01 pc 000f5ced /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+80)
+ native: #02 pc 00335353 /system/lib/libart.so (art::Thread::FullSuspendCheck()+838)
+ native: #03 pc 0011d3a7 /system/lib/libart.so (art::ClassLinker::LoadClassMembers(art::Thread*, art::DexFile const&amp;, unsigned char const*, art::Handle&lt;art::mirror::Class&gt;, art::OatFile::OatClass const*)+746)
+ native: #04 pc 0011d81d /system/lib/libart.so (art::ClassLinker::LoadClass(art::Thread*, art::DexFile const&amp;, art::DexFile::ClassDef const&amp;, art::Handle&lt;art::mirror::Class&gt;)+88)
+ native: #05 pc 00132059 /system/lib/libart.so (art::ClassLinker::DefineClass(art::Thread*, char const*, unsigned int, art::Handle&lt;art::mirror::ClassLoader&gt;, art::DexFile const&amp;, art::DexFile::ClassDef const&amp;)+320)
+ native: #06 pc 001326c1 /system/lib/libart.so (art::ClassLinker::FindClassInPathClassLoader(art::ScopedObjectAccessAlreadyRunnable&amp;, art::Thread*, char const*, unsigned int, art::Handle&lt;art::mirror::ClassLoader&gt;, art::mirror::Class**)+688)
+ native: #07 pc 002cb1a1 /system/lib/libart.so (art::VMClassLoader_findLoadedClass(_JNIEnv*, _jclass*, _jobject*, _jstring*)+264)
+ native: #08 pc 002847fd /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_VMClassLoader_findLoadedClass__Ljava_lang_ClassLoader_2Ljava_lang_String_2+112)
+ at java.lang.VMClassLoader.findLoadedClass!(Native method)
+ at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:362)
+ at java.lang.ClassLoader.loadClass(ClassLoader.java:499)
+ at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
+ at android.app.ActivityThread.installProvider(ActivityThread.java:5141)
+ at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
+ at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
+ at android.app.ActivityThread.-wrap1(ActivityThread.java:-1)
+ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
+ at android.os.Handler.dispatchMessage(Handler.java:102)
+ at android.os.Looper.loop(Looper.java:148)
+ at android.app.ActivityThread.main(ActivityThread.java:5417)
+ at java.lang.reflect.Method.invoke!(Native method)
+ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
+ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
+
+ ...
+<i> Stacks for other threads in this process follow</i>
+ ...</pre><p></p>
+ </section>
+
+<h3 id="deadlocks">查找死锁</h3>
+<p>由于线程出现粘滞,死锁往往首先表现为 ANR。如果系统服务器发生死锁,监控程序最终会将其终止,从而导致日志中出现类似以下的条目:<code>WATCHDOG KILLING SYSTEM PROCESS</code>。对于用户来说,他们看到的是设备重新启动,但从技术上来讲这是运行时重启,而不是真正的设备重新启动。</p>
+
+<ul>
+<li>在<strong>运行时</strong>重启时,系统服务器已死机并会重启,并且用户会看到设备返回到显示启动动画。</li>
+<li>在设备<strong>重新启动</strong>时,内核已崩溃,并且用户会看到设备返回到显示 Google 启动徽标。</li>
+</ul>
+
+<p>要查找死锁,请检查 VM 跟踪部分中是否存在以下模式:线程 A 在等待线程 B 占用的某些资源,而线程 B 也在等待线程 A 占用的某些资源。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>"Binder_B" prio=5 tid=73 Blocked
+ | group="main" sCount=1 dsCount=0 obj=0x13faa0a0 self=0x95e24800
+ | sysTid=2016 nice=0 cgrp=default sched=0/0 handle=0x8b68d930
+ | state=S schedstat=( 9351576559 4141431119 16920 ) utm=819 stm=116 core=1 HZ=100
+ | stack=0x8b591000-0x8b593000 stackSize=1014KB
+ | held mutexes=
+ at com.android.server.pm.UserManagerService.exists(UserManagerService.java:387)
+ - waiting to lock &lt;0x025f9b02&gt; (a android.util.ArrayMap) held by thread 20
+ at com.android.server.pm.PackageManagerService.getApplicationInfo(PackageManagerService.java:2848)
+ at com.android.server.AppOpsService.getOpsRawLocked(AppOpsService.java:881)
+ at com.android.server.AppOpsService.getOpsLocked(AppOpsService.java:856)
+ at com.android.server.AppOpsService.noteOperationUnchecked(AppOpsService.java:719)
+ - locked &lt;0x0231885a&gt; (a com.android.server.AppOpsService)
+ at com.android.server.AppOpsService.noteOperation(AppOpsService.java:713)
+ at com.android.server.AppOpsService$2.getMountMode(AppOpsService.java:260)
+ at com.android.server.MountService$MountServiceInternalImpl.getExternalStorageMountMode(MountService.java:3416)
+ at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:3228)
+ at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:3170)
+ at com.android.server.am.ActivityManagerService.startProcessLocked(ActivityManagerService.java:3059)
+ at com.android.server.am.BroadcastQueue.processNextBroadcast(BroadcastQueue.java:1070)
+ - locked &lt;0x044d166f&gt; (a com.android.server.am.ActivityManagerService)
+ at com.android.server.am.ActivityManagerService.finishReceiver(ActivityManagerService.java:16950)
+ at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:494)
+ at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2432)
+ at android.os.Binder.execTransact(Binder.java:453)
+...
+ "PackageManager" prio=5 tid=20 Blocked
+ | group="main" sCount=1 dsCount=0 obj=0x1304f4a0 self=0xa7f43900
+ | sysTid=1300 nice=10 cgrp=bg_non_interactive sched=0/0 handle=0x9fcf9930
+ | state=S schedstat=( 26190141996 13612154802 44357 ) utm=2410 stm=209 core=2 HZ=100
+ | stack=0x9fbf7000-0x9fbf9000 stackSize=1038KB
+ | held mutexes=
+ at com.android.server.AppOpsService.noteOperationUnchecked(AppOpsService.java:718)
+ - waiting to lock &lt;0x0231885a&gt; (a com.android.server.AppOpsService) held by thread 73
+ at com.android.server.AppOpsService.noteOperation(AppOpsService.java:713)
+ at com.android.server.AppOpsService$2.getMountMode(AppOpsService.java:260)
+ at com.android.server.AppOpsService$2.hasExternalStorage(AppOpsService.java:273)
+ at com.android.server.MountService$MountServiceInternalImpl.hasExternalStorage(MountService.java:3431)
+ at com.android.server.MountService.getVolumeList(MountService.java:2609)
+ at android.os.storage.StorageManager.getVolumeList(StorageManager.java:880)
+ at android.os.Environment$UserEnvironment.getExternalDirs(Environment.java:83)
+ at android.os.Environment.isExternalStorageEmulated(Environment.java:708)
+ at com.android.server.pm.PackageManagerService.isExternalMediaAvailable(PackageManagerService.java:9327)
+ at com.android.server.pm.PackageManagerService.startCleaningPackages(PackageManagerService.java:9367)
+ - locked &lt;0x025f9b02&gt; (a android.util.ArrayMap)
+ at com.android.server.pm.PackageManagerService$PackageHandler.doHandleMessage(PackageManagerService.java:1320)
+ at com.android.server.pm.PackageManagerService$PackageHandler.handleMessage(PackageManagerService.java:1122)
+ at android.os.Handler.dispatchMessage(Handler.java:102)
+ at android.os.Looper.loop(Looper.java:148)
+ at android.os.HandlerThread.run(HandlerThread.java:61)
+ at com.android.server.ServiceThread.run(ServiceThread.java:46)</pre><p></p>
+ </section>
+
+<h2 id="activities">Activity</h2>
+<p><a href="http://developer.android.com/guide/components/activities.html">Activity</a> 是一种应用组件,可为用户提供一个可交互的屏幕,用来执行某些操作(例如拨打电话号码、拍照、发送电子邮件等等)。从错误报告的角度来看,<a href="http://developer.android.com/reference/android/app/Activity.html">Activity</a> 是用户可以执行的一项明确具体的操作,这使得查找在崩溃期间处于聚焦状态的 Activity 变得非常重要。Activity 通过 ActivityManager 运行进程,因此找出指定 Activity 的所有进程停止和启动事件也有助于进行问题排查。</p>
+
+<h3 id="history-focused-activities">查看处于聚焦状态的 Activity</h3>
+<p>要查看记录的处于聚焦状态的 Activity,请搜索 <code>am_focused_activity</code>。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>grep "am_focused_activity" bugreport-2015-10-01-18-13-48.txt
+10-01 18:10:41.409 4600 14112 I am_focused_activity: [0,com.google.android.GoogleCamera/com.android.camera.CameraActivity]
+10-01 18:11:17.313 4600 5687 I am_focused_activity: [0,com.google.android.googlequicksearchbox/com.google.android.launcher.GEL]
+10-01 18:11:52.747 4600 14113 I am_focused_activity: [0,com.google.android.GoogleCamera/com.android.camera.CameraActivity]
+10-01 18:14:07.762 4600 5687 I am_focused_activity: [0,com.google.android.googlequicksearchbox/com.google.android.launcher.GEL]</pre><p></p>
+ </section>
+
+<h3 id="history-process-starts">查看进程启动事件</h3>
+<p>要查看记录的进程启动事件,请搜索 <code>Start proc</code>。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>grep "Start proc" bugreport-2015-10-01-18-13-48.txt
+10-01 18:09:15.309 4600 4612 I ActivityManager: Start proc 24533:com.metago.astro/u0a240 for broadcast com.metago.astro/com.inmobi.commons.analytics.androidsdk.IMAdTrackerReceiver
+10-01 18:09:15.687 4600 14112 I ActivityManager: Start proc 24548:com.google.android.apps.fitness/u0a173 for service com.google.android.apps.fitness/.api.services.ActivityUpsamplingService
+10-01 18:09:15.777 4600 6604 I ActivityManager: Start proc 24563:cloudtv.hdwidgets/u0a145 for broadcast cloudtv.hdwidgets/cloudtv.switches.SwitchSystemUpdateReceiver
+10-01 18:09:20.574 4600 6604 I ActivityManager: Start proc 24617:com.wageworks.ezreceipts/u0a111 for broadcast com.wageworks.ezreceipts/.ui.managers.IntentReceiver
+...</pre><p></p>
+ </section>
+
+<h3 id="device-thrashing">设备是否发生系统颠簸?</h3>
+<p>要确定设备是否发生<a href="https://en.wikipedia.org/wiki/Thrashing_(computer_science)">系统颠簸</a>,请检查在 <code>am_proc_died</code> 和 <code>am_proc_start</code> 前后的短时间内是否出现活动异常增加。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>grep -e "am_proc_died" -e "am_proc_start" bugreport-2015-10-01-18-13-48.txt
+10-01 18:07:06.494 4600 9696 I am_proc_died: [0,20074,com.android.musicfx]
+10-01 18:07:06.555 4600 6606 I am_proc_died: [0,31166,com.concur.breeze]
+10-01 18:07:06.566 4600 14112 I am_proc_died: [0,18812,com.google.android.apps.fitness]
+10-01 18:07:07.018 4600 7513 I am_proc_start: [0,20361,10113,com.sony.playmemories.mobile,broadcast,com.sony.playmemories.mobile/.service.StartupReceiver]
+10-01 18:07:07.357 4600 4614 I am_proc_start: [0,20381,10056,com.google.android.talk,service,com.google.android.talk/com.google.android.libraries.hangouts.video.CallService]
+10-01 18:07:07.784 4600 4612 I am_proc_start: [0,20402,10190,com.andcreate.app.trafficmonitor:loopback_measure_serivce,service,com.andcreate.app.trafficmonitor/.loopback.LoopbackMeasureService]
+10-01 18:07:10.753 4600 5997 I am_proc_start: [0,20450,10097,com.amazon.mShop.android.shopping,broadcast,com.amazon.mShop.android.shopping/com.amazon.identity.auth.device.storage.LambortishClock$ChangeTimestampsBroadcastReceiver]
+10-01 18:07:15.267 4600 6605 I am_proc_start: [0,20539,10173,com.google.android.apps.fitness,service,com.google.android.apps.fitness/.api.services.ActivityUpsamplingService]
+10-01 18:07:15.985 4600 4612 I am_proc_start: [0,20568,10022,com.android.musicfx,broadcast,com.android.musicfx/.ControlPanelReceiver]
+10-01 18:07:16.315 4600 7512 I am_proc_died: [0,20096,com.google.android.GoogleCamera]</pre><p></p>
+ </section>
+
+<h2 id="memory">内存</h2>
+<p>由于 Android 设备的物理内存通常都存在限制,因此管理随机存取存储器 (RAM) 至关重要。错误报告中包含一些用于指示内存不足的指标以及一个提供内存快照的 dumpstate。</p>
+
+<h3 id="low-memory">发现内存不足的情况</h3>
+<p>内存不足可能会导致系统发生颠簸,这是因为虽然内存不足时系统会终止某些进程来释放内存,但又会继续启动其他进程。要查看内存不足的确凿证据,请检查二进制事件日志中 <code>am_proc_died</code> 和 <code>am_proc_start</code> 条目的密集程度。</p>
+
+<p>内存不足还可能会减慢任务切换速度,并且可能会阻止进行返回尝试(因为用户尝试返回到的任务已被终止)。如果启动器被终止,它会在用户触摸主屏幕按钮时重启,并且日志中会显示启动器重新加载其内容。</p>
+
+<h4 id="historical-low-memory">查看历史指标</h4>
+<p>二进制事件日志中的 <code>am_low_memory</code> 条目表示最后一个缓存的进程已终止。在此之后,系统开始终止各项服务。
+
+ </p><section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>grep "am_low_memory" bugreport-2015-10-01-18-13-48.txt
+10-01 18:11:02.219 4600 7513 I am_low_memory: 41
+10-01 18:12:18.526 4600 14112 I am_low_memory: 39
+10-01 18:12:18.874 4600 7514 I am_low_memory: 38
+10-01 18:12:22.570 4600 14112 I am_low_memory: 40
+10-01 18:12:34.811 4600 20319 I am_low_memory: 43
+10-01 18:12:37.945 4600 6521 I am_low_memory: 43
+10-01 18:12:47.804 4600 14110 I am_low_memory: 43</pre><p></p>
+ </section>
+
+<h4 id="thrashing-indicators">查看系统颠簸指标</h4>
+<p>关于系统颠簸(分页、直接回收等)的其他指标包括 <code>kswapd</code>、<code>kworker</code> 和 <code>mmcqd</code> 消耗的 CPU 周期。(请注意,收集错误报告可能会影响系统颠簸指标。)</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>------ CPU INFO (top -n 1 -d 1 -m 30 -t) ------
+
+User 15%, System 54%, IOW 28%, IRQ 0%
+User 82 + Nice 2 + Sys 287 + Idle 1 + IOW 152 + IRQ 0 + SIRQ 5 = 529
+
+ PID TID PR CPU% S VSS RSS PCY UID Thread Proc
+15229 15229 0 19% R 0K 0K fg root kworker/0:2
+29512 29517 1 7% D 1173524K 101188K bg u0_a27 Signal Catcher com.google.android.talk
+24565 24570 3 6% D 2090920K 145168K fg u0_a22 Signal Catcher com.google.android.googlequicksearchbox:search
+19525 19525 2 6% R 3476K 1644K fg shell top top
+24957 24962 2 5% R 1706928K 125716K bg u0_a47 Signal Catcher com.google.android.GoogleCamera
+19519 19519 3 4% S 0K 0K fg root kworker/3:1
+ 120 120 0 3% S 0K 0K fg root mmcqd/1
+18233 18233 1 3% S 0K 0K fg root kworker/1:1
+25589 25594 1 2% D 1270476K 75776K fg u0_a8 Signal Catcher com.google.android.gms
+19399 19399 2 1% S 0K 0K fg root kworker/2:2
+ 1963 1978 1 0% S 1819100K 125136K fg system android.fg system_server
+ 1963 1981 3 0% S 1819100K 125136K fg system android.display system_server</pre><p></p>
+ </section>
+<p></p>
+
+<p>ANR 日志可以提供类似的内存快照。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>10-03 17:19:59.959 1963 1976 E ActivityManager: ANR in com.google.android.apps.magazines
+10-03 17:19:59.959 1963 1976 E ActivityManager: PID: 18819
+10-03 17:19:59.959 1963 1976 E ActivityManager: Reason: Broadcast of Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 cmp=com.google.android.apps.magazines/com.google.apps.dots.android.newsstand.appwidget.NewsWidgetProvider (has extras) }
+10-03 17:19:59.959 1963 1976 E ActivityManager: Load: 19.19 / 14.76 / 12.03
+10-03 17:19:59.959 1963 1976 E ActivityManager: CPU usage from 0ms to 11463ms later:
+10-03 17:19:59.959 1963 1976 E ActivityManager: 54% 15229/kworker/0:2: 0% user + 54% kernel
+10-03 17:19:59.959 1963 1976 E ActivityManager: 38% 1963/system_server: 14% user + 23% kernel / faults: 17152 minor 1073 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 11% 120/mmcqd/1: 0% user + 11% kernel
+10-03 17:19:59.959 1963 1976 E ActivityManager: 10% 2737/com.android.systemui: 4.7% user + 5.6% kernel / faults: 7211 minor 149 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 0.2% 1451/debuggerd: 0% user + 0.2% kernel / faults: 15211 minor 147 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 8.7% 6162/com.twofortyfouram.locale: 4% user + 4.7% kernel / faults: 4924 minor 260 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 6.1% 24565/com.google.android.googlequicksearchbox:search: 2.4% user + 3.7% kernel / faults: 2902 minor 129 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 6% 55/kswapd0: 0% user + 6% kernel
+10-03 17:19:59.959 1963 1976 E ActivityManager: 4.9% 18819/com.google.android.apps.magazines: 1.5% user + 3.3% kernel / faults: 10129 minor 986 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 2.8% 18233/kworker/1:1: 0% user + 2.8% kernel
+10-03 17:19:59.959 1963 1976 E ActivityManager: 4.2% 3145/com.android.phone: 2% user + 2.2% kernel / faults: 3005 minor 43 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 4.2% 8084/com.android.chrome: 2% user + 2.1% kernel / faults: 4798 minor 380 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 3.4% 182/surfaceflinger: 1.1% user + 2.3% kernel / faults: 842 minor 13 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 3% 18236/kworker/1:2: 0% user + 3% kernel
+10-03 17:19:59.959 1963 1976 E ActivityManager: 2.9% 19231/com.android.systemui:screenshot: 0.8% user + 2.1% kernel / faults: 6119 minor 348 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 2.3% 15350/kworker/0:4: 0% user + 2.3% kernel
+10-03 17:19:59.959 1963 1976 E ActivityManager: 2.2% 1454/mediaserver: 0% user + 2.2% kernel / faults: 479 minor 6 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 2% 16496/com.android.chrome:sandboxed_process10: 0.1% user + 1.8% kernel / faults: 3610 minor 234 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 1% 3119/com.android.nfc: 0.4% user + 0.5% kernel / faults: 1789 minor 17 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 1.7% 19337/com.jarettmillard.localeconnectiontype:background: 0.1% user + 1.5% kernel / faults: 7854 minor 439 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 0.7% 3066/com.google.android.inputmethod.latin: 0.3% user + 0.3% kernel / faults: 1336 minor 7 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 1% 25589/com.google.android.gms: 0.3% user + 0.6% kernel / faults: 2867 minor 237 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 0.9% 1460/sensors.qcom: 0.5% user + 0.4% kernel / faults: 262 minor 5 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 0.8% 3650/mpdecision: 0% user + 0.8% kernel / faults: 160 minor 1 major
+10-03 17:19:59.959 1963 1976 E ActivityManager: 0.1% 3132/com.redbend.vdmc: 0% user + 0% kernel / faults: 1746 minor 5 major</pre><p></p>
+ </section>
+
+<h3 id="memory-snapshot">获取内存快照</h3>
+<p>内存快照是一种 dumpstate,其中会列出正在运行的 Java 进程和本机进程(有关详情,请参阅<a href="https://developer.android.com/tools/debugging/debugging-memory.html#ViewingAllocations">查看整体内存分配</a>)。请注意,快照仅提供特定时刻的状态;在此快照之前,系统的状况可能更好,也可能更糟。</p>
+<ul>
+<li>要了解某个进程的运行时长,请参阅<a href="#process-runtime">进程运行时</a>。</li>
+<li>要了解为什么某个进程当前正在运行,请参阅<a href="#why-is-process-running">某个进程为什么正在运行?</a></li>
+</ul>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>Total PSS by OOM adjustment:
+ 86752 kB: Native
+ 22645 kB: surfaceflinger (pid 197)
+ 18597 kB: mediaserver (pid 204)
+ ...
+ 136959 kB: System
+ 136959 kB: system (pid 785)
+ 220218 kB: Persistent
+ 138859 kB: com.android.systemui (pid 947 / activities)
+ 39178 kB: com.android.nfc (pid 1636)
+ 28313 kB: com.android.phone (pid 1659)
+ 13868 kB: com.redbend.vdmc (pid 1646)
+ 9534 kB: Persistent Service
+ 9534 kB: com.android.bluetooth (pid 23807)
+ 178604 kB: Foreground
+ 168620 kB: com.google.android.googlequicksearchbox (pid 1675 / activities)
+ 9984 kB: com.google.android.apps.maps (pid 13952)
+ 188286 kB: Visible
+ 85326 kB: com.google.android.wearable.app (pid 1535)
+ 38978 kB: com.google.process.gapps (pid 1510)
+ 31936 kB: com.google.android.gms.persistent (pid 2072)
+ 27950 kB: com.google.android.gms.wearable (pid 1601)
+ 4096 kB: com.google.android.googlequicksearchbox:interactor (pid 1550)
+ 52948 kB: Perceptible
+ 52948 kB: com.google.android.inputmethod.latin (pid 1566)
+ 150851 kB: A Services
+ 81121 kB: com.google.android.gms (pid 1814)
+ 37586 kB: com.google.android.talk (pid 9584)
+ 10949 kB: com.google.android.music:main (pid 4019)
+ 10727 kB: com.motorola.targetnotif (pid 31071)
+ 10468 kB: com.google.android.GoogleCamera (pid 9984)
+ 33298 kB: Previous
+ 33298 kB: com.android.settings (pid 9673 / activities)
+ 165188 kB: B Services
+ 49490 kB: com.facebook.katana (pid 15035)
+ 22483 kB: com.whatsapp (pid 28694)
+ 21308 kB: com.iPass.OpenMobile (pid 5325)
+ 19788 kB: com.google.android.apps.googlevoice (pid 23934)
+ 17399 kB: com.google.android.googlequicksearchbox:search (pid 30359)
+ 9073 kB: com.google.android.apps.youtube.unplugged (pid 21194)
+ 7660 kB: com.iPass.OpenMobile:remote (pid 23754)
+ 7291 kB: com.pujie.wristwear.pujieblack (pid 24240)
+ 7157 kB: com.instagram.android:mqtt (pid 9530)
+ 3539 kB: com.qualcomm.qcrilmsgtunnel (pid 16186)
+ 204324 kB: Cached
+ 43424 kB: com.amazon.mShop.android (pid 13558)
+ 22563 kB: com.google.android.apps.magazines (pid 13844)
+ ...
+ 4298 kB: com.google.android.apps.enterprise.dmagent (pid 13826)</pre><p></p>
+ </section>
+
+<h2 id="broadcasts">广播</h2>
+<p>应用会生成广播,以便在当前应用内发送事件或向其他应用发送事件。广播接收方可以通过过滤器订阅特定消息,以便收听和响应广播。错误报告中包含已发送广播和未发送广播的相关信息,以及关于收听特定广播的所有接收方的 dumpsys。</p>
+
+<h3 id="historical-broadcasts">查看历史广播</h3>
+<p>历史广播是指已发送的广播,按时间逆序排列。</p>
+
+<p><strong>summary</strong>(摘要)部分用于提供最近 300 个前台广播和最近 300 个后台广播的概况。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre> Historical broadcasts summary [foreground]:
+ #0: act=android.intent.action.SCREEN_ON flg=0x50000010
+ +1ms dispatch +90ms finish
+ enq=2015-10-29 17:10:51 disp=2015-10-29 17:10:51 fin=2015-10-29 17:10:51
+ #1: act=android.intent.action.SCREEN_OFF flg=0x50000010
+ 0 dispatch +60ms finish
+ enq=2015-10-29 17:10:05 disp=2015-10-29 17:10:05 fin=2015-10-29 17:10:05
+ ...
+ Historical broadcasts summary [background]:
+ ...</pre><p></p>
+ </section>
+<p></p>
+
+<p><strong>detail</strong>(详情)部分包含最近 50 条前台广播和最近 50 条后台广播的完整信息,以及每个广播的接收方。其中:</p>
+<ul>
+<li>具有 <code>BroadcastRecord</code> 条目的接收方是在运行时注册的,并且只会被发送到已在运行的进程。</li>
+<li>具有 <code>ResolveInfo</code> 条目的接收方是通过清单条目注册的。ActivityManager 会为每个 <code>ResolveInfo</code> 启动相应进程(如果相应进程尚未在运行)。</li>
+</ul>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>Historical broadcasts [foreground]:
+ ...
+ Historical broadcasts [background]:
+ Historical Broadcast background #0:
+ ...
+ Historical Broadcast background #5:
+ BroadcastRecord{18dbb16 u0 android.intent.action.USER_PRESENT} to user 0
+ Intent { act=android.intent.action.USER_PRESENT flg=0x24000010 }
+ caller=com.android.systemui 2925:com.android.systemui/u0a27 pid=2925 uid=10027
+ enqueueClockTime=2015-10-29 17:10:55 dispatchClockTime=2015-10-29 17:10:55
+ dispatchTime=-2s321ms (0 since enq) finishTime=-2s320ms (+1ms since disp)
+ Receiver #0: BroadcastFilter{8181cc1 u-1 ReceiverList{5d929a8 902 system/1000/u-1 local:eca4dcb}}
+ Receiver #1: BroadcastFilter{6371c97 u-1 ReceiverList{2938b16 902 system/1000/u-1 local:840b831}}
+ ...
+ Receiver #19: BroadcastFilter{93f16b u0 ReceiverList{5c61eba 17016 com.google.android.gm/10079/u0 remote:24083e5}}
+ ...
+ Historical Broadcast background #37:
+ BroadcastRecord{7f6dd6 u0 android.hardware.action.NEW_PICTURE} to user 0
+ Intent { act=android.hardware.action.NEW_PICTURE dat=content://media/external/images/media/6345 flg=0x10 }
+ caller=com.google.android.GoogleCamera 32734:com.google.android.GoogleCamera/u0a53 pid=32734 uid=10053
+ enqueueClockTime=2015-10-29 17:09:48 dispatchClockTime=2015-10-29 17:09:49
+ dispatchTime=-45s720ms (+399ms since enq) finishTime=-45s701ms (+19ms since disp)
+ resultTo=null resultCode=0 resultData=null
+ nextReceiver=4 receiver=null
+ Receiver #0: ResolveInfo{33d2857 com.google.android.gms/com.google.android.libraries.social.mediamonitor.MediaMonitor m=0x608000}
+ priority=0 preferredOrder=0 match=0x608000 specificIndex=-1 isDefault=false
+ ActivityInfo:
+ name=com.google.android.libraries.social.mediamonitor.MediaMonitor
+ packageName=com.google.android.gms
+ enabled=true exported=true processName=com.google.android.gms
+ ...
+ Receiver #1: ResolveInfo{d9edf44 com.google.android.apps.maps/com.google.android.apps.gmm.ugc.clientnotification.StartPhotoTakenNotifierServiceReceiver m=0x608000}
+ priority=0 preferredOrder=0 match=0x608000 specificIndex=-1 isDefault=false
+ ActivityInfo:
+ name=com.google.android.apps.gmm.ugc.clientnotification.StartPhotoTakenNotifierServiceReceiver
+ packageName=com.google.android.apps.maps
+ enabled=true exported=true processName=com.google.android.apps.maps
+ ...
+ Receiver #2: ResolveInfo{743f82d com.google.android.apps.photos/com.google.android.libraries.social.mediamonitor.MediaMonitor m=0x608000}
+ priority=0 preferredOrder=0 match=0x608000 specificIndex=-1 isDefault=false
+ ActivityInfo:
+ name=com.google.android.libraries.social.mediamonitor.MediaMonitor
+ packageName=com.google.android.apps.photos
+ enabled=true exported=true processName=com.google.android.apps.photos
+ ...
+ Receiver #3: ResolveInfo{d5c9162 com.google.android.apps.plus/com.google.android.libraries.social.mediamonitor.MediaMonitor m=0x608000}
+ priority=0 preferredOrder=0 match=0x608000 specificIndex=-1 isDefault=false
+ ActivityInfo:
+ name=com.google.android.libraries.social.mediamonitor.MediaMonitor
+ packageName=com.google.android.apps.plus
+ enabled=true exported=true processName=com.google.android.apps.plus
+ ...</pre><p></p>
+ </section>
+
+<h3 id="active-broadcasts">查看待发送的广播</h3>
+<p>待发送的广播是指尚未发送的广播。如果队列中存在大量广播,则意味着系统无法足够快地发送广播来跟上进度。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre> Active ordered broadcasts [background]:
+ Active Ordered Broadcast background #133: <i>// size of queue</i>
+ ...</pre><p></p>
+ </section>
+
+<h3 id="broadcast-listeners">查看广播监听器</h3>
+<p>要查看监听某条广播的接收方列表,请查看 <code>dumpsys activity broadcasts</code> 中的 Receiver Resolver Table。以下示例显示了监听 <code>USER_PRESENT</code> 的所有接收方。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>-------------------------------------------------------------------------------
+ACTIVITY MANAGER BROADCAST STATE (dumpsys activity broadcasts)
+..
+ Receiver Resolver Table:
+ Full MIME Types:
+ ..
+ Wild MIME Types:
+ ..
+ Schemes:
+ ..
+ Non-Data Actions:
+ ..
+ android.intent.action.USER_PRESENT:
+ BroadcastFilter{8181cc1 u-1 ReceiverList{5d929a8 902 system/1000/u-1 local:eca4dcb}}
+ BroadcastFilter{6371c97 u-1 ReceiverList{2938b16 902 system/1000/u-1 local:840b831}}
+ BroadcastFilter{320c00 u0 ReceiverList{d3a6283 902 system/1000/u0 local:799c532}}
+ BroadcastFilter{e486048 u0 ReceiverList{36fbaeb 902 system/1000/u0 local:5f51e3a}}
+ BroadcastFilter{22b02 u-1 ReceiverList{b3f744d 902 system/1000/u-1 local:de837e4}}
+ BroadcastFilter{3e989ab u0 ReceiverList{f8deffa 2981 com.google.process.gapps/10012/u0 remote:26bd225}}
+ BroadcastFilter{fb56150 u0 ReceiverList{22b7b13 2925 com.android.systemui/10027/u0 remote:c54a602}}
+ BroadcastFilter{63bbb6 u-1 ReceiverList{ba6c751 3484 com.android.nfc/1027/u-1 remote:5c4a478}}
+ BroadcastFilter{95ad20d u0 ReceiverList{d8374a4 3586 com.google.android.googlequicksearchbox/10029/u0 remote:feb3737}}
+ BroadcastFilter{fdef551 u0 ReceiverList{28ca78 3745 com.google.android.gms.persistent/10012/u0 remote:f23afdb}}
+ BroadcastFilter{9830707 u0 ReceiverList{aabd946 3745 com.google.android.gms.persistent/10012/u0 remote:a4da121}}
+ BroadcastFilter{83c43d2 u0 ReceiverList{d422e5d 3745 com.google.android.gms.persistent/10012/u0 remote:f585034}}
+ BroadcastFilter{8890378 u0 ReceiverList{26d2cdb 3745 com.google.android.gms.persistent/10012/u0 remote:dfa61ea}}
+ BroadcastFilter{7bbb7 u0 ReceiverList{214b2b6 3745 com.google.android.gms.persistent/10012/u0 remote:8353a51}}
+ BroadcastFilter{38d3566 u0 ReceiverList{de859c1 3745 com.google.android.gms.persistent/10012/u0 remote:e003aa8}}
+ BroadcastFilter{3435d9f u0 ReceiverList{6e38b3e 3745 com.google.android.gms.persistent/10012/u0 remote:8dd7ff9}}
+ BroadcastFilter{d0a34bb u0 ReceiverList{5091d4a 3745 com.google.android.gms.persistent/10012/u0 remote:d6d22b5}}
+ BroadcastFilter{d43c416 u0 ReceiverList{51a3531 3745 com.google.android.gms.persistent/10012/u0 remote:d0b9dd8}}
+ BroadcastFilter{aabf36d u0 ReceiverList{a88bf84 3745 com.google.android.gms.persistent/10012/u0 remote:a9d6197}}
+ BroadcastFilter{93f16b u0 ReceiverList{5c61eba 17016 com.google.android.gm/10079/u0 remote:24083e5}}
+ BroadcastFilter{68f794e u0 ReceiverList{4cb1c49 947 com.google.android.googlequicksearchbox:search/10029/u0 remote:251d250}}
+ ..
+ MIME Typed Actions:</pre><p></p>
+ </section>
+
+<h2 id="monitor contention">监视器争用</h2>
+<p>监视器争用日志记录有时可以表明实际的监视器争用情况,但通常情况下表明系统负载过重,从而导致所有进程都变慢了。您可能会在系统日志或事件日志中看到 ART 记录的长时间占用监视器的事件。</p>
+
+<p>在系统日志中:</p>
+<p></p><pre>10-01 18:12:44.343 29761 29914 W art : Long monitor contention event with owner method=void android.database.sqlite.SQLiteClosable.acquireReference() from SQLiteClosable.java:52 waiters=0 for 3.914s</pre><p></p>
+
+<p>在事件日志中:</p>
+<p></p><pre>10-01 18:12:44.364 29761 29914 I dvm_lock_sample: [com.google.android.youtube,0,pool-3-thread-9,3914,ScheduledTaskMaster.java,138,SQLiteClosable.java,52,100]</pre><p></p>
+
+<h2 id="background-compilation">后台编译</h2>
+<p>编译可能会占用大量资源,而且会加重设备负载。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>09-14 06:27:05.670 2508 2587 E ActivityManager: CPU usage from 0ms to 5857ms later:
+09-14 06:27:05.670 2508 2587 E ActivityManager: 84% 5708/dex2oat: 81% user + 2.3% kernel / faults: 3731 minor 1 major
+09-14 06:27:05.670 2508 2587 E ActivityManager: 73% 2508/system_server: 21% user + 51% kernel / faults: 10019 minor 28 major
+09-14 06:27:05.670 2508 2587 E ActivityManager: 1% 3935/com.android.phone: 0.3% user + 0.6% kernel / faults: 2684 minor 2 major</pre><p></p>
+ </section>
+<p></p>
+
+<p>下载 Google Play 商店更新时,编译可能会在后台进行。在这种情况下,来自 Google Play 商店应用 (<code>finsky</code>) 和 <code>installd</code> 的消息会显示在 <code>dex2oat</code> 消息之前。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>10-07 08:42:33.725 11051 11051 D Finsky : [1] InstallerTask.advanceState: Prepare to patch com.garmin.android.apps.virb (com.garmin.android.apps.virb) from content://downloads/my_downloads/3602 format 2
+10-07 08:42:33.752 495 495 I installd: free_cache(48637657) avail 15111192576
+…
+10-07 08:42:39.998 2497 2567 I PackageManager.DexOptimizer: Running dexopt (dex2oat) on: /data/app/vmdl436577137.tmp/base.apk pkg=com.garmin.android.apps.virb isa=arm vmSafeMode=false debuggable=false oatDir = /data/app/vmdl436577137.tmp/oat bootComplete=true
+…</pre><p></p>
+ </section>
+<p></p>
+
+<p>当某个应用加载尚未编译的 dex 文件时,编译也可能会在后台进行。在这种情况下,您将看不到 <code>finsky</code> 或 <code>installd</code> 日志记录。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>09-14 07:29:20.433 15736 15736 I dex2oat : /system/bin/dex2oat -j4 --dex-file=/data/user/0/com.facebook.katana/app_secondary_program_dex/program-72cef82b591768306676e10161c886b58b34315a308602be.dex.jar --oat-file=/data/user/0/com.facebook.katana/app_secondary_program_dex_opt/program-72cef82b591768306676e10161c886b58b34315a308602be.dex.dex
+...
+09-14 07:29:25.102 15736 15736 I dex2oat : dex2oat took 4.669s (threads: 4) arena alloc=7MB java alloc=3MB native alloc=29MB free=4MB</pre><p></p>
+ </section>
+
+<h2 id="narrative">概况</h2>
+<p>要呈现问题概况(问题是如何开始的、发生了什么、系统是如何应对的),需要一个固定的事件时间轴。您可以利用错误报告中的信息来同步多个日志中的时间轴并确定错误报告的确切时间戳。</p>
+
+<h3 id="timelines">同步时间轴</h3>
+<p>错误报告反映的是多个并行时间轴(系统日志、事件日志、内核日志,以及针对广播、电池统计信息等的多个专用时间轴)。遗憾的是,系统通常会使用不同的时间基准来报告不同的时间轴。</p>
+
+<p>系统日志时间戳和事件日志时间戳采用用户所用的时区(与大多数其他时间戳一样)。例如,当用户点按主屏幕按钮时,系统日志会报告以下内容:</p>
+<p></p><pre>10-03 17:19:52.939 1963 2071 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.google.android.googlequicksearchbox/com.google.android.launcher.GEL (has extras)} from uid 1000 on display 0</pre><p></p>
+
+<p>对于上述操作,事件日志会报告以下内容:</p>
+<p></p><pre>10-03 17:19:54.279 1963 2071 I am_focused_activity: [0,com.google.android.googlequicksearchbox/com.google.android.launcher.GEL]</pre><p></p>
+
+<p>内核 (<code>dmesg</code>) 日志采用不同的时间基准,按距离引导加载程序完成的时间来标记日志内容(以秒为单位)。要按照其他时间表的时间基准记录此时间表,请搜索“suspend exit”(暂停退出)和“suspend entry”(暂停进入)消息:<em></em><em></em></p>
+<p></p><pre>&lt;6&gt;[201640.779997] PM: suspend exit 2015-10-03 19:11:06.646094058 UTC
+…
+&lt;6&gt;[201644.854315] PM: suspend entry 2015-10-03 19:11:10.720416452 UTC</pre><p></p>
+
+<p>由于内核日志在暂停状态下可能不会包含时间,因此您应该分段记录暂停进入和暂停退出消息之间的日志。此外,内核日志使用 UTC 时区,您必须将其调整为用户时区。</p>
+
+<h3 id="time-of-bugreport">确定错误报告的生成时间</h3>
+<p>要确定错误报告的生成时间,请先查看系统日志 (Logcat) 中的 <code>dumpstate: begin</code>:</p>
+<p></p><pre>10-03 17:19:54.322 19398 19398 I dumpstate: begin</pre><p></p>
+
+<p>接下来,查看内核日志 (<code>dmesg</code>) 时间戳中的 <code>Starting service
+'bugreport'</code> 消息:</p>
+<p></p><pre>&lt;5&gt;[207064.285315] init: Starting service 'bugreport'...</pre><p></p>
+
+<p>进行逆向推算以关联这两个事件,同时牢记<a href="#timelines">同步时间轴</a>中提到的注意事项。尽管在初始化错误报告之后发生了很多活动,但大多数活动并不是非常有用,因为生成错误报告这一活动会大大加重系统负载。</p>
+
+<h2 id="power">电源</h2>
+
+<p>事件日志中包含屏幕电源状态信息,其中 0 表示屏幕关闭,1 表示屏幕打开,2 表示已锁屏。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>grep screen_toggled bugreport-2015-10-18-16-52-22.txt
+10-18 15:05:04.383 992 992 I screen_toggled: 1
+10-18 15:05:07.010 992 992 I screen_toggled: 0
+10-18 15:23:15.063 992 992 I screen_toggled: 1
+10-18 15:23:25.684 992 992 I screen_toggled: 0
+10-18 15:36:31.623 992 992 I screen_toggled: 1
+10-18 15:36:37.660 3283 3283 I screen_toggled: 2</pre><p></p>
+ </section>
+
+<p></p>
+<p>错误报告中还包含关于唤醒锁定的统计信息,唤醒锁定是应用开发者采用的一种机制,用于表明其应用需要设备保持开启状态。(要详细了解唤醒锁定,请参阅 <a href="https://developer.android.com/reference/android/os/PowerManager.WakeLock.html">PowerManager.WakeLock</a> 和<a href="https://developer.android.com/training/scheduling/wakelock.html#cpu">使 CPU 保持运行状态</a>。)
+
+</p><p>唤醒锁定总时长统计信息<strong>仅</strong>跟踪唤醒锁定实际负责使设备保持唤醒状态的时间,<strong>不</strong>包括屏幕处于开启状态的时间。此外,如果同时持有多个唤醒锁定,系统会在它们之间分配唤醒锁定时长。</p>
+
+<p>如需直观呈现电源状态方面的更多帮助,请使用 <a href="https://github.com/google/battery-historian">Battery Historian</a>(一种 Google 开放源代码工具,能够利用 Android 错误报告文件分析电池消耗进程)。</p>
+
+<h2 id="packages">软件包</h2>
+<p>“DUMP OF SERVICE”软件包中包含应用版本信息(以及其他实用信息)。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>...
+Packages:
+...
+ Package [com.google.android.gms] (3cf534b):
+ userId=10013
+ sharedUser=SharedUserSetting{98f3d28 com.google.uid.shared/10013}
+ pkg=Package{b8f6a41 com.google.android.gms}
+ codePath=/system/priv-app/PrebuiltGmsCore
+ resourcePath=/system/priv-app/PrebuiltGmsCore
+ legacyNativeLibraryDir=/system/priv-app/PrebuiltGmsCore/lib
+ primaryCpuAbi=arm64-v8a
+ secondaryCpuAbi=armeabi-v7a
+ versionCode=8186448 targetSdk=23
+ versionName=8.1.86 (2287566-448)
+ splits=[base]
+ applicationInfo=ApplicationInfo{5158507 com.google.android.gms}
+ flags=[ SYSTEM HAS_CODE ALLOW_CLEAR_USER_DATA ]
+ privateFlags=[ PRIVILEGED ]
+ dataDir=/data/user/0/com.google.android.gms
+ supportsScreens=[small, medium, large, xlarge, resizeable, anyDensity]
+ libraries:
+ com.google.android.gms
+ usesOptionalLibraries:
+ com.android.location.provider
+ com.google.android.ble
+ com.android.media.remotedisplay
+ usesLibraryFiles:
+ /system/framework/com.android.media.remotedisplay.jar
+ /system/framework/com.android.location.provider.jar
+ timeStamp=2015-10-14 15:17:56
+ firstInstallTime=2015-09-22 14:08:35
+ lastUpdateTime=2015-10-14 15:17:56
+ signatures=PackageSignatures{db63be6 [1af63d8]}
+ installPermissionsFixed=true installStatus=1
+ pkgFlags=[ SYSTEM HAS_CODE ALLOW_CLEAR_USER_DATA ]
+ declared permissions:
+ com.google.android.gms.permission.INTERNAL_BROADCAST: prot=signature, INSTALLED
+ ...
+ com.google.android.gms.permission.CAR_VENDOR_EXTENSION: prot=dangerous, INSTALLED
+ User 0: installed=true hidden=false stopped=false notLaunched=false enabled=0
+ disabledComponents:
+ com.google.android.gms.icing.service.PowerConnectedReceiver
+ ...
+ com.google.android.gms.icing.proxy.AppsMonitor
+ enabledComponents:
+ com.google.android.gms.mdm.receivers.GmsRegisteredReceiver
+ ...
+ com.google.android.gms.subscribedfeeds.SyncService</pre><p></p>
+ </section>
+
+<h2 id="processes">进程</h2>
+<p>错误报告中包含大量的进程数据,例如启动和停止时间、运行时时长、相关服务、<code>oom_adj</code> 得分等。要详细了解 Android 如何管理进程,请参阅<a href="http://developer.android.com/guide/components/processes-and-threads.html">进程和线程</a>。</p>
+
+<h3 id="process-runtime">确定进程运行时</h3>
+<p><code>procstats</code> 部分包含有关进程及相关服务已运行时长的完整统计信息。要快速获得便于用户阅读的摘要,请搜索 <code>AGGREGATED OVER</code> 以查看最近 3 个小时或 24 个小时的数据,然后搜索 <code>Summary:</code> 以查看进程列表、这些进程已以各种优先级运行的时长,以及它们使用 RAM 的情况(格式为“最小-平均-最大 PSS”/“最小-平均-最大 USS”)。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>-------------------------------------------------------------------------------
+DUMP OF SERVICE processinfo:
+-------------------------------------------------------------------------------
+DUMP OF SERVICE procstats:
+COMMITTED STATS FROM 2015-10-19-23-54-56 (checked in):
+...
+COMMITTED STATS FROM 2015-10-20-03-00-00 (checked in):
+...
+CURRENT STATS:
+...
+AGGREGATED OVER LAST 24 HOURS:
+System memory usage:
+...
+Per-Package Stats:
+...
+Summary:
+...
+ * com.google.android.gms.persistent / u0a13 / v8186448:
+ TOTAL: 100% (21MB-27MB-40MB/20MB-24MB-38MB over 597)
+ Top: 51% (22MB-26MB-38MB/21MB-24MB-36MB over 383)
+ Imp Fg: 49% (21MB-27MB-40MB/20MB-25MB-38MB over 214)
+…
+ Start time: 2015-10-19 09:14:37
+ Total elapsed time: +1d0h22m7s390ms (partial) libart.so
+
+AGGREGATED OVER LAST 3 HOURS:
+System memory usage:
+...
+Per-Package Stats:
+...
+Summary:
+ * com.google.android.gms.persistent / u0a13 / v8186448:
+ TOTAL: 100% (23MB-27MB-32MB/21MB-25MB-29MB over 111)
+ Top: 61% (23MB-26MB-31MB/21MB-24MB-28MB over 67)
+ Imp Fg: 39% (23MB-28MB-32MB/21MB-26MB-29MB over 44)
+...
+ Start time: 2015-10-20 06:49:24
+ Total elapsed time: +2h46m59s736ms (partial) libart.so</pre><p></p>
+ </section>
+
+<h3 id="why-is-process-running">某个进程为什么正在运行?</h3>
+<p><code>dumpsys activity processes</code> 部分会列出当前正在运行的所有进程,并按 <code>oom_adj</code> 得分排序(Android 通过为进程分配 <code>oom_adj</code> 值来表明进程的重要性,该值可由 ActivityManager 动态更新)。这种输出类似于<a href="#memory-snapshot">内存快照</a>的输出,但包含有关是什么导致进程运行的更多信息。在以下示例中,以粗体显示的条目表明 <code>gms.persistent</code> 进程正在以 <code>vis</code>(可见)优先级运行,因为该系统进程已经与其 <code>NetworkLocationService</code> 绑定。</p>
+
+ <section class="expandable">
+ <h4 class="showalways">显示示例</h4>
+ <p></p><pre>-------------------------------------------------------------------------------
+ACTIVITY MANAGER RUNNING PROCESSES (dumpsys activity processes)
+...
+Process LRU list (sorted by oom_adj, 34 total, non-act at 14, non-svc at 14):
+ PERS #33: sys F/ /P trm: 0 902:system/1000 (fixed)
+ PERS #32: pers F/ /P trm: 0 2925:com.android.systemui/u0a27 (fixed)
+ PERS #31: pers F/ /P trm: 0 3477:com.quicinc.cne.CNEService/1000 (fixed)
+ PERS #30: pers F/ /P trm: 0 3484:com.android.nfc/1027 (fixed)
+ PERS #29: pers F/ /P trm: 0 3502:com.qualcomm.qti.rcsbootstraputil/1001 (fixed)
+ PERS #28: pers F/ /P trm: 0 3534:com.qualcomm.qti.rcsimsbootstraputil/1001 (fixed)
+ PERS #27: pers F/ /P trm: 0 3553:com.android.phone/1001 (fixed)
+ Proc #25: psvc F/ /IF trm: 0 4951:com.android.bluetooth/1002 (service)
+ com.android.bluetooth/.hfp.HeadsetService&lt;=Proc{902:system/1000}
+ Proc # 0: fore F/A/T trm: 0 3586:com.google.android.googlequicksearchbox/u0a29 (top-activity)
+ Proc #26: vis F/ /SB trm: 0 3374:com.google.android.googlequicksearchbox:interactor/u0a29 (service)
+ com.google.android.googlequicksearchbox/com.google.android.voiceinteraction.GsaVoiceInteractionService&lt;=Proc{902:system/1000}
+<b> Proc # 5: vis F/ /T trm: 0 3745:com.google.android.gms.persistent/u0a12 (service)</b>
+<b> com.google.android.gms/com.google.android.location.network.NetworkLocationService&lt;=Proc{902:system/1000}</b>
+ Proc # 3: vis F/ /SB trm: 0 3279:com.google.android.gms/u0a12 (service)
+ com.google.android.gms/.icing.service.IndexService&lt;=Proc{947:com.google.android.googlequicksearchbox:search/u0a29}
+ Proc # 2: vis F/ /T trm: 0 947:com.google.android.googlequicksearchbox:search/u0a29 (service)
+ com.google.android.googlequicksearchbox/com.google.android.sidekick.main.remoteservice.GoogleNowRemoteService&lt;=Proc{3586:com.google.android.googlequicksearchbox/u0a29}
+ Proc # 1: vis F/ /T trm: 0 2981:com.google.process.gapps/u0a12 (service)
+ com.google.android.gms/.tapandpay.hce.service.TpHceService&lt;=Proc{3484:com.android.nfc/1027}
+ Proc #11: prcp B/ /IB trm: 0 3392:com.google.android.inputmethod.latin/u0a64 (service)
+ com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME&lt;=Proc{902:system/1000}
+ Proc #24: svc B/ /S trm: 0 27071:com.google.android.music:main/u0a67 (started-services)
+ Proc #22: svc B/ /S trm: 0 853:com.qualcomm.qcrilmsgtunnel/1001 (started-services)
+ Proc # 4: prev B/ /LA trm: 0 32734:com.google.android.GoogleCamera/u0a53 (previous)
+ Proc #23: svcb B/ /S trm: 0 671:com.qualcomm.telephony/1000 (started-services)
+ Proc #20: cch B/ /CE trm: 0 27659:com.android.providers.calendar/u0a2 (provider)
+ com.android.providers.calendar/.CalendarProvider2&lt;=Proc{27697:com.google.android.calendar/u0a40}
+ Proc #13: cch B/ /CE trm: 0 653:com.google.android.gms.wearable/u0a12 (cch-empty)
+ Proc #10: cch B/ /S trm: 0 4067:com.google.android.talk/u0a62 (cch-started-ui-services)
+ Proc # 7: cch B/ /S trm: 0 18868:com.google.corp.huddle.android/u0a95 (cch-started-ui-services)
+ Proc # 6: cch B/ /CA trm: 0 27697:com.google.android.calendar/u0a40 (cch-act)
+ Proc # 8: cch+1 B/ /CA trm: 0 25675:com.google.android.apps.genie.geniewidget/u0a81 (cch-act)
+ Proc #16: cch+2 B/ /CE trm: 0 1272:com.google.android.keep/u0a106 (cch-empty)
+ Proc #15: cch+2 B/ /CE trm: 0 885:android.process.media/u0a9 (cch-empty)
+ Proc #14: cch+2 B/ /CE trm: 0 15146:android.process.acore/u0a3 (cch-empty)
+ Proc # 9: cch+3 B/ /CA trm: 0 17016:com.google.android.gm/u0a79 (cch-act)
+ Proc #19: cch+4 B/ /CE trm: 0 973:com.google.android.apps.maps/u0a66 (cch-empty)
+ Proc #18: cch+4 B/ /CE trm: 0 1091:com.google.android.apps.photos/u0a71 (cch-empty)
+ Proc #17: cch+4 B/ /CE trm: 0 1141:com.google.android.apps.plus/u0a74 (cch-empty)
+ Proc #12: cch+5 B/ /CA trm: 0 22299:com.google.android.apps.dogfood/u0a105 (cch-act)
+ Proc #21: cch+6 B/ /CE trm: 0 995:com.google.android.partnersetup/u0a18 (cch-empty)&gt;</pre><p></p>
+ </section>
+
+<h2 id="scans">扫描</h2>
+<p>您可以按照以下步骤来确定过度执行蓝牙低功耗 (BLE) 扫描的应用:</p>
+<ul>
+<li>查找 <code>BluetoothLeScanner</code> 的日志消息:<pre>
+$ grep 'BluetoothLeScanner' ~/downloads/bugreport.txt
+07-28 15:55:19.090 24840 24851 D BluetoothLeScanner: onClientRegistered() - status=0 clientIf=5
+</pre></li>
+<li>在日志消息中找到 PID。在此示例中,“24840”和“24851”分别为 PID(进程 ID)和 TID(线程 ID)。</li>
+<li>找到与该 PID 关联的应用:<pre>
+PID #24840: ProcessRecord{4fe996a 24840:com.badapp/u0a105}
+</pre>
+<p>在此示例中,程序包名称为 <code>com.badapp</code>。</p></li>
+<li>在 Google Play 上查找该程序包名称,以找出相应的应用:<strong>https://play.google.com/store/apps/details?id=com.badapp</strong>。</li>
+</ul>
+<p class="note"><strong>注意</strong>:对于运行 Android 7.0 的设备,系统会收集 BLE 扫描数据,并会将这些活动与初始应用相关联。有关详情,请参阅<a href="/devices/tech/power/values.html#le-bt-scans">低功耗 (LE) 和蓝牙扫描</a>。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/contribute/report-bugs.html b/zh-cn/setup/contribute/report-bugs.html
new file mode 100644
index 00000000..1f4c21e9
--- /dev/null
+++ b/zh-cn/setup/contribute/report-bugs.html
@@ -0,0 +1,238 @@
+<html devsite><head>
+ <title>报告错误</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>
+感谢您对 Android 的关注!您可以在 <a href="#bug-queues">Android 问题跟踪器</a>中报告问题及提出功能请求,以协助我们改进 Android。Android 问题跟踪器中会列出各方面的待解决技术任务、这些任务的相关信息及进展情况(包括哪些任务可能会在短期内得到处理)。
+</p>
+<p class="note">要详细了解我们为何改用问题跟踪器,请参阅<a href="http://android-developers.googleblog.com/2017/04/a-new-issue-tracker-for-our-aosp.html">这篇博文</a>。</p>
+<p>
+问题跟踪器不是客户支持论坛。要获取支持信息,请参阅 <a href="https://support.google.com/nexus">Nexus</a> 和 <a href="https://support.google.com/pixelphone">Pixel</a> 帮助中心。对于其他设备,则由设备制造商或销售这些设备的运营商提供支持。
+</p>
+<p>
+<a href="http://support.google.com/">Google 的支持网站</a>提供 Google 应用的支持信息。对于第三方应用,则由应用的开发者提供支持,例如,您可以通过 Google Play 上提供的联系信息与他们联系。要获取更多 Android 支持资源的列表,请参阅我们的<a href="/setup/community">“社区”页面</a>。
+</p>
+<p>
+我们无法保证可以在任何特定版本中修复任何特定错误。要了解在您报告错误之后它们的历程,请参阅<a href="/setup/life-of-a-bug.html">错误的生命周期</a>。
+</p>
+<h2 id="filing-a-bug">提交错误</h2>
+<ol>
+<li><a href="https://issuetracker.google.com/issues?q=componentid:190923%2B">搜索您遇到的错误</a>,看看是否已有人报告过该错误。请记得在所有问题中搜索,而不仅仅是在待解决的那些问题中搜索,因为可能已有人报告过您遇到的问题并且该问题已被关闭。为了方便您找到最热门的结果,请按星数对结果进行排序。</li>
+<li>如果您找到了自己遇到的问题,并且该问题对您来说很重要,请<a href="https://developers.google.com/issue-tracker/guides/subscribe#starring_an_issue">为其加注星标</a>!错误获得的星数有助于我们知道哪些错误最亟待修复。</li>
+<li>如果没有人报告过您的错误,请提交该错误。首先,请<a href="https://issuetracker.google.com/components">浏览到相应的组件</a>(如<a href="https://issuetracker.google.com/issues?q=componentid:192705">框架</a>或<a href="https://issuetracker.google.com/issues?q=componentid:192634">网络</a>),然后填写所提供的模板。您也可以从下面的表格中选择所需的错误队列。
+<p class="key-point">
+<strong>提示</strong>:有些组件包含子组件,如<strong>网络 &gt; 短信</strong>和<strong>框架 &gt; 存储</strong>。
+</p>
+</li>
+<li>按照相应错误队列的说明,提供尽可能多的错误相关信息。只是说某些方面存在问题并没有多大帮助,而且问题可能不经任何处理就被关闭。您提供的详细信息(如日志文件、重现步骤,甚至补丁程序集)越多,越有助于我们解决问题。</li>
+</ol>
+<h2 id="bug-queues">错误队列</h2>
+<p>
+Android 问题跟踪器包含多种子组件,这些子组件分属大量与 Android 相关的类别。安全、平台、Android 开发者工具、文档等都有对应的组件。
+</p>
+
+<h3 id="security">安全</h3>
+<p>
+如果您在 Nexus 或 Pixel 设备中发现了影响 Android 或组件安全的问题,请遵循<a href="/security/overview/updates-resources#report-issues">此处</a>的说明。
+此外,如果报告安全错误,您还可以参加 <a href="https://www.google.com/about/appsecurity/android-rewards/">Android 安全漏洞奖励活动</a>。
+</p>
+<p>
+由于安全错误具有敏感性,因此您无法浏览待解决的问题,只能浏览已关闭或已公开的问题。
+</p>
+
+<table>
+ <tbody><tr>
+ <th>浏览错误</th>
+ <th>详细信息</th>
+ <th>提交错误</th>
+ </tr>
+ <tr>
+ <td>安全</td>
+ <td><a href="/security/overview/updates-resources#report-issues">Android 安全性详细信息</a></td>
+ <td><a href="https://www.google.com/appserve/security-bugs/m2/new">
+ <i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+</tr></tbody></table>
+
+<h3 id="platform">平台</h3>
+<p>
+如果您发现了影响 Android 平台某个方面的问题,请在下面的某个组件中提交您的错误。
+</p>
+<p><a class="button button-primary" href="https://issuetracker.google.com/issues?q=componentid:(192786%20%7C%20192805%20%7C%20192705%20%7C%20192792%20%7C%20192644%20%7C%20192694%20%7C%20192710%20%7C%20192810%20%7C%20192634%20%7C%20192698%20%7C%20192706%20%7C%20192815%20%7C%20192715%20%7C%20192720%20%7C%20192711%20%7C%20192629%20%7C%20192643%20%7C%20192693%20%7C%20192639)">浏览所有平台问题</a></p>
+<table>
+ <tbody><tr>
+ <th>浏览错误</th>
+ <th>提交错误</th>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192629%2B">ART</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192629"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192693%2B">浏览器</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192693"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192639%2B">CTS</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192639"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192705%2B">框架</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192705"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192644%2B">GfxMedia</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192644"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:316045%2B">免安装应用</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=316045"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192694%2B">Jack</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192694"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192710%2B">Libcore</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192710"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192634%2B">网络</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192634"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:190951%2B">安全</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=190951"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192706%2B">系统</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192706"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192715%2B">文本</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192715"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192720%2B">Things</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192720"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192711%2B">Wear</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192711"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+</tbody></table>
+
+<h3 id="developer-tools">Android 开发者工具</h3>
+<p>
+如果您发现了影响某个 Android 开发者工具(如 Android Studio、SDK、模拟器、系统映像或支持库)的问题,请在下面的某个组件中提交错误。
+</p>
+<p>
+由于这些工具的要求各不相同,因此请阅读<a href="https://developer.android.com/studio/report-bugs.html">一般错误提交详细信息</a>,以及相应工具的链接中提供的详细信息。
+</p>
+
+<a class="button button-primary" href="http://issuetracker.google.com/issues?q=componentid:192633%2B">浏览所有开发者工具问题</a>
+<table>
+ <tbody><tr>
+ <th>浏览错误</th>
+ <th>详细信息</th>
+ <th>提交错误</th>
+ </tr>
+ <tr>
+ <td><a href="https://issuetracker.google.com/issues?q=componentid:192633%2B">Android Studio</a></td>
+ <td><a href="https://developer.android.com/studio/report-bugs.html#studio-bugs">Android Studio 详细信息</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192708&template=840533">
+ <i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="http://issuetracker.google.com/issues?q=componentid:192717%2B">C++</a></td>
+ <td>Android Studio 中的问题</td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192717">
+ <i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="http://issuetracker.google.com/issues?q=componentid:192727%2B">模拟器或系统映像</a></td>
+ <td><a href="https://developer.android.com/studio/report-bugs.html#emulator-bugs">模拟器详细信息</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192727">
+ <i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="http://issuetracker.google.com/issues?q=componentid:192709%2B">Gradle</a></td>
+ <td><a href="https://developer.android.com/studio/report-bugs.html#build-bugs">Gradle 详细信息</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192709&template=842921">
+ <i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="http://issuetracker.google.com/issues?q=componentid:192751%2B">Instant Run</a></td>
+ <td><a href="https://developer.android.com/studio/report-bugs.html#instant-run-bugs">Instant Run 详细信息</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192751">
+ <i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td colspan="2"><a href="http://issuetracker.google.com/issues?q=componentid:192718%2B">Lint</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192718">
+ <i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="https://github.com/android-ndk/ndk/issues">NDK</a></td>
+ <td>独立的 NDK 方面的问题</td>
+ <td><a href="https://github.com/android-ndk/ndk/issues"><i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td colspan="2"><a href="http://issuetracker.google.com/issues?q=componentid:192722%2B">分析器</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192722">
+ <i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td colspan="2"><a href="http://issuetracker.google.com/issues?q=componentid:192731%2B">支持库</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192731">
+ <i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td colspan="2"><a href="http://issuetracker.google.com/issues?q=componentid:192735%2B">测试支持库</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192735">
+ <i class="material-icons">bug_report</i></a></td>
+ </tr>
+</tbody></table>
+
+<h3 id="documentation">文档</h3>
+<p>
+如果您在本网站或 <a href="https://developer.android.com/">developer.android.com</a> 上发现了问题,请提交错误,相应作者会提供帮助。
+</p>
+
+<table>
+ <tbody><tr>
+ <th>浏览错误</th>
+ <th>提交错误</th>
+ </tr>
+ <tr>
+ <td><a href="http://issuetracker.google.com/issues?q=componentid:192697%2B">developer.android.com</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=192697">
+ <i class="material-icons">bug_report</i></a></td>
+ </tr>
+ <tr>
+ <td><a href="http://issuetracker.google.com/issues?q=componentid:191476%2B">source.android.com</a></td>
+ <td><a href="https://issuetracker.google.com/issues/new?component=191476">
+ <i class="material-icons">bug_report</i></a></td>
+ </tr>
+</tbody></table>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/contribute/submit-patches.html b/zh-cn/setup/contribute/submit-patches.html
new file mode 100644
index 00000000..cebb05f7
--- /dev/null
+++ b/zh-cn/setup/contribute/submit-patches.html
@@ -0,0 +1,144 @@
+<html devsite><head>
+ <title>提交补丁程序</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>本页介绍向 AOSP 提交补丁程序的完整流程,包括使用 <a href="https://android-review.googlesource.com/">Gerrit</a> 查看和跟踪更改。</p>
+<h3 id="prerequisites">前提条件</h3>
+<ul>
+<li>
+<p>您需要先<a href="../build/initializing.html">初始化编译环境</a>、<a href="../build/downloading.html">下载源代码</a>、<a href="https://android.googlesource.com/new-password">创建密码</a>并按照密码生成器页面中的说明操作,然后再按照本页中的说明操作。</p>
+</li>
+<li>
+<p>如需详细了解 Repo 和 Git,请参阅<a href="../develop/index.html">开发</a>部分。</p>
+</li>
+<li>
+<p>如需了解您可以在 Android 开放源代码社区中担任的不同角色,请参阅<a href="../start/roles.html">项目角色</a>。</p>
+</li>
+<li>
+<p>如果您计划向 Android 平台贡献代码,请务必阅读 <a href="../start/licenses.html">AOSP 的许可信息</a>。</p>
+</li>
+<li>
+<p>请注意,如果要对 Android 使用的某些上游项目做出更改,请直接针对相应项目进行更改,如<a href="#upstream-projects">上游项目</a>部分中所述。</p>
+</li>
+</ul>
+
+<h2 id="for-contributors">贡献者须知</h2>
+
+<h3 id="authenticate-with-the-server">向服务器验证身份</h3>
+<p>您需要先<a href="https://android.googlesource.com/new-password">创建一个密码</a>(该密码将用于服务器识别您的身份),然后您才可以向 Gerrit 上传内容。请按照密码生成器页面上的说明操作。您只需执行此流程一次即可。如需了解更多详情,请参阅<a href="../build/downloading.html#using-authentication">使用身份验证</a>。</p>
+<h3 id="start-a-repo-branch">新建一个 Repo 分支</h3>
+<p>对于您打算进行的每项更改,请在相关的 Git 存储库中新建一个分支:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo start <var>NAME</var> .
+</pre>
+<p>您可以在同一存储库中同时新建多个独立的分支。“NAME”分支是您的工作区的本地分支,不会包含在 Gerrit 或最终源代码树中。</p>
+<h3 id="make-your-change">进行更改</h3>
+<p>在您修改源代码文件(并且验证)后,请将这些更改提交到您的本地存储库:</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">git add -A</code>
+<code class="devsite-terminal">git commit -s</code>
+</pre>
+<p>请在您的提交消息中提供相关更改的详细说明。该说明将会被推送到公开 AOSP 存储库,因此请按照我们的准则来撰写更改列表说明:</p>
+<ul>
+
+<li>
+<p>以一行摘要(最多 50 个字符)开头,后跟一个空白行。
+这是 Git 和 Gerrit 支持的格式,适用于各种屏幕尺寸的设备。</p>
+</li>
+
+<li>
+<p>从第三行开始输入较长的说明,说明会在达到 72 个字符时自动硬回车换行。该部分应着重说明更改解决了什么问题,以及如何解决了问题。尽管我们建议您提供第二部分的内容,但这在实现新功能时是可选内容。</p>
+</li>
+<li>
+<p>添加对任何假设或背景信息的简短说明,这些内容可能对下一年研究此功能的其他贡献者起到很大的帮助作用。</p>
+</li>
+</ul>
+
+<p>以下是一个示例提交消息:</p>
+<pre class="devsite-click-to-copy">short description on first line
+
+more detailed description of your patch,
+which is likely to take up multiple lines.
+</pre>
+
+<p><code>repo
+init</code> 期间提供的唯一更改 ID 以及您的姓名和电子邮件将自动添加到您的提交消息中。</p>
+
+<h3 id="upload-to-gerrit">上传到 Gerrit</h3>
+<p>将更改提交到您的个人历史记录后,请使用以下命令将其上传到 Gerrit:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo upload
+</pre>
+<p>如果您在同一存储库中新建了多个分支,则系统会提示您选择要上传的分支。</p>
+<p>上传成功后,Repo 会为您提供 <a href="https://android-review.googlesource.com/">Gerrit</a> 上对应新页面的网址。访问该链接可在审核服务器上查看您上传的补丁程序、添加注释,或者为您的补丁程序申请特定审核者。</p>
+<h3 id="uploading-a-replacement-patch">上传替换补丁程序</h3>
+<p>假设某位审核者已看过您的补丁程序,并要求您做一些小小的修改。您可以在 Git 中修改提交的内容,这会在 Gerrit 中生成一个新的补丁程序,该补丁程序与原始补丁程序具有相同的更改 ID。</p>
+<aside class="note"><b>注意</b>:如果您在上传该补丁程序之后进行了其他提交,那么您将需要手动移动 Git HEAD。</aside>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">git add -A</code>
+<code class="devsite-terminal">git commit --amend</code>
+</pre>
+<p>当您上传修改后的补丁程序时,它将替换 Gerrit 和本地 Git 历史记录中的原始补丁程序。</p>
+
+<h3 id="resolving-sync-conflicts">解决同步冲突</h3>
+<p>如果提交到源代码树的其他补丁程序与您的存在冲突,那么您需要在源代码存储库的新 HEAD 的基础上对您的补丁程序执行“衍合”(rebase) 命令。执行此操作的一种简单方法是运行以下命令:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo sync
+</pre>
+<p>此命令首先从源代码服务器获取更新,然后尝试在新的远程 HEAD 的基础上对您的 HEAD 自动执行衍合命令。</p>
+<p>如果自动衍合命令失败,您就必须手动执行衍合。</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo rebase
+</pre>
+<p>使用 <code>git mergetool</code> 可帮助您处理衍合冲突。在成功合并冲突文件后,运行以下命令:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+git rebase --continue
+</pre>
+<p>在自动或手动衍合完成之后,运行 <code>repo
+upload</code> 来提交衍合后的补丁程序。</p>
+
+<h3 id="after-a-submission-is-approved">提交内容获得批准后</h3>
+<p>在提交内容通过审核和验证流程之后,Gerrit 会自动将更改合并到公开存储库。其他用户可以运行 <code>repo sync</code> 将更新提取到自己的本地客户端。</p>
+
+<h2 id="upstream-projects">上游项目</h2>
+<p>Android 使用了许多其他开源项目,例如<a href="/setup/code-lines.html">代码流水线、分支和版本</a>中所述的 Linux 内核和 WebKit。对于 <code>external/</code> 下的大多数项目,如果要提交更改,则应该在上游进行,然后 Android 维护者会收到有关包含这些更改的新上游版本的通知。上传补丁程序也可能有助于我们跟踪新的上游版本,但如果是 Android 中广泛使用的项目(如下面提到的大多数大型项目),我们将很难做出更改。在这种情况下,我们倾向于在每次发布版本时进行升级。</p>
+<p>一个有趣的特殊情况是 Bionic。由于大部分代码都是来自 BSD,因此,除非更改涉及对 Bionic 新内容的编码,否则我们宁愿使用上游修复程序,然后从相应的 BSD 中提取一个全新文件。(可惜的是,我们目前有各种不同的 BSD,但我们希望将来能够解决该问题,并能够更密切地跟踪上游项目。)</p>
+<h3 id="icu4c">ICU4C</h3>
+<p>对于 <code>external/icu4c</code> 中的 ICU4C 项目,所有更改都应通过 <a href="http://site.icu-project.org/">icu-project.org/</a> 在上游进行。
+如需了解详情,请参阅<a href="http://site.icu-project.org/bugs">提交 ICU 错误和功能请求</a>。</p>
+
+<h3 id="llvmclangcompiler-rt">LLVM/Clang/Compiler-rt</h3>
+<p>对于与 LLVM 相关的项目(<code>external/clang</code>、<code>external/compiler-rt</code>、<code>external/llvm</code>),所有更改都应通过 <a href="http://llvm.org/">llvm.org/</a> 在上游进行。</p>
+
+<h3 id="mksh">mksh</h3>
+<p>对于 <code>external/mksh</code> 中的 MirBSD Korn Shell 项目,所有更改都应在上游进行:通过向 miros-mksh@mirbsd.org 发送电子邮件(无需订阅即可提交),或者在 <a href="https://launchpad.net/mksh">Launchpad</a> 中进行(可选)。
+</p>
+<h3 id="openssl">OpenSSL</h3>
+<p>对于 <code>external/openssl</code> 中的 OpenSSL 项目,所有更改都应通过 <a href="http://www.openssl.org">openssl.org</a> 在上游进行。</p>
+<h3 id="v8">V8</h3>
+<p>对于 <code>external/v8</code> 中的 V8 项目,所有更改都应通过 <a href="https://code.google.com/p/v8">code.google.com/p/v8</a> 在上游提交。如需了解详情,请参阅<a href="https://code.google.com/p/v8/wiki/Contributing">为 V8 贡献代码</a>。</p>
+<h3 id="webkit">WebKit</h3>
+<p>对于 <code>external/webkit</code> 中的 WebKit 项目,所有更改都应通过 <a href="http://www.webkit.org">webkit.org</a> 在上游进行。该过程需从提交 WebKit 错误开始。
+只有当该错误仅限于 Android 时,才可以在 <code>Platform</code> 和 <code>OS</code> 字段中使用 <code>Android</code>。如果附有建议的修复程序并包含测试结果,则错误更有可能引起审核者的注意。如需了解详情,请参阅<a href="http://webkit.org/coding/contributing.html">为 WebKit 贡献代码</a>。</p>
+<h3 id="zlib">zlib</h3>
+<p>对于 <code>external/zlib</code> 中的 zlib 项目,所有更改都应通过 <a href="http://zlib.net">zlib.net</a> 在上游进行。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/contribute/view-patches.html b/zh-cn/setup/contribute/view-patches.html
new file mode 100644
index 00000000..a9689404
--- /dev/null
+++ b/zh-cn/setup/contribute/view-patches.html
@@ -0,0 +1,90 @@
+<html devsite><head>
+ <title>查看补丁程序</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>
+如果您要查看 Android 开源项目的所有补丁程序,或者要查看或验证某项更改,请参阅 <a href="https://www.google.com/url?sa=D&q=https%3A%2F%2Fandroid-review.googlesource.com%2F%23%2Fq%2Fstatus%3Aopen%2BOR%2Bstatus%3Aclosed">AOSP Gerrit</a>。要详细了解如何查找某项具体的更改,请参阅 <a href="https://gerrit-review.googlesource.com/Documentation/user-search.html">Gerrit 代码审核 - 搜索更改</a>。
+ </p>
+
+ <h2 id="reviewing-a-change">审核更改</h2>
+
+ <p>
+如果您被指定为某项更改的审核者,则需要确定以下几点:<em></em></p>
+
+ <ul>
+ <li>这项更改是否符合此项目的既定目的?</li>
+ <li>这项更改在项目的现有架构中是否有效?
+ </li>
+ <li>这项更改是否会引入会在将来造成问题的设计缺陷?</li>
+ <li>这项更改是否遵循了针对此项目制定的最佳做法?</li>
+ <li>这项更改是否是执行所述功能的绝佳方式?</li>
+ <li>这项更改是否会带来任何安全风险或不稳定性方面的风险?</li>
+ </ul>
+
+ <p>如果您要批准这项更改,请在 Gerrit 中将其标记为 LGTM(“看起来不错”)。
+ </p>
+
+ <h2 id="verifying-a-change">验证更改</h2>
+
+ <p>
+如果您被指定为某项更改的验证者,则需要执行以下工作:<em></em></p>
+
+ <ul>
+ <li>使用其中一种下载命令将更改以补丁程序的形式添加到自己的本地客户端。</li>
+ <li>编译并测试更改内容。</li>
+ <li>在 Gerrit 中选择 <strong>Reply</strong>(回复)按钮。系统会打开一个注释框,您可以选择是否在此框中将更改标记为“Verified”(已验证),并添加一条消息说明发现了哪些问题。<em></em></li>
+ </ul>
+
+ <h2 id="downloading-changes-from-gerrit">从 Gerrit 下载更改内容</h2>
+
+ <p>
+已验证并合并的提交内容将在下一次运行 <code>repo sync</code> 时下载。如果您想下载尚未获得批准的特定更改,请运行以下命令:
+ </p>
+
+ <pre class="devsite-terminal devsite-click-to-copy">
+repo download <var>TARGET CHANGE</var></pre>
+
+ <p>其中 <code><var>TARGET</var></code> 是更改应该下载到的本地目录,<code><var>CHANGE</var></code> 是 Gerrit 中列出的更改编号。如需了解详细信息,请参阅 <a href="../develop/repo.html">Repo 参考资料</a>。
+ </p>
+
+ <h2 id="how-do-i-become-a-verifier-or-reviewer">如何成为验证者或审核者?</h2>
+
+ <p>简言之,为一个或多个 Android 项目贡献高质量代码。要详细了解 Android 开源社区中的不同角色以及谁在担任这些角色,请参阅<a href="../start/roles.html">项目角色</a>。
+ </p>
+
+ <h2 id="diffs-and-comments">差异和注释</h2>
+
+ <p>
+要在 Gerrit 中打开某项更改的详细信息,请点击这项更改的“Id number”(ID 号)或“Subject”(主题)。<em></em><em></em>要比较原有代码与更新后的代码,请点击“Side-by-side diffs”(并排显示差异)下的文件名。<em></em>
+ </p>
+
+ <h2 id="adding-comments">添加注释</h2>
+
+ <p>社区中的任何人都可以使用 Gerrit 为提交的代码添加代码内注释。如果注释内容与 Gerrit 中其所依附的代码行或代码段相关,那就是一条好注释。注释可能是关于如何改进一行代码的简短而有建设性的建议,也可能是作者对于为什么这样编写代码的解释。
+ </p>
+
+ <p>要添加代码内注释,请双击代码的相关行,然后在打开的文本框中编写注释。点击“<strong>Save</strong>”(保存)后,只有您可以看到自己的注释。
+ </p>
+
+ <p>要发布注释以便让其他使用 Gerrit 的人可以看到,请点击“Publish Comments”(发布注释)按钮。您的注释将通过电子邮件发送给这项更改的所有相关方,包括更改的所有者、补丁程序集上传者(如果与所有者不同)以及所有当前审核者。
+ </p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/develop/64-bit-builds.html b/zh-cn/setup/develop/64-bit-builds.html
new file mode 100644
index 00000000..dab0696f
--- /dev/null
+++ b/zh-cn/setup/develop/64-bit-builds.html
@@ -0,0 +1,156 @@
+<html devsite><head>
+ <title>了解 64 位版本</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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.
+ -->
+
+<h2 id="overview">概览</h2>
+
+<p>从编译系统的角度来看,最显著的变化是现在支持在同一次编译中为两种目标 CPU 架构(64 位和 32 位)编译二进制文件。这也称为“多库编译”。<em></em></p>
+
+<p>对于本机静态库和共享库,编译系统设置了为两种架构编译二进制文件的规则。产品配置 (<code>PRODUCT_PACKAGES</code>) 与依赖关系图共同决定了编译哪些二进制文件并安装到系统映像中。</p>
+
+<p>对于可执行文件和应用,编译系统默认仅编译 64 位版本,但您可以使用一个全局 <code>BoardConfig.mk</code> 变量或针对特定模块的变量来替换此设置。</p>
+
+<p class="caution"><strong>注意</strong>:如果某个应用提供了一个可供其他应用(可以是 32 位,也可以是 64 位)使用的 API,那么在该应用的清单中,<code>android:multiarch</code> 属性的值必须设为 <code>true</code>,以避免可能出现的错误。</p>
+
+<h2 id="product_configuration">产品配置</h2>
+
+<p>在 <code>BoardConfig.mk</code> 中,我们添加了以下变量来配置第二个 CPU 架构和 ABI:</p>
+
+<pre>
+TARGET_2ND_ARCH
+TARGET_2ND_ARCH_VARIANT
+TARGET_2ND_CPU_VARIANT
+TARGET_2ND_CPU_ABI
+TARGET_2ND_CPU_ABI2
+</pre>
+
+<p>您可以在 <code>build/target/board/generic_arm64/BoardConfig.mk</code> 中查看示例。</p>
+
+<p>如果您希望编译系统默认编译 32 位可执行文件和应用,请设置以下变量:</p>
+
+<pre class="devsite-click-to-copy">
+TARGET_PREFER_32_BIT := true
+</pre>
+
+<p>不过,您可以在 <code>Android.mk</code> 中使用针对特定模块的变量来替换此设置。</p>
+
+<p>在多库编译中,<code>PRODUCT_PACKAGES</code> 中的模块名称同时涵盖了 32 位和 64 位二进制文件,只要这些名称是由编译系统定义的。对于通过依赖关系提取而来的库,只有在另一个 32 位库或可执行文件要求使用时,系统才会安装 32 位库。64 位库也遵循同样的规则。</p>
+
+<p>不过,<code>make</code> 命令行中的模块名称仅涵盖 64 位版本。例如,在运行 <code>lunch
+aosp_arm64-eng</code> 之后,<code>make libc</code> 仅编译 64 位库。要编译 32 位库,您需要运行 <code>make libc_32</code>。</p>
+
+<h2 id="module_definition_in_android_mk">Android.mk 中的模块定义</h2>
+
+<p>您可以使用 <code>LOCAL_MULTILIB</code> 变量来配置您是要编译 32 位还是 64 位架构,或是同时编译二者,并可以替换全局 <code>TARGET_PREFER_32_BIT</code> 变量。</p>
+
+<p>将 <code>LOCAL_MULTILIB</code> 设为以下其中一项值:</p>
+
+<ul>
+ <li>“both”(二者):同时编译 32 位和 64 位架构。</li>
+ <li>“32”:仅编译 32 位架构。</li>
+ <li>“64”:仅编译 64 位架构。</li>
+ <li>“first”(第一个):仅编译第一个架构(在 32 位设备中编译 32 位架构,在 64 位设备中编译 64 位架构)。</li>
+ <li>“”:默认值;编译系统根据模块类和其他 <code>LOCAL_</code> 变量(如 <code>LOCAL_MODULE_TARGET_ARCH</code>、<code>LOCAL_32_BIT_ONLY</code> 等)决定要编译哪种架构。</li>
+</ul>
+
+<p>在多库编译中,<code>ifeq $(TARGET_ARCH)</code> 等条件不再起作用。</p>
+
+<p>如果您想为某些特定架构编译模块,以下变量可为您提供帮助:</p>
+
+<ul>
+ <li><code>LOCAL_MODULE_TARGET_ARCH</code><br />该变量可设为一个架构列表,类似于“arm x86 arm64”。只有正在编译的架构位于该列表中,编译系统才会添加当前模块。</li>
+
+ <li><code>LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH</code><br /><code>LOCAL_MODULE_TARGET_ARCH</code> 的相反变量。只有正在编译的架构不在相应列表中,编译系统才会添加当前模块。</li>
+</ul>
+
+<p>上述两个变量有两个小变体:</p>
+
+<ul>
+ <li><code>LOCAL_MODULE_TARGET_ARCH_WARN</code></li>
+ <li><code>LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH_WARN</code></li>
+</ul>
+
+<p>如果当前模块由于架构受到这两个变量的限制而被跳过,编译系统将发出警告。</p>
+
+<p>要设置针对特定架构的编译标记,请使用针对特定架构的 <code>LOCAL_</code> 变量。针对特定架构的 <code>LOCAL_</code> 变量由普通 <code>LOCAL_</code> 变量加架构后缀构成,例如:</p>
+
+<ul>
+ <li> <code>LOCAL_SRC_FILES_arm, LOCAL_SRC_FILES_x86,</code>
+ </li><li> <code>LOCAL_CFLAGS_arm, LOCAL_CFLAGS_arm64,</code>
+ </li><li> <code>LOCAL_LDFLAGS_arm, LOCAL_LDFLAGS_arm64,</code>
+</li></ul>
+
+<p>只有当前正在为相应架构编译二进制文件时,才能使用这些变量。</p>
+
+<p>有时,根据当前正在为 32 位还是 64 位架构编译二进制文件来设置标记会更方便。在这种情况下,您可以使用带有 <code>_32</code> 或 <code>_64</code> 后缀的 <code>LOCAL_</code> 变量,例如:</p>
+
+<ul>
+ <li> <code>LOCAL_SRC_FILES_32, LOCAL_SRC_FILES_64,</code>
+ </li><li> <code>LOCAL_CFLAGS_32, LOCAL_CFLAGS_64,</code>
+ </li><li> <code>LOCAL_LDFLAGS_32, LOCAL_LDFLAGS_64,</code>
+</li></ul>
+
+<p>请注意,并非所有 <code>LOCAL_</code> 变量都支持针对特定架构的变体。
+如需了解此类变量的最新列表,请参阅 <code>build/core/clear_vars.mk</code>。</p>
+
+<h2 id="install_path">安装路径</h2>
+
+<p>在过去,您可以使用 <code>LOCAL_MODULE_PATH</code> 将库安装到默认位置以外的位置。例如:<code>LOCAL_MODULE_PATH :=
+$(TARGET_OUT_SHARED_LIBRARIES)/hw</code>。</p>
+
+<p>在多库编译中,请改用 <code>LOCAL_MODULE_RELATIVE_PATH</code>:</p>
+
+<pre class="devsite-click-to-copy">
+LOCAL_MODULE_RELATIVE_PATH := hw
+</pre>
+
+<p>这样就可以将 64 位和 32 位库安装到正确的位置。</p>
+
+<p>如果您要将某个可执行文件编译为同时适用于 32 位和 64 位架构,则需要使用以下变量之一来区分安装路径:</p>
+
+<ul>
+ <li><code>LOCAL_MODULE_STEM_32, LOCAL_MODULE_STEM_64</code><br />指定已安装文件的名称。
+ </li><li><code>LOCAL_MODULE_PATH_32, LOCAL_MODULE_PATH_64</code><br />指定安装路径。
+</li></ul>
+
+<h2 id="generated_sources">生成的源代码</h2>
+
+<p>在多库编译中,在 <code>$(local-intermediates-dir)</code>(或通过明确的变量在 <code>$(intermediates-dir-for)
+</code> 中生成)中生成源代码文件这种方法会变得不再可靠。这是因为 32 位和 64 位版本都需要用到中间目录中生成的源代码,而 <code>$(local-intermediates-dir)</code> 仅指向两个中间目录中的一个。</p>
+
+<p>值得高兴的是,编译系统现在提供了一个适合多库编译的、用于生成源代码的专用中间目录。您可以调用 <code>
+$(local-generated-sources-dir)</code> 或 <code>$(generated-sources-dir-for)</code> 来获取该目录的路径。它们的用法与 <code>$(local-intermediates-dir)</code> 和 <code>$(intermediates-dir-for)</code> 类似。</p>
+
+<p>如果源代码文件在新的专用目录中生成并由 <code>LOCAL_GENERATED_SOURCES</code> 调用,那么就意味着它在多库编译中是同时为 32 位和 64 位架构编译的。</p>
+
+<h2 id="prebuilts">预编译</h2>
+
+<p>在多库编译中,您无法使用 <code>TARGET_ARCH</code>(或加上 <code>TARGET_2ND_ARCH</code>)来告知编译系统,预编译的二进制文件是以哪种架构为目标。请改用上述 <code>LOCAL_</code> 变量 <code>LOCAL_MODULE_TARGET_ARCH</code> 或 <code>LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH</code>。</p>
+
+<p>利用这些变量,即使编译系统目前正在进行 64 位多库编译,也可以选择对应的 32 位预编译二进制文件。</p>
+
+<p>如果您想使用所选的架构来计算预编译二进制文件的源路径,则可以调用 <code> $(get-prebuilt-src-arch)</code>。</p>
+
+<h2 id="dex-preopt">Dex-preopt</h2>
+
+<p>对于 64 位设备,我们会默认为启动映像及任何 Java 库同时生成 32 位和 64 位 odex 文件。对于 APK,我们默认仅为主要的 64 位架构生成 odex 文件。如果某个应用将同时在 32 位和 64 位进程中启动,请使用 <code>LOCAL_MULTILIB := both</code> 确保同时生成 32 位和 64 位 odex 文件。该标记还会指示编译系统同时添加 32 位和 64 位 JNI 库(如果应用中包含任何此类库)。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/develop/index.html b/zh-cn/setup/develop/index.html
new file mode 100644
index 00000000..5f74871f
--- /dev/null
+++ b/zh-cn/setup/develop/index.html
@@ -0,0 +1,342 @@
+<html devsite><head>
+ <title>概览</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>
+要使用 Android 代码,您需要使用 <strong>Git</strong>(一种开源版本控制系统)和 <strong>Repo</strong>(一种对 Git 构成补充的 Google 代码库管理工具)。
+</p>
+
+<h2 id="git">Git</h2>
+
+<p>
+Git 旨在处理分布在多个代码库上的大型项目。Android 使用 Git 执行本地操作,例如建立本地分支、提交、对比差异、修改。打造 Android 项目所面临的挑战之一就是确定如何最好地支持外部社区 - 从业余爱好者社区到生产大众消费类设备的大型 OEM。我们希望组件可以替换,并希望有趣的组件能够在 Android 之外自行发展。我们最初决定使用一种分布式修订版本控制系统,经过筛选,最后选中了 Git。
+</p>
+
+<p>
+要详细了解 Git,请参阅 <a href="https://git-scm.com/documentation" class="external">Git 文档</a>。
+</p>
+
+<h2 id="repo">Repo</h2>
+<p>
+Repo 可以在必要时整合 Git 代码库,将相关内容上传到我们的 <a href="https://android-review.googlesource.com/">Gerrit 修订版本控制系统</a>,并自动执行 Android 开发工作流程的部分环节。Repo 并非用来取代 Git,只是为了让您在 Android 环境中更轻松地使用 Git。Repo 命令是一段可执行的 Python 脚本,您可以将其放在路径中的任何位置。使用 Android 源代码文件时,您可以使用 Repo 执行跨网络操作。例如,您可以用一个 Repo 命令,将文件从多个代码库下载到本地工作目录。
+</p>
+
+<p>
+在大多数情况下,您可以仅使用 Git(不必使用 Repo),或结合使用 Repo 和 Git 命令以组成复杂的命令。不过,使用 Repo 执行基本的跨网络操作可大大简化您的工作。要详细了解 Repo,请参阅 <a href="repo.html">Repo 命令参考资料</a>。
+</p>
+
+<h2 id="other-tools">其他工具</h2>
+
+<p>
+其他工具包括 <a href="https://gerrit-review.googlesource.com/Documentation/" class="external">Gerrit</a>,这是一个基于网页的代码审核系统,适用于使用 Git 的项目。Gerrit 允许所有授权用户提交更改(如果通过代码审核,这些更改会自动纳入项目中),以此鼓励他们更集中地使用 Git。此外,Gerrit 可以在浏览器中并排显示更改,并支持代码内注释,使得审核工作变得更轻松。
+</p>
+
+<p>
+最后,<a href="http://developer.android.com/tools/studio/index.html" class="external">Android Studio</a> 是用于开发 Android 应用的官方集成开发环境 (IDE)。
+</p>
+
+<h2 id="workflow">工作流程</h2>
+
+<p>
+Android 开发涉及以下基本工作流程:
+</p>
+
+<img src="../images/git_workflow.png" alt="基本工作流程示意图"/>
+ <figcaption><strong>图 1.</strong> Android 基本工作流程</figcaption>
+<ol>
+ <li>使用 <code>repo start</code> 新建一个主题分支。
+ </li>
+ <li>修改文件。
+ </li>
+ <li>使用 <code>git add</code> 暂存更改。
+ </li>
+ <li>使用 <code>git commit</code> 提交更改。
+ </li>
+ <li>使用 <code>repo upload</code> 将更改上传到审核服务器。
+ </li>
+</ol>
+
+<h2 id="common-tasks">常见任务</h2>
+
+<p>
+在 Android 代码库中使用 Git 和 Repo 会涉及到执行以下常见任务:
+</p>
+
+<table>
+ <tbody><tr>
+ <th>命令</th>
+ <th>说明</th>
+ </tr>
+ <tr>
+ <td><code>repo init</code></td>
+ <td>初始化一个新客户端。</td>
+ </tr>
+ <tr>
+ <td><code>repo sync</code></td>
+ <td>将客户端同步到代码库。</td>
+ </tr>
+ <tr>
+ <td><code>repo start</code></td>
+ <td>新建一个分支。</td>
+ </tr>
+ <tr>
+ <td><code>repo status</code></td>
+ <td>显示当前分支的状态。</td>
+ </tr>
+ <tr>
+ <td><code>repo upload</code></td>
+ <td>将更改上传到审核服务器。</td>
+ </tr>
+ <tr>
+ <td><code>git add</code></td>
+ <td>暂存文件。</td>
+ </tr>
+ <tr>
+ <td><code>git commit</code></td>
+ <td>提交已暂存文件。</td>
+ </tr>
+ <tr>
+ <td><code>git branch</code></td>
+ <td>显示当前分支。</td>
+ </tr>
+ <tr>
+ <td><code>git branch [branch]</code></td>
+ <td>创建新的主题分支。</td>
+ </tr>
+ <tr>
+ <td><code>git checkout [branch]</code></td>
+ <td>将 HEAD 切换到指定分支。</td>
+ </tr>
+ <tr>
+ <td><code>git merge [branch]</code></td>
+ <td>将 [branch] 合并到现有分支。</td>
+ </tr>
+ <tr>
+ <td><code>git diff</code></td>
+ <td>显示未暂存更改的 diff 结果。</td>
+ </tr>
+ <tr>
+ <td><code>git diff --cached</code></td>
+ <td>显示已暂存更改的 diff 结果。</td>
+ </tr>
+ <tr>
+ <td><code>git log</code></td>
+ <td>显示现有分支的历史记录。</td>
+ </tr>
+ <tr>
+ <td><code>git log m/[codeline]..</code></td>
+ <td>显示未推送的提交。</td>
+ </tr>
+</tbody></table>
+
+<p>
+要了解如何使用 Repo 下载源代码,请参阅<a href="../build/downloading.html">下载源代码</a>和 <a href="repo.html">Repo 命令参考资料</a>。
+</p>
+
+<h3 id="synchronizing-clients">同步客户端</h3>
+
+<p>
+要同步所有可用项目的文件,请运行以下命令:</p>
+<pre class="devsite-terminal devsite-click-to-copy">repo sync</pre>
+
+<p>
+要同步所选项目的文件,请运行以下命令:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo sync <var>PROJECT0 PROJECT1 ... PROJECTN</var>
+</pre>
+
+<h3 id="creating-topic-branches">创建主题分支</h3>
+
+<p>
+当您开始进行更改(例如当您开始修复错误或实现新功能)时,请在本地工作环境中新建一个主题分支。主题分支<strong>不</strong>是原始文件的副本;它指向某一项提交记录,可以简化创建本地分支以及在本地分支之间进行切换的操作。通过使用分支,您可以将工作的某个方面与其他方面分隔开来。请参阅<a href="http://www.kernel.org/pub/software/scm/git/docs/howto/separating-topic-branches.txt" class="external">分隔主题分支</a>(一篇有关使用主题分支的有趣文章)。
+</p>
+
+<p>
+要使用 Repo 新建一个主题分支,请转到相应项目并运行以下命令:
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo start <var>BRANCH_NAME</var> .
+</pre>
+
+<p>
+尾随句点 (.) 代表当前工作目录中的项目。
+</p>
+
+<p>
+要验证新分支是否已创建,请运行以下命令:
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo status .
+</pre>
+
+<h3 id="using-topic-branches">使用主题分支</h3>
+
+<p>要将分支分配给特定项目,请运行以下命令:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo start <var>BRANCH_NAME PROJECT_NAME</var>
+</pre>
+
+<p>要查看所有项目的列表,请参阅 <a href="https://android.googlesource.com/" class="external">android.googlesource.com</a>。如果您已转到相应的项目目录,则只需使用一个句点来表示当前项目即可。
+</p>
+
+<p>
+要切换到本地工作环境中的另一个分支,请运行以下命令:
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+git checkout <var>BRANCH_NAME</var>
+</pre>
+
+<p>
+要查看现有分支的列表,请运行以下命令:
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+git branch
+</pre>
+
+<p>或</p>
+
+<pre class="devsite-terminal devsite-click-to-copy">
+repo branches
+</pre>
+
+<p>
+这两个命令均可返回现有分支的列表,并会在当前分支的名称前面标注星号 (*)。
+</p>
+
+<aside class="note"><strong>注意</strong>:此工具有一个已知错误,可能会导致 <code>repo
+sync</code> 重置本地主题分支。如果在您运行 <code>repo sync</code> 之后,<code>git branch</code> 显示 *(无分支),请再次运行 <code>git checkout</code>。</aside>
+
+<h3 id="staging-files">暂存文件</h3>
+
+<p>
+默认情况下,Git 会检测到您在项目中所做的更改,但不会跟踪这些更改。要让 Git 保存您的更改,您必须标记或暂存这些更改,以将其纳入到提交中。<em></em>
+</p>
+
+<p>
+要暂存更改,请运行以下命令:
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+git add
+</pre>
+
+<p>
+该命令接受将项目目录中的文件或目录作为参数。<code>git add</code> 并不像其名称表示的这样只是简单地将文件添加到 Git 代码库,它还可以用于暂存文件的修改和删除的内容。
+</p>
+
+<h3 id="viewing-client-status">查看客户端状态</h3>
+
+<p>
+要列出文件状态,请运行以下命令:
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo status
+</pre>
+
+<p>
+要查看未提交的修改(<strong>未</strong>标记为需要提交的本地修改),请运行以下命令:
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo diff
+</pre>
+
+<p>
+要查看已提交的修改(<strong>已标记为</strong>需要提交的本地修改),请确保您已转到相应的项目目录,然后使用 <code>cached</code> 参数运行 <code>git
+ diff</code>:
+</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">cd <var>~/WORKING_DIRECTORY/PROJECT</var></code>
+<code class="devsite-terminal">git diff --cached</code>
+</pre>
+
+<img src="../images/git_diff.png" alt="diff 与 diff-cached"/>
+ <figcaption><strong>图 2.</strong> 未提交的修改与已提交的修改
+ </figcaption>
+
+<h3 id="committing-changes">提交更改</h3>
+
+<p>
+在 Git 中,提交是修订版本控制的基本单位,包含目录结构的快照以及整个项目的文件内容。<em></em>要在 Git 中创建提交,请运行以下命令:
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+git commit
+</pre>
+
+<p>
+当系统提示您输入提交消息时,请针对要提交至 AOSP 的更改提供一条简短(但有用)的消息。如果您不添加提交消息,提交将会中止。
+</p>
+
+<h3 id="uploading-changes-to-gerrit">将更改上传到 Gerrit</h3>
+
+<p>
+请更新至最新版本,然后上传相应更改:
+</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">repo sync</code>
+<code class="devsite-terminal">repo upload</code>
+</pre>
+
+<p>
+运行此命令后,系统会随即列出您已提交的更改,并提示您选择要上传到审核服务器的哪个分支。如果只有一个分支,则您会看到一个简单的 <code>y/n</code> 提示符。
+</p>
+
+<h3 id="resolving-sync-conflicts">解决同步冲突</h3>
+
+<p>
+如果 <code>repo sync</code> 命令提示同步冲突,请执行以下操作:
+</p>
+
+<ol>
+ <li>查看未合并的文件(状态代码 = U)。</li>
+ <li>根据需要修改存在冲突的地方。</li>
+ <li>对相关项目目录进行更改。添加并提交受影响的文件,然后对这些更改执行“衍合”(rebase) 命令:<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">git add .</code>
+<code class="devsite-terminal">git commit</code>
+<code class="devsite-terminal">git rebase --continue</code>
+</pre>
+ </li>
+ <li>当衍合完成后,再一次开始整个同步过程:<pre class="devsite-terminal devsite-click-to-copy">
+repo sync <var>PROJECT0 PROJECT1 ... PROJECTN</var>
+</pre>
+ </li>
+</ol>
+
+<h3 id="cleaning-up-client-files">清理客户端</h3>
+<p>
+将更改合并到 Gerrit 之后,请更新您的本地工作目录,然后使用 <code>repo prune</code> 安全地移除已过时的主题分支:
+</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">repo sync</code>
+<code class="devsite-terminal">repo prune</code>
+</pre>
+
+<h3 id="deleting-clients">删除客户端</h3>
+<p>
+由于所有状态信息都会存储在客户端中,您只需从文件系统中删除相应目录即可:
+</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+rm -rf <var>WORKING_DIRECTORY</var>
+</pre>
+
+<p>
+删除客户端将永久删除您尚未上传以供审核的所有更改。<em></em>
+</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/develop/new-device.html b/zh-cn/setup/develop/new-device.html
new file mode 100644
index 00000000..c3f7fb73
--- /dev/null
+++ b/zh-cn/setup/develop/new-device.html
@@ -0,0 +1,317 @@
+<html devsite><head>
+ <title>添加新设备</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>您可以参考本页中的信息为自己的设备和产品创建 Makefile。请注意,与本部分中的其他页面不同,本页中的内容仅适合在创建全新的设备类型时参考,而且仅适合公司编译和产品团队参考。</p>
+
+<h2 id="build-layers">了解编译层</h2>
+
+<p>编译层次结构包括与设备的物理结构对应的抽象层。下表中介绍了这些层。每个层都与上一层存在一对多的关系。例如,一个架构可以有多个板,一个板可以有多个产品。您可以将指定层中的某个元素定义为同一层中某个元素的特化元素,从而免去复制操作并简化维护工作。</p>
+
+<table>
+ <tbody><tr>
+ <th>层</th>
+ <th>示例</th>
+ <th>说明</th>
+ </tr>
+ <tr>
+ <td>产品</td>
+ <td>myProduct、myProduct_eu、myProduct_eu_fr、j2、sdk</td>
+ <td>产品层用于定义所开发产品的功能规范,例如要编译的模块、支持的语言区域,以及针对各语言区域的配置。也就是说,这是总体产品的名称。产品特定变量在产品定义 Makefile 中进行定义。一个产品可以沿用其他产品的定义,这有助于简化维护工作。一种常用的方法是:先创建一个基础产品,其中包含会应用到所有产品的功能,然后再基于这个基础产品创建产品变体。例如,如果有两个产品只是使用的无线技术不同(分别使用 CDMA 和 GSM),那么您可以让这两个产品沿用未定义无线技术的同一个基础产品的定义。
+</td>
+
+ </tr>
+ <tr>
+ <td>板/设备</td>
+ <td>sardine、trout、goldfish</td>
+ <td>设备/主板层代表设备上由可塑材料组成的物理层(即设备的工业设计)。例如,在北美销售的设备可能包括 QWERTY 键盘,而在法国销售的设备则可能包括 AZERTY 键盘。该层还用于展现产品的基本架构图。这些架构图包括板上的外围设备及其配置。所使用的名称只不过是代表不同主板/设备配置的代码。</td>
+ </tr>
+<tr>
+ <td>架构</td>
+ <td>arm、x86、mips、arm64、x86_64、mips64</td>
+ <td>架构层用于描述主板上运行的处理器配置和 ABI(应用二进制接口)。</td>
+ </tr>
+</tbody></table>
+
+<h2 id="build-variants">使用编译类型</h2>
+
+<p>在针对特定产品进行编译时,如果能在最终发布版本的基础上进行细微修改,通常会非常有用。在模块定义中,模块可以通过 <code>LOCAL_MODULE_TAGS</code> 指定标记,这些标记可以是以下一个或多个值:<code>optional</code>(默认)、<code>debug</code>、<code>eng</code>。</p>
+
+<p>如果某个模块没有通过 <code>LOCAL_MODULE_TAGS</code> 指定标记,则其标记默认为 <code>optional</code>。仅当 <code>PRODUCT_PACKAGES</code> 的产品配置需要可选模块时,系统才会安装可选模块。</p><p>以下是当前已定义的编译类型:</p>
+
+<table border="1">
+<tbody><tr>
+ <td>
+ <code>eng</code>
+ </td>
+ <td>这是默认的编译类型。
+<ul>
+<li>安装带有 <code>eng</code> 和/或 <code>debug</code> 标记的模块。</li>
+<li>除了带有标记的模块之外,还会根据产品定义文件安装相应模块。</li>
+<li><code>ro.secure=0</code></li>
+<li><code>ro.debuggable=1</code></li>
+<li><code>ro.kernel.android.checkjni=1</code></li>
+<li><code>adb</code> 默认处于启用状态。</li>
+</ul>
+ </td>
+</tr>
+<tr>
+ <td>
+ <code>user</code>
+ </td>
+ <td>这是旨在用作最终版本配置步骤的编译类型。
+<ul>
+<li>安装带有 <code>user</code> 标记的模块。</li>
+<li>除了带有标记的模块之外,还会根据产品定义文件安装相应模块。</li>
+<li><code>ro.secure=1</code> </li>
+<li><code>ro.debuggable=0</code> </li>
+<li><code>adb</code> 默认处于停用状态。</li>
+</ul>
+ </td>
+</tr>
+<tr>
+ <td>
+ <code>userdebug</code>
+ </td>
+ <td>
+ 除了以下几点之外,其余均与 <code>user</code> 相同:
+<ul>
+<li>还会安装带有 <code>debug</code> 标记的模块。</li>
+<li><code>ro.debuggable=1</code></li>
+<li><code>adb</code> 默认处于启用状态。</li>
+</ul>
+ </td>
+</tr>
+</tbody></table>
+
+<h2 id="use-resource-overlays">利用资源叠加层定制版本</h2>
+
+<p>Android 编译系统会在编译时利用资源叠加层定制产品。资源叠加层用于指定在默认文件之上应用的资源文件。要使用资源叠加层,请修改项目编译文件,将 <code>PRODUCT_PACKAGE_OVERLAYS</code> 设为相对于顶级目录的路径。当编译系统搜索资源时,该路径将成为影子根目录,系统除了在当前根目录中进行搜索外,还会一并在该路径中搜索。</p>
+
+<p><a href="https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml">frameworks/base/core/res/res/config.xml</a> 文件中包含用户最常自定义的设置。</p>
+
+<p>要在此文件上设置资源叠加层,请将叠加层目录添加到项目编译文件中,如下所示:</p>
+
+<pre class="devsite-click-to-copy">
+PRODUCT_PACKAGE_OVERLAYS := device/<var>DEVICE_IMPLEMENTER</var>/<var>DEVICE_NAME</var>/overlay
+</pre>
+
+<p>或</p>
+
+<pre class="devsite-click-to-copy">
+PRODUCT_PACKAGE_OVERLAYS := vendor/<var>VENDOR_NAME</var>/overlay
+</pre>
+
+<p>然后,将一个叠加层文件添加到该目录下,例如:</p>
+
+<pre class="devsite-click-to-copy">
+vendor/foobar/overlay/frameworks/base/core/res/res/config.xml
+</pre>
+
+<p>在叠加层 <code>config.xml</code> 文件中找到的所有字符串或字符串数组都将会替换在原始文件中找到的对应字符串或字符串数组。</p>
+
+<h2 id="build-a-product">编译产品</h2>
+
+<p>您可以通过多种方式组织设备的源文件。我们将以 Nexus 6 为例,简要介绍是如何组织其实施文件的,不过您可以按照自己认为合适的方式组织源文件并进行编译。
+</p>
+<p>
+为 Nexus 6 实施了一个名为 <code>shamu</code> 的主设备配置。根据此设备配置创建了一个产品以及一个产品定义 Makefile,该 Makefile 用于声明关于设备的产品特定信息,例如名称和型号。您可以查看 <code>device/moto/shamu</code> 目录,了解所有相关配置的具体设置方式。
+</p>
+<h3 id="makefiles">编写 Makefile</h3>
+<p>以下步骤介绍了如何采用与设置 Nexus 6 产品线类似的方式设置产品 Makefile:</p>
+<ol>
+ <li>为您的产品创建 <code>device/&lt;company_name&gt;/&lt;device_name&gt;</code> 目录,例如 <code>device/moto/shamu</code>。该目录中将包含您设备的源代码以及编译这些代码所需的 Makefile。
+ </li>
+
+ <li>创建一个用于声明设备所需文件和模块的 <code>device.mk</code> Makefile。有关示例,请参阅 <code>device/moto/shamu/device.mk</code>。
+ </li>
+
+ <li>创建一个产品定义 Makefile,以便基于设备创建具体产品。以下示例 Makefile 来自于 <code>device/moto/shamu/aosp_shamu.mk</code>。
+请注意,该产品会通过 Makefile 沿用 <code>device/moto/shamu/device.mk</code> 和 <code>vendor/moto/shamu/device-vendor.mk</code> 文件中的内容,同时还会声明产品特定信息,例如名称、品牌和型号。
+
+<pre class="devsite-click-to-copy">
+# 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>
+要查看可添加到 Makefile 的其他产品特定变量,请参阅<a href="#prod-def">产品定义变量</a>。
+ </p>
+ </li>
+
+ <li>创建一个指向产品的 Makefile 的 <code>AndroidProducts.mk</code> 文件。在此示例中,仅需要产品定义 Makefile。以下示例来自于 <code>device/moto/shamu/AndroidProducts.mk</code>:
+<pre class="devsite-click-to-copy">
+#
+# 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>创建一个包含主板特定配置的 <code>BoardConfig.mk</code> Makefile。
+有关示例,请参阅 <code>device/moto/shamu/BoardConfig.mk</code>。
+ </li>
+
+ <li>创建一个 <code>vendorsetup.sh</code> 文件,以便将您的产品(“午餐套餐”)与<a href="#build-variants">编译变体</a>(使用短划线将两者分隔开)一起添加到细分版本中。例如:<pre class="devsite-click-to-copy">
+add_lunch_combo <var>&lt;PRODUCT_NAME&gt;</var>-userdebug
+</pre>
+ </li>
+
+ <li>这时,您就可以基于同一设备创建更多产品变体了。
+ </li>
+
+</ol>
+<h3 id="prod-def">设置产品定义变量</h3>
+<p>产品特定变量在产品的 Makefile 中定义。在产品定义文件中维护的变量包括:</p>
+<table>
+ <tbody>
+ <tr>
+ <th>参数</th>
+ <th>说明</th>
+ <th>示例</th>
+ </tr>
+ <tr>
+ <td>PRODUCT_AAPT_CONFIG</td>
+ <td>
+ 创建程序包时使用的 <code>aapt</code> 配置
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>PRODUCT_BRAND</td>
+ <td>对软件进行自定义所针对的品牌(如果有),例如运营商</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>PRODUCT_CHARACTERISTICS</td>
+ <td>
+ <code>aapt</code> 特性,用于允许向程序包添加变体特定资源。
+ </td>
+ <td>tablet、nosdcard</td>
+ </tr>
+ <tr>
+ <td>PRODUCT_COPY_FILES</td>
+ <td>
+字词列表,例如 <code>source_path:destination_path</code>。在编译相应产品时,应将源路径下的文件复制到目标路径。config/Makefile 中定义了针对复制步骤的规则</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>PRODUCT_DEVICE</td>
+ <td>工业设计的名称。这也是板名称,编译系统会使用该名称查找 <code>BoardConfig.mk.</code>
+ </td>
+ <td>
+ <code>tuna</code>
+ </td>
+ </tr>
+ <tr>
+ <td>PRODUCT_LOCALES</td>
+ <td>以空格分隔的列表,用于列出由双字母语言代码和双字母国家/地区代码组成的代码对,以便说明针对用户的一些设置,例如界面语言和时间、日期以及货币格式。PRODUCT_LOCALES 中列出的第一个语言区域会被用作产品的默认语言区域。
+ </td>
+ <td>
+ <code>en_GB de_DE es_ES fr_CA</code>
+ </td>
+ </tr>
+ <tr>
+ <td>PRODUCT_MANUFACTURER</td>
+ <td>制造商的名称</td>
+ <td>
+ <code>acme</code>
+ </td>
+ </tr>
+ <tr>
+ <td>PRODUCT_MODEL</td>
+ <td>最终产品的最终用户可见名称</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>PRODUCT_NAME</td>
+ <td>总体产品的最终用户可见名称,将显示在“设置”&gt;“关于”屏幕中。
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>PRODUCT_OTA_PUBLIC_KEYS</td>
+ <td>产品的无线下载 (OTA) 公钥列表</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>PRODUCT_PACKAGES</td>
+ <td>列出要安装的 APK 和模块。
+ </td>
+ <td>
+ <code>Calendar Contacts</code>
+ </td>
+ </tr>
+ <tr>
+ <td>PRODUCT_PACKAGE_OVERLAYS</td>
+ <td>指明是使用默认资源还是添加任何产品特定叠加层</td>
+ <td>
+ <code>vendor/acme/overlay</code>
+ </td>
+ </tr>
+ <tr>
+ <td>PRODUCT_PROPERTY_OVERRIDES</td>
+ <td>系统属性分配(采用“key=value”格式)列表</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h3 id="ANDROID_VENDOR_KEYS">设置 ANDROID_VENDOR_KEYS 以通过 USB 进行连接</h3>
+
+<p>借助 <code>ANDROID_VENDOR_KEYS</code> 环境变量,设备制造商可以通过 <code>adb</code> 访问正式版。为每个版本生成每台设备都可以接受的密钥并将其存储在内部(如存储在 <code>vendor/oem-name/security/adb/</code>),然后通过 <code>ANDROID_VENDOR_KEYS</code> 让 <code>adb</code> 使用这些规范密钥,而不是随机密钥。</p>
+
+<p>使用 <code>ANDROID_VENDOR_KEYS</code> 环境变量指向生成的加密用 <code>adb</code> 公钥和私钥所在的目录。私钥存储在文件中。公钥存储在 file.pub 中。<code>ANDROID_VENDOR_KEYS</code> 环境变量指向存储生成的密钥对的文件或目录。</p>
+
+<p>该变量被设为一个文件或目录,其中包含使用 <code>adb keygen</code> 文件命令生成的 2048 位 RSA 身份验证密钥对。
+这些密钥对是对 ADB 服务器生成的 RSA 密钥对的补充。首次使用 <code>adb</code> 通过 USB 进行连接时,需要使用 RSA 密钥对。</p>
+
+<p>您必须接受主机的 RSA 密钥,才能显式授予 <code>adb</code> 对设备的访问权限。默认情况下,ADB 服务器生成的密钥对以 <code>adbkey</code>(私钥)和 <code>adbkey.pub</code>(公钥)的形式存储在以下密钥存储库目录中:</p>
+
+<p>在 MacOS 上,文件位置可能为:<code>$HOME/.android</code>。在 Windows 和 Linux 上,文件位置为:<code>%USERPOFILE%\.android</code>。在 Windows 上,RSA 身份验证密钥在某些情况下也可能存储在 <code>C:\Windows\System32\config\systemprofile\.android</code> 中。当 ADB 服务器需要密钥时,它会先搜索 ADB 服务器密钥存储库目录。如果找不到任何密钥,它会接着检查 <code>ANDROID_VENDOR_KEYS</code> 环境变量。如果还是找不到任何密钥,本地 ADB 服务器会生成一个新密钥对,并将其保存在 ADB 服务器密钥存储库目录中。</p>
+
+<p class="note"><strong>注意</strong>:您可以通过设置 <code>ANDROID_SDK_HOME</code> 环境变量来替换 ADB 服务器存储 RSA 密钥的默认目录。在设备上,密钥存储在 <code>/data/misc/adb/adb_keys/</code> 文件中,新的经过授权的密钥会在您接受它们后附加到同一个文件中。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/develop/repo.html b/zh-cn/setup/develop/repo.html
new file mode 100644
index 00000000..448f2642
--- /dev/null
+++ b/zh-cn/setup/develop/repo.html
@@ -0,0 +1,280 @@
+<html devsite><head>
+ <title>Repo 命令参考资料</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>使用 Repo 需遵循的格式如下:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo <var>&lt;COMMAND&gt; &lt;OPTIONS&gt;</var>
+</pre>
+<p>可选元素显示在方括号 [ ] 中。例如,许多命令会将项目列表用作参数。您可以为项目指定项目列表,作为名称列表或本地源代码目录的路径列表:</p>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">repo sync [<var>&lt;PROJECT0&gt; &lt;PROJECT1&gt; ... &lt;PROJECTN&gt;</var>]</code>
+<code class="devsite-terminal">repo sync [<var>&lt;/PATH/TO/PROJECT0&gt; ... &lt;/PATH/TO/PROJECTN&gt;</var>]</code>
+</pre>
+
+<h2 id="help">help</h2>
+<p>安装 Repo 后,您可以通过运行以下命令找到最新文档(开头是包含所有命令的摘要):</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo help
+</pre>
+<p>您可以通过在 Repo 树中运行以下命令来获取有关某个命令的信息:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo help <var>&lt;COMMAND&gt;</var>
+</pre>
+
+<p>例如,以下命令会生成 Repo <code>init</code> 参数的说明和选项列表,该参数会在当前目录中初始化 Repo。(要了解详情,请参阅 <a href="#init">init</a>。)</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo help init
+</pre>
+
+<h2 id="init">init</h2>
+<pre class="devsite-terminal devsite-click-to-copy">repo init -u <var>&lt;URL&gt;</var> [<var>&lt;OPTIONS&gt;</var>]
+</pre>
+<p>在当前目录中安装 Repo。这会创建一个 <code>.repo/</code> 目录,其中包含用于 Repo 源代码和标准 Android 清单文件的 Git 代码库。该 <code>.repo/</code> 目录中还包含 <code>manifest.xml</code>,这是一个指向 <code>.repo/manifests/</code> 目录中所选清单的符号链接。有关更新清单的说明,请参阅 <a href="https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.txt" class="external">manifest-format.txt</a>。</p>
+<p>选项:</p>
+<ul>
+<li>
+<p><code>-u</code>:指定要从中检索清单代码库的网址。您可以在 <code>https://android.googlesource.com/platform/manifest</code> 中找到常见清单</p>
+</li>
+<li>
+<p><code>-m</code>:在代码库中选择清单文件。如果未选择任何清单名称,则会默认选择 default.xml。</p>
+</li>
+<li>
+<p><code>-b</code>:指定修订版本,即特定的清单分支。</p>
+</li>
+</ul>
+<p class="note"><strong>注意</strong>:对于其余的所有 Repo 命令,当前工作目录必须是 <code>.repo/</code> 的父目录或相应父目录的子目录。</p>
+
+<h2 id="sync">sync</h2>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo sync [<var>&lt;PROJECT_LIST&gt;</var>]
+</pre>
+<p>下载新的更改并更新本地环境中的工作文件。如果您在未使用任何参数的情况下运行 <code>repo sync</code>,则该操作会同步所有项目的文件。</p>
+<p>运行 <code>repo sync</code> 后,将出现以下情况:</p>
+<ul>
+<li>
+<p>如果目标项目从未同步过,则 <code>repo sync</code> 相当于 <code>git clone</code>。远程代码库中的所有分支都会复制到本地项目目录中。</p>
+</li>
+<li>
+<p>如果目标项目已同步过,则 <code>repo sync</code> 相当于以下命令:</p>
+<pre><code>git remote update
+git rebase origin/<var>&lt;BRANCH&gt;</var>
+</code></pre>
+<p>其中 <code>&lt;BRANCH&gt;</code> 是本地项目目录中当前已检出的分支。如果本地分支没有在跟踪远程代码库中的分支,则相应项目不会发生任何同步。</p>
+</li>
+<li>
+<p>如果 git rebase 操作导致合并冲突,那么您需要使用普通 Git 命令(例如 <code>git rebase --continue</code>)来解决冲突。</p>
+</li>
+</ul>
+<p><code>repo sync</code> 运行成功后,指定项目中的代码会与远程代码库中的代码保持同步。</p>
+<p>选项:</p>
+<ul>
+<li>
+<p><code>-d</code>:将指定项目切换回清单修订版本。如果项目当前属于某个主题分支,但只是临时需要清单修订版本,则此选项会有所帮助。</p>
+</li>
+<li>
+<p><code>-s</code>:同步到当前清单中清单服务器元素指定的一个已知的良好版本。</p>
+</li>
+<li>
+<p><code>-f</code>:即使某个项目同步失败,系统也会继续同步其他项目。</p>
+</li>
+</ul>
+
+<h2 id="upload">upload</h2>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo upload [<var>&lt;PROJECT_LIST&gt;</var>]
+</pre>
+<p>对于指定的项目,Repo 会将本地分支与最后一次 repo sync 时更新的远程分支进行比较。Repo 会提示您选择一个或多个尚未上传以供审核的分支。</p>
+<p>您选择一个或多个分支后,所选分支上的所有提交都会通过 HTTPS 连接传输到 Gerrit。您需要配置一个 HTTPS 密码以启用上传授权。要生成新的用户名/密码对以用于 HTTPS 传输,请访问<a href="https://android-review.googlesource.com/new-password">密码生成器</a>。</p>
+<p>当 Gerrit 通过其服务器接收对象数据时,它会将每项提交转变成一项更改,以便审核者可以单独针对每项提交给出意见。要将几项“检查点”提交合并为一项提交,请使用 git rebase -i,然后再运行 repo upload。</p>
+<p>如果您在未使用任何参数的情况下运行 repo upload,则该操作会搜索所有项目中的更改以进行上传。</p>
+<p>要在更改上传之后对其进行修改,您应该使用 <code>git rebase -i</code> 或 <code>git commit --amend</code> 等工具更新您的本地提交。修改完成之后,请执行以下操作:</p>
+<ul>
+<li>
+<p>进行核对以确保更新后的分支是当前已检出的分支。</p>
+</li>
+<li>
+<p>对于相应系列中的每项提交,请在方括号内输入 Gerrit 更改 ID:</p>
+<pre><code># Replacing from branch foo
+[ 3021 ] 35f2596c Refactor part of GetUploadableBranches to lookup one specific...
+[ 2829 ] ec18b4ba Update proto client to support patch set replacments
+# Insert change numbers in the brackets to add a new patch set.
+# To create a new change record, leave the brackets empty.
+</code></pre>
+</li>
+</ul>
+<p>上传完成后,这些更改将拥有一个额外的补丁程序集。</p>
+<p>如果您只希望上传当前已检出的 Git 分支,则可以使用标记 <code>--current-branch</code> (简称 <code>--cbr</code>)。</p>
+
+<h2 id="diff">diff</h2>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo diff [<var>&lt;PROJECT_LIST&gt;</var>]
+</pre>
+<p>使用 <code>git diff</code> 显示提交与工作树之间的明显更改。</p>
+
+<h2 id="download">download</h2>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo download <var>&lt;TARGET&gt; &lt;CHANGE&gt;</var>
+</pre>
+<p>从审核系统中下载指定更改,并放在您项目的本地工作目录中供使用。</p>
+<p>例如,要将<a href="https://android-review.googlesource.com/23823">更改 23823</a> 下载到您的平台/编译目录,请运行以下命令:</p>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo download platform/build 23823
+</pre>
+<p><code>repo sync</code> 应该可以有效移除通过 <code>repo download</code> 检索到的任何提交。或者,您可以将远程分支检出,例如 <code>git checkout m/master</code>。</p>
+<p class="note"><strong>注意</strong>:由于全球的所有服务器均存在复制延迟,因此某项更改(位于 <a href="https://android-review.googlesource.com/">Gerrit</a> 中)出现在网络上的时间与所有用户可通过 <code>repo download</code> 找到此项更改的时间之间存在些许的镜像延迟。</p>
+
+<h2 id="forall">forall</h2>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo forall [<var>&lt;PROJECT_LIST&gt;</var>] -c <var>&lt;COMMAND&gt;</var>
+</pre>
+<p>在每个项目中运行指定的 shell 命令。通过 <code>repo forall</code> 可使用下列额外的环境变量:</p>
+<ul>
+<li>
+<p><code>REPO_PROJECT</code> 可设为项目的具有唯一性的名称。</p>
+</li>
+<li>
+<p><code>REPO_PATH</code> 是客户端根目录的相对路径。</p>
+</li>
+<li>
+<p><code>REPO_REMOTE</code> 是清单中远程系统的名称。</p>
+</li>
+<li>
+<p><code>REPO_LREV</code> 是清单中修订版本的名称,已转换为本地跟踪分支。如果您需要将清单修订版本传递到某个本地运行的 Git 命令,则可使用此变量。</p>
+</li>
+<li>
+<p><code>REPO_RREV</code> 是清单中修订版本的名称,与清单中显示的名称完全一致。</p>
+</li>
+</ul>
+<p>选项:</p>
+<ul>
+<li>
+<p><code>-c</code>:要运行的命令和参数。此命令会通过 <code>/bin/sh</code> 进行求值,它之后的任何参数都将作为 shell 位置参数传递。</p>
+</li>
+<li>
+<p><code>-p</code>:在指定命令输出结果之前显示项目标头。这通过以下方式实现:将管道绑定到命令的 stdin、stdout 和 sterr 流,然后通过管道将所有输出结果传输到一个页面调度会话中显示的连续流中。</p>
+</li>
+<li>
+<p><code>-v</code>:显示该命令向 stderr 写入的消息。</p>
+</li>
+</ul>
+
+<h2 id="prune">prune</h2>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo prune [<var>&lt;PROJECT_LIST&gt;</var>]
+</pre>
+<p>删减(删除)已合并的主题。</p>
+
+<h2 id="start">start</h2>
+<pre class="devsite-terminal devsite-click-to-copy">repo start <var>&lt;BRANCH_NAME&gt;</var> [<var>&lt;PROJECT_LIST&gt;</var>]
+</pre>
+<p>从清单中指定的修订版本开始,创建一个新的分支进行开发。</p>
+<p><code>&lt;BRANCH_NAME&gt;</code> 参数应简要说明您尝试对项目进行的更改。如果您不知道,则不妨考虑使用默认名称。</p>
+<p><code>&lt;PROJECT_LIST&gt;</code> 指定了将参与此主题分支的项目。</p>
+<p class="note"><strong>注意</strong>:“.”是一个非常实用的简写形式,用来代表当前工作目录中的项目。</p>
+
+<h2 id="status">status</h2>
+<pre class="devsite-terminal devsite-click-to-copy">
+repo status [<var>&lt;PROJECT_LIST&gt;</var>]
+</pre>
+<p>对于每个指定的项目,将工作树与临时区域(索引)以及此分支 (HEAD) 上的最近一次提交进行比较。在这三种状态存在差异之处显示每个文件的摘要行。</p>
+<p>要仅查看当前分支的状态,请运行 <code>repo status</code>。系统会按项目列出状态信息。对于项目中的每个文件,系统使用两个字母的代码来表示:</p>
+<p>在第一列中,大写字母表示临时区域与上次提交状态之间的不同之处。</p>
+<table>
+<thead>
+<tr>
+<th>字母</th>
+<th>含义</th>
+<th>说明</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>-</td>
+<td>无更改</td>
+<td>HEAD 与索引中相同</td>
+</tr>
+<tr>
+<td>A</td>
+<td>已添加</td>
+<td>不存在于 HEAD 中,但存在于索引中</td>
+</tr>
+<tr>
+<td>M</td>
+<td>已修改</td>
+<td>存在于 HEAD 中,但索引中的文件已修改</td>
+</tr>
+<tr>
+<td>D</td>
+<td>已删除</td>
+<td>存在于 HEAD 中,但不存在于索引中</td>
+</tr>
+<tr>
+<td>R</td>
+<td>已重命名</td>
+<td>不存在于 HEAD 中,但索引中的文件的路径已更改</td>
+</tr>
+<tr>
+<td>C</td>
+<td>已复制</td>
+<td>不存在于 HEAD 中,已从索引中的另一个文件复制</td>
+</tr>
+<tr>
+<td>T</td>
+<td>模式已更改</td>
+<td>HEAD 与索引中的内容相同,但模式已更改</td>
+</tr>
+<tr>
+<td>U</td>
+<td>未合并</td>
+<td>HEAD 与索引之间存在冲突;需要解决方案</td>
+</tr>
+</tbody>
+</table>
+<p>在第二列中,小写字母表示工作目录与索引之间的不同之处。</p>
+<table>
+<thead>
+<tr>
+<th>字母</th>
+<th>含义</th>
+<th>说明</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>-</td>
+<td>新/未知</td>
+<td>不存在于索引中,但存在于工作树中</td>
+</tr>
+<tr>
+<td>m</td>
+<td>已修改</td>
+<td>存在于索引中,也存在于工作树中(但已修改)</td>
+</tr>
+<tr>
+<td>d</td>
+<td>已删除</td>
+<td>存在于索引中,不存在于工作树中</td>
+</tr>
+</tbody>
+</table>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/start/brands.html b/zh-cn/setup/start/brands.html
new file mode 100644
index 00000000..29d466d6
--- /dev/null
+++ b/zh-cn/setup/start/brands.html
@@ -0,0 +1,104 @@
+<html devsite><head>
+ <title>品牌指南</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>“Android”名称、<img src="/setup/assets/images/sac_logo.png" alt="Android" style="margin:0;padding:0 2px;vertical-align:baseline"/> 徽标、“Google Play”品牌以及其他商标均为 Google LLC 的资产,不属于通过 Android 开源项目提供的资源。</p>
+
+<p>如果您希望使用这些品牌,以表明它们与您的设备之间存在关联,请遵循本页中的准则。这些准则与 <a href="https://developer.android.com/distribute/tools/promote/brand.html">Android 应用开发者品牌指南</a>和 <a href="https://www.google.com/permissions/">Google 品牌权限</a>是相辅相成的关系。</p>
+
+<h2 id="brand-android">Android</h2>
+
+<p>以下是 Android 品牌和相关资产的制造商使用准则。</p>
+
+<h3 id="text-android" style="clear:right">在文本中使用“Android”字样</h3>
+<ul>
+ <li>Android™ 首次出现在创意素材中时应标注商标符号。</li>
+ <li>“Android”应始终采用首字母大写形式,且一律不得使用复数或所有格形式。
+ </li>
+ <li>只有<a href="/compatibility/index.html">与 Android 兼容</a>的设备才能在硬件、包装或营销材料中使用“Android”。</li>
+ <li>不得在产品名称中使用“Android”,也不得将其用作包装或设备上的主要或明显的标记。</li>
+ <li>“Android”一词只能用于指明您设备的操作系统。如果您不确定自己的用法是否符合我们的使用准则,请通过以下简单的测试来加以验证:如果您可以将“Android”替换为“Android 平台”且文本内容仍然有意义,那么您可以使用“Android”一词。
+ <ul>
+ <li><span style="color:red">不正确</span>:“Android XBrand 手机”</li>
+ <li><span style="color:green">正确</span>:“采用 Android 的 XBrand 手机”</li>
+ </ul>
+ </li>
+ <li>您可以将“with Android”(搭载 Android)(以纯黑色文本显示)与您的徽标一起使用。如果与您的徽标一起使用,则“with Android”(搭载 Android)不应超过徽标大小的 90%。首次或着重以这种形式使用时,后面应标注 ™ 符号。</li>
+ <li>只有后跟一个合适的通称时,Android 才可用作描述词。<em></em>不得将“Android”用作您设备的产品名称或品牌的一部分。
+ <ul>
+ <li><span style="color:red">不正确</span>:“Android XBrand 手机”</li>
+ <li><span style="color:green">正确</span>:“Android 移动设备”</li>
+ </ul>
+ <p><strong>无论在任何情况下使用 Android 名称,都必须在您的资料中包含以下归属信息</strong>:</p>
+ <blockquote><em>Android 是 Google LLC 的商标。</em></blockquote><p></p>
+ </li>
+</ul>
+
+<h4>可接受的使用情形示例</h4>
+<img src="../images/JB-TM-example.png" alt="Jelly Bean 商标示例"/>
+<img src="../images/8100-TM-example.png" alt="8100 系列商标示例"/>
+
+<h4>不可接受的使用情形示例</h4>
+<img src="../images/XBrand-TM-example.jpg" alt="XBrand 商标示例"/>
+
+<h3 id="logo-android">Android 徽标</h3>
+<p>除非经 Google 书面协议明确授权,否则任何人都不得使用 Android 徽标及其专用字体(无论是否包含 Android 机器人)。</p>
+<img alt="无徽标" src="../images/android_logo_new_crossed_out.png"/>
+<img alt="无徽标" src="https://developer.android.com/images/brand/android_logo_no.png"/>
+
+<h3 id="robot-android">Android 机器人</h3>
+
+<div class="wrap">
+<div class="col-4">
+ <img alt="android-robot" style="float:left;margin-right:10px" src="../images/Android_Robot_100.png"/>
+ <p style="padding-top:20px">
+ <a href="https://developer.android.com/images/brand/Android_Robot_100.png">100x118</a><br />
+ <a href="https://developer.android.com/images/brand/Android_Robot_200.png">200x237</a><br />
+ <a href="https://developer.android.com/downloads/brand/Android_Robot_outlined.ai">Illustrator</a>
+ </p>
+</div>
+<div class="col-8">
+<p style="padding-top:20px">在注明适当归属信息的情况下,您可以在营销资料中自由使用、重制和修改 Android 机器人。如需了解详情,请参阅<a href="https://developer.android.com/distribute/tools/promote/brand.html">应用开发者品牌指南</a>和<a href="https://creativecommons.org/licenses/by/3.0/">知识共享 (Creative Commons) 许可</a>。</p>
+</div>
+</div>
+
+<div class="wrap" style="padding-top:20px">
+<div class="col-4" style="align:center">
+<img alt="no-peace-robot" style="width:30%;height:30%" src="../images/No_PeaceBot_200.jpg"/>
+</div>
+<div class="col-8">
+<p style="padding-top:20px">合作伙伴的营销材料中不得使用 Android Peace 机器人或其任何变体形式(例如带 Peace 标记的 Android 机器人)。</p>
+</div>
+</div>
+
+<div style="clear:both"></div>
+<h2 id="brand-google_play">Google Play</h2>
+
+<p>设备只有在<a href="/setup/start/faqs.html#if-my-device-is-compatible-does-it-automatically-have-access-to-google-play-and-branding">获得使用 Google Play 的许可</a>的情况下,才能在硬件包装、硬件的营销材料或硬件本身上使用“Google Play”名称和 Google Play 商店图标。如需查看获得使用 Google Play 的许可的设备列表,请参阅<a href="https://support.google.com/googleplay/answer/1727131">支持的设备</a>。</p>
+
+<h2>其他品牌</h2>
+<p><a href="https://www.android.com/auto/">Android Auto</a>、<a href="https://www.android.com/tv/">Android TV</a> 和 <a href="https://www.android.com/wear/">Android Wear</a> 是归 Google 所有的品牌。这些品牌要求使用 Google 专有软件,此类软件在 Android 平台上运行且只能在获得 Google 授予的许可后使用。要了解如何申请许可,请参阅<a href="/compatibility/contact-us.html">与我们联系</a>。
+
+</p><h2 id="Questions">问题</h2>
+
+<p>如需了解更多品牌使用信息,请通过提交<a href="https://support.google.com/googleplay/contact/brand_developer">合作伙伴品牌咨询表单</a>与 Android 合作伙伴营销团队联系。</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/start/build-numbers.html b/zh-cn/setup/start/build-numbers.html
new file mode 100644
index 00000000..3c5d7320
--- /dev/null
+++ b/zh-cn/setup/start/build-numbers.html
@@ -0,0 +1,2402 @@
+<html devsite><head>
+ <title>代号、标记和细分版本号</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>Android 的开发是围绕着版本系列进行的,这些版本使用美味的点心名称(按字母顺序)作为代号。</p>
+
+<h2 id="platform-code-names-versions-api-levels-and-ndk-releases">平台代号、版本、API 级别和 NDK 版本</h2>
+<p>为方便起见,代号与以下版本号、API 级别和 NDK 版本相对应:</p>
+<table>
+<thead>
+<tr>
+<th>代号</th>
+<th>版本</th>
+<th>API 级别</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Oreo</td>
+<td>8.1.0</td>
+<td>API 级别 27</td>
+</tr>
+<tr>
+<td>Oreo</td>
+<td>8.0.0</td>
+<td>API 级别 26</td>
+</tr>
+<tr>
+<td>Nougat</td>
+<td>7.1</td>
+<td>API 级别 25</td>
+</tr>
+<tr>
+<td>Nougat</td>
+<td>7.0</td>
+<td>API 级别 24</td>
+</tr>
+<tr>
+<td>Marshmallow</td>
+<td>6.0</td>
+<td>API 级别 23</td>
+</tr>
+<tr>
+<td>Lollipop</td>
+<td>5.1</td>
+<td>API 级别 22</td>
+</tr>
+<tr>
+<td>Lollipop</td>
+<td>5.0</td>
+<td>API 级别 21</td>
+</tr>
+<tr>
+<td>KitKat</td>
+<td>4.4-4.4.4</td>
+<td>API 级别 19</td>
+</tr>
+<tr>
+<td>Jelly Bean</td>
+<td>4.3.x</td>
+<td>API 级别 18</td>
+</tr>
+<tr>
+<td>Jelly Bean</td>
+<td>4.2.x</td>
+<td>API 级别 17</td>
+</tr>
+<tr>
+<td>Jelly Bean</td>
+<td>4.1.x</td>
+<td>API 级别 16</td>
+</tr>
+<tr>
+<td>Ice Cream Sandwich</td>
+<td>4.0.3-4.0.4</td>
+<td>API 级别 15,NDK 8</td>
+</tr>
+<tr>
+<td>Ice Cream Sandwich</td>
+<td>4.0.1-4.0.2</td>
+<td>API 级别 14,NDK 7</td>
+</tr>
+<tr>
+<td>Honeycomb</td>
+<td>3.2.x</td>
+<td>API 级别 13</td>
+</tr>
+<tr>
+<td>Honeycomb</td>
+<td>3.1</td>
+<td>API 级别 12,NDK 6</td>
+</tr>
+<tr>
+<td>Honeycomb</td>
+<td>3.0</td>
+<td>API 级别 11</td>
+</tr>
+<tr>
+<td>Gingerbread</td>
+<td>2.3.3-2.3.7</td>
+<td>API 级别 10</td>
+</tr>
+<tr>
+<td>Gingerbread</td>
+<td>2.3-2.3.2</td>
+<td>API 级别 9,NDK 5</td>
+</tr>
+<tr>
+<td>Froyo</td>
+<td>2.2.x</td>
+<td>API 级别 8,NDK 4</td>
+</tr>
+<tr>
+<td>Eclair</td>
+<td>2.1</td>
+<td>API 级别 7,NDK 3</td>
+</tr>
+<tr>
+<td>Eclair</td>
+<td>2.0.1</td>
+<td>API 级别 6</td>
+</tr>
+<tr>
+<td>Eclair</td>
+<td>2.0</td>
+<td>API 级别 5</td>
+</tr>
+<tr>
+<td>Donut</td>
+<td>1.6</td>
+<td>API 级别 4,NDK 2</td>
+</tr>
+<tr>
+<td>Cupcake</td>
+<td>1.5</td>
+<td>API 级别 3,NDK 1</td>
+</tr>
+<tr>
+<td>(无代号)</td>
+<td>1.1</td>
+<td>API 级别 2</td>
+</tr>
+<tr>
+<td>(无代号)</td>
+<td>1.0</td>
+<td>API 级别 1</td>
+</tr>
+</tbody>
+</table>
+
+<p>在 Android 8.0 (Oreo) 及更高版本中,每个细分版本均采用细分版本号格式 <strong>PVBB.YYMMDD.bbb[.Cn]</strong>,其中:</p>
+<ul>
+ <li>P 表示平台版本代号的第一个字母,例如 O 表示 Oreo。</li>
+ <li>V 表示支持的行业。按照惯例,P 表示主要平台分支。</li>
+ <li>BB 表示由字母和数字组成的代码,Google 可通过该代码识别相应细分版本所属的确切代码分支。</li>
+ <li>YYMMDD 表示相应版本从开发分支细分出来或与开发分支同步的日期。它并不一定是细分版本的确切构建日起,因为 Google 常常会在现有细分版本中增加细微的更改,并在新细分版本中重复使用与现有细分版本相同的日期代码。</li>
+ <li>bbb 表示具有相同日期代码的不同版本,从 001 开始。</li>
+ <li>Cn 是可选的字母数字,表示在现有 PVBB.YYMMDD.bbb 细分版本之上编译的修补程序,从 A1 开始。</li>
+</ul>
+
+<p>旧版 Android 系统使用的是另一种更简短的细分版本 ID 代码(如 <strong>FRF85B</strong>),其中:</p>
+
+<ul>
+ <li>第一个字母代表相应版本系列的代号,例如 F 表示 Froyo。
+ </li>
+ <li>第二个字母是分支代码,Google 用它来表示细分版本所属的确切代号分支。按照惯例,R 表示主要版本分支。</li>
+ <li>第三个字母和后面的两个数字是日期代码。字母表示季度(A = 2009 年第 1 季度,F = 2010 年第 2 季度,以此类推)。两个数字表示相应季度内的第某天(F85 表示 2010 年 6 月 24 日)。它并不一定是细分版本的确切构建日起,因为 Google 常常会在现有细分版本中增加细微的更改,并在新细分版本中重复使用与现有细分版本相同的日期代码。</li>
+ <li>末尾字母表示具有相同日期代码的不同版本,从 A 开始(A 并不会显示,通常会为了简洁而省略)。</li>
+
+<h2 id="source-code-tags-and-builds">源代码标记和细分版本</h2>
+<p>下表完整列出了从 Donut 开始的标记和细分版本。
+
+</p><aside class="note"><strong>注意</strong>:要下载 Nexus 和 Pixel 设备的<a href="https://developers.google.com/android/images">出厂映像</a>、<a href="https://developers.google.com/android/drivers">驱动程序</a>以及完整的 <a href="https://developers.google.com/android/ota">OTA</a> 映像,请参阅 <a href="https://developers.google.com/android/">Android 开发者网站</a>。
+</aside>
+
+<table>
+ <thead>
+ <tr>
+ <th>细分版本</th>
+ <th>分支</th>
+ <th>版本</th>
+ <th>支持的设备</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>OPM5.171019.017</td>
+ <td>android-8.1.0_r18</td>
+ <td>Oreo</td>
+ <td>Nexus 5X、Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>OPM3.171019.016</td>
+ <td>android-8.1.0_r17</td>
+ <td>Oreo</td>
+ <td>Nexus 5X、Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>OPM1.171019.022.A1</td>
+ <td>android-8.1.0_r16</td>
+ <td>Oreo</td>
+ <td>Pixel C</td>
+ </tr>
+ <tr>
+ <td>OPM1.171019.021</td>
+ <td>android-8.1.0_r15</td>
+ <td>Oreo</td>
+ <td>Pixel 2 XL、Pixel 2、Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>OPM5.171019.015</td>
+ <td>android-8.1.0_r14</td>
+ <td>Oreo</td>
+ <td>Nexus 5X、Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>OPM3.171019.014</td>
+ <td>android-8.1.0_r13</td>
+ <td>Oreo</td>
+ <td>Nexus 5X、Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>OPM1.171019.019</td>
+ <td>android-8.1.0_r12</td>
+ <td>Oreo</td>
+ <td>Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPM1.171019.018</td>
+ <td>android-8.1.0_r11</td>
+ <td>Oreo</td>
+ <td>Pixel 2 XL</td>
+ </tr>
+ <tr>
+ <td>OPM1.171019.016</td>
+ <td>android-8.1.0_r10</td>
+ <td>Oreo</td>
+ <td>Pixel、Pixel XL、Pixel C</td>
+ </tr>
+ <tr>
+ <td>OPM5.171019.014</td>
+ <td>android-8.1.0_r9</td>
+ <td>Oreo</td>
+ <td>Nexus 5X、Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>OPM2.171019.016</td>
+ <td>android-8.1.0_r8</td>
+ <td>Oreo</td>
+ <td>Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPM3.171019.013</td>
+ <td>android-8.1.0_r7</td>
+ <td>Oreo</td>
+ <td>Nexus 5X、Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>OPM1.171019.015</td>
+ <td>android-8.1.0_r6</td>
+ <td>Oreo</td>
+ <td>Pixel C</td>
+ </tr>
+ <tr>
+ <td>OPM1.171019.014</td>
+ <td>android-8.1.0_r5</td>
+ <td>Oreo</td>
+ <td>Pixel 2 XL、Pixel 2、Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>OPM1.171019.013</td>
+ <td>android-8.1.0_r4</td>
+ <td>Oreo</td>
+ <td>Pixel 2 XL、Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPM1.171019.012</td>
+ <td>android-8.1.0_r3</td>
+ <td>Oreo</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>OPM2.171019.012</td>
+ <td>android-8.1.0_r2</td>
+ <td>Oreo</td>
+ <td>Pixel 2 XL、Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPM1.171019.011</td>
+ <td>android-8.1.0_r1</td>
+ <td>Oreo</td>
+ <td>Pixel 2 XL、Pixel 2、Pixel XL、Pixel、Pixel C、Nexus 6P、Nexus 5X</td>
+ </tr>
+ <tr>
+ <td>OPR5.170623.014</td>
+ <td>android-8.0.0_r36</td>
+ <td>Oreo</td>
+ <td>Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>OPR4.170623.020</td>
+ <td>android-8.0.0_r35</td>
+ <td>Oreo</td>
+ <td>Nexus 5X</td>
+ </tr>
+ <tr>
+ <td>OPD3.170816.023</td>
+ <td>android-8.0.0_r34</td>
+ <td>Oreo</td>
+ <td>Pixel 2 XL、Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPD1.170816.025</td>
+ <td>android-8.0.0_r33</td>
+ <td>Oreo</td>
+ <td>Pixel 2 XL、Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPR6.170623.023</td>
+ <td>android-8.0.0_r32</td>
+ <td>Oreo</td>
+ <td>Nexus 5X</td>
+ </tr>
+ <tr>
+ <td>OPR5.170623.011</td>
+ <td>android-8.0.0_r31</td>
+ <td>Oreo</td>
+ <td>Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>OPR3.170623.013</td>
+ <td>android-8.0.0_r30</td>
+ <td>Oreo</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>OPR2.170623.027</td>
+ <td>android-8.0.0_r29</td>
+ <td>Oreo</td>
+ <td>Nexus Player</td>
+ </tr>
+ <tr>
+ <td>OPR1.170623.032</td>
+ <td>android-8.0.0_r28</td>
+ <td>Oreo</td>
+ <td>Pixel XL、Pixel、Pixel C</td>
+ </tr>
+ <tr>
+ <td>OPD3.170816.016</td>
+ <td>android-8.0.0_r27</td>
+ <td>Oreo</td>
+ <td>Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPD2.170816.015</td>
+ <td>android-8.0.0_r26</td>
+ <td>Oreo</td>
+ <td>Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPD1.170816.018</td>
+ <td>android-8.0.0_r25</td>
+ <td>Oreo</td>
+ <td>Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPD3.170816.012</td>
+ <td>android-8.0.0_r24</td>
+ <td>Oreo</td>
+ <td>Pixel 2 XL、Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPD1.170816.012</td>
+ <td>android-8.0.0_r23</td>
+ <td>Oreo</td>
+ <td>Pixel 2 XL、Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPD1.170816.011</td>
+ <td>android-8.0.0_r22</td>
+ <td>Oreo</td>
+ <td>Pixel 2 XL、Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPD1.170816.010</td>
+ <td>android-8.0.0_r21</td>
+ <td>Oreo</td>
+ <td>Pixel 2 XL、Pixel 2</td>
+ </tr>
+ <tr>
+ <td>OPR5.170623.007</td>
+ <td>android-8.0.0_r17</td>
+ <td>Oreo</td>
+ <td>Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>OPR4.170623.009</td>
+ <td>android-8.0.0_r16</td>
+ <td>Oreo</td>
+ <td>Nexus 5X</td>
+ </tr>
+ <tr>
+ <td>OPR3.170623.008</td>
+ <td>android-8.0.0_r15</td>
+ <td>Oreo</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>OPR1.170623.027</td>
+ <td>android-8.0.0_r13</td>
+ <td>Oreo</td>
+ <td>Pixel XL、Pixel、Pixel C</td>
+ </tr>
+ <tr>
+ <td>OPR6.170623.021</td>
+ <td>android-8.0.0_r12</td>
+ <td>Oreo</td>
+ <td>Nexus Player</td>
+ </tr>
+ <tr>
+ <td>OPR6.170623.019</td>
+ <td>android-8.0.0_r11</td>
+ <td>Oreo</td>
+ <td>Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>OPR4.170623.006</td>
+ <td>android-8.0.0_r10</td>
+ <td>Oreo</td>
+ <td>Nexus 5X</td>
+ </tr>
+ <tr>
+ <td>OPR3.170623.007</td>
+ <td>android-8.0.0_r9</td>
+ <td>Oreo</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>OPR1.170623.026</td>
+ <td>android-8.0.0_r7</td>
+ <td>Oreo</td>
+ <td>Pixel XL、Pixel、Pixel C</td>
+ </tr>
+ <tr>
+ <td>OPR6.170623.013</td>
+ <td>android-8.0.0_r4</td>
+ <td>Oreo</td>
+ <td>Nexus 5X、Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>OPR6.170623.012</td>
+ <td>android-8.0.0_r3</td>
+ <td>Oreo</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>OPR6.170623.011</td>
+ <td>android-8.0.0_r2</td>
+ <td>Oreo</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>OPR6.170623.010</td>
+ <td>android-8.0.0_r1</td>
+ <td>Oreo</td>
+ <td>Pixel C</td>
+ </tr>
+ <tr>
+ <td>N2G48H</td>
+ <td>android-7.1.2_r36</td>
+ <td>Nougat</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>NZH54D</td>
+ <td>android-7.1.2_r33</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NKG47S</td>
+ <td>android-7.1.2_r32</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NHG47Q</td>
+ <td>android-7.1.2_r30</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NJH47F</td>
+ <td>android-7.1.2_r29</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>N2G48C</td>
+ <td>android-7.1.2_r28</td>
+ <td>Nougat</td>
+ <td>Nexus 5X、Nexus 6P、Nexus Player、Pixel C</td>
+ </tr>
+ <tr>
+ <td>NZH54B</td>
+ <td>android-7.1.2_r27</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ </tr><tr>
+ <td>NKG47M</td>
+ <td>android-7.1.2_r25</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NJH47D</td>
+ <td>android-7.1.2_r24</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NHG47O</td>
+ <td>android-7.1.2_r23</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>N2G48B</td>
+ <td>android-7.1.2_r19</td>
+ <td>Nougat</td>
+ <td>Nexus 6P、Nexus Player、Pixel C</td>
+ </tr>
+ <tr>
+ <td>N2G47Z</td>
+ <td>android-7.1.2_r18</td>
+ <td>Nougat</td>
+ <td>Nexus 5X</td>
+ </tr>
+ <tr>
+ <td>NJH47B</td>
+ <td>android-7.1.2_r17</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NJH34C</td>
+ <td>android-7.1.2_r16</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NKG47L</td>
+ <td>android-7.1.2_r15</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NHG47N</td>
+ <td>android-7.1.2_r14</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>N2G47X</td>
+ <td>android-7.1.2_r13</td>
+ <td>Nougat</td>
+ <td>Nexus Player</td>
+ </tr>
+ <tr>
+ <td>N2G47W</td>
+ <td>android-7.1.2_r12</td>
+ <td>Nougat</td>
+ <td>Nexus 5X、Nexus 6P、Pixel C</td>
+ </tr>
+ <tr>
+ <td>NHG47L</td>
+ <td>android-7.1.2_r11</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>N2G47T</td>
+ <td>android-7.1.2_r10</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>N2G47R</td>
+ <td>android-7.1.2_r9</td>
+ <td>Nougat</td>
+ <td>Nexus Player</td>
+ </tr>
+ <tr>
+ <td>N2G47O</td>
+ <td>android-7.1.2_r8</td>
+ <td>Nougat</td>
+ <td>Nexus 5X、Nexus 6P、Pixel XL、Pixel、Pixel C</td>
+ </tr>
+ <tr>
+ <td>NHG47K</td>
+ <td>android-7.1.2_r6</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>N2G47J</td>
+ <td>android-7.1.2_r5</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>N2G47H</td>
+ <td>android-7.1.2_r4</td>
+ <td>Nougat</td>
+ <td>Nexus 6P、Nexus Player</td>
+ </tr>
+ <tr>
+ <td>N2G47F</td>
+ <td>android-7.1.2_r3</td>
+ <td>Nougat</td>
+ <td>Nexus 5X</td>
+ </tr>
+ <tr>
+ <td>N2G47E</td>
+ <td>android-7.1.2_r2</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>N2G47D</td>
+ <td>android-7.1.2_r1</td>
+ <td>Nougat</td>
+ <td>Pixel C</td>
+ </tr>
+ <tr>
+ <td>N9F27M</td>
+ <td>android-7.1.1_r58</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantis)</td>
+ </tr>
+ <tr>
+ <td>NGI77B</td>
+ <td>android-7.1.1_r57</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>N6F27M</td>
+ <td>android-7.1.1_r55</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>N4F27P</td>
+ <td>android-7.1.1_r54</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantisg)</td>
+ </tr>
+ <tr>
+ <td>N9F27L</td>
+ <td>android-7.1.1_r53</td>
+ <td>Nougat</td>
+ <td>Nexus 9</td>
+ </tr>
+ <tr>
+ <td>NGI55D</td>
+ <td>android-7.1.1_r52</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>N4F27O</td>
+ <td>android-7.1.1_r51</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantisg)</td>
+ </tr>
+ <tr>
+ <td>N8I11B</td>
+ <td>android-7.1.1_r50</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>N9F27H</td>
+ <td>android-7.1.1_r49</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantis)</td>
+ </tr>
+ <tr>
+ <td>N6F27I</td>
+ <td>android-7.1.1_r48</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>N4F27K</td>
+ <td>android-7.1.1_r47</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantisg)</td>
+ </tr>
+ <tr>
+ <td>N9F27F</td>
+ <td>android-7.1.1_r46</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantis)</td>
+ </tr>
+ <tr>
+ <td>N6F27H</td>
+ <td>android-7.1.1_r45</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>N4F27I</td>
+ <td>android-7.1.1_r44</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantisg)</td>
+ </tr>
+ <tr>
+ <td>N9F27C</td>
+ <td>android-7.1.1_r43</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantis)</td>
+ </tr>
+ <tr>
+ <td>N6F27E</td>
+ <td>android-7.1.1_r42</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>N4F27E</td>
+ <td>android-7.1.1_r41</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantisg)</td>
+ </tr>
+ <tr>
+ <td>N6F27C</td>
+ <td>android-7.1.1_r40</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>N4F27B</td>
+ <td>android-7.1.1_r39</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantis/volantisg)</td>
+ </tr>
+ <tr>
+ <td>N6F26Y</td>
+ <td>android-7.1.1_r38</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>NOF27D</td>
+ <td>android-7.1.1_r35</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>N4F26X</td>
+ <td>android-7.1.1_r33</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantis/volantisg)</td>
+ </tr>
+ <tr>
+ <td>N4F26U</td>
+ <td>android-7.1.1_r31</td>
+ <td>Nougat</td>
+ <td>Nexus 5X、Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>N6F26U</td>
+ <td>android-7.1.1_r28</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>NUF26N</td>
+ <td>android-7.1.1_r27</td>
+ <td>Nougat</td>
+ <td>Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>NOF27C</td>
+ <td>android-7.1.1_r26</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NOF27B</td>
+ <td>android-7.1.1_r25</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>N4F26T</td>
+ <td>android-7.1.1_r24</td>
+ <td>Nougat</td>
+ <td>Nexus 5X、Nexus 6P、Nexus 9 (volantis/volantisg)、Pixel C</td>
+ </tr>
+ <tr>
+ <td>NMF27D</td>
+ <td>android-7.1.1_r23</td>
+ <td>Nougat</td>
+ <td>Nexus Player</td>
+ </tr>
+ <tr>
+ <td>NMF26X</td>
+ <td>android-7.1.1_r22</td>
+ <td>Nougat</td>
+ <td>Nexus Player</td>
+ </tr>
+ <tr>
+ <td>NOF26W</td>
+ <td>android-7.1.1_r21</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NOF26V</td>
+ <td>android-7.1.1_r20</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>N6F26R</td>
+ <td>android-7.1.1_r17</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>NUF26K</td>
+ <td>android-7.1.1_r16</td>
+ <td>Nougat</td>
+ <td>Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>N4F26Q</td>
+ <td>android-7.1.1_r15</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantis/volantisg)</td>
+ </tr>
+ <tr>
+ <td>N4F26O</td>
+ <td>android-7.1.1_r14</td>
+ <td>Nougat</td>
+ <td>Nexus 5X、Nexus 6P、Pixel C</td>
+ </tr>
+ <tr>
+ <td>N6F26Q</td>
+ <td>android-7.1.1_r13</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>N4F26M</td>
+ <td>android-7.1.1_r12</td>
+ <td>Nougat</td>
+ <td>Nexus 9 (volantis)</td>
+ </tr>
+ <tr>
+ <td>N4F26J</td>
+ <td>android-7.1.1_r11</td>
+ <td>Nougat</td>
+ <td>Nexus 5X、Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>N4F26I</td>
+ <td>android-7.1.1_r10</td>
+ <td>Nougat</td>
+ <td>Nexus 5X、Nexus 6P、Pixel C</td>
+ </tr>
+ <tr>
+ <td>NMF26V</td>
+ <td>android-7.1.1_r9</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NMF26U</td>
+ <td>android-7.1.1_r8</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel </td>
+ </tr>
+ <tr>
+ <td>NMF26R</td>
+ <td>android-7.1.1_r7</td>
+ <td>Nougat</td>
+ <td>Nexus Player</td>
+ </tr>
+ <tr>
+ <td>NMF26Q</td>
+ <td>android-7.1.1_r6</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NMF26O</td>
+ <td>android-7.1.1_r4</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NMF26J</td>
+ <td>android-7.1.1_r3</td>
+ <td>Nougat</td>
+ <td>Nexus Player</td>
+ </tr>
+ <tr>
+ <td>NMF26H</td>
+ <td>android-7.1.1_r2</td>
+ <td>Nougat</td>
+ <td>Pixel C</td>
+ </tr>
+ <tr>
+ <td>NMF26F</td>
+ <td>android-7.1.1_r1</td>
+ <td>Nougat</td>
+ <td>Nexus 5X、Nexus 6P、Nexus 9 (volantis/volantisg)</td>
+ </tr>
+ <tr>
+ <td>NDE63X</td>
+ <td>android-7.1.0_r7</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NDE63V</td>
+ <td>android-7.1.0_r6</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NDE63U</td>
+ <td>android-7.1.0_r5</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NDE63P</td>
+ <td>android-7.1.0_r4</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NDE63L</td>
+ <td>android-7.1.0_r2</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NDE63H</td>
+ <td>android-7.1.0_r1</td>
+ <td>Nougat</td>
+ <td>Pixel XL、Pixel</td>
+ </tr>
+ <tr>
+ <td>NBD92Q</td>
+ <td>android-7.0.0_r35</td>
+ <td>Nougat</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>NBD92N</td>
+ <td>android-7.0.0_r34</td>
+ <td>Nougat</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>NBD92G</td>
+ <td>android-7.0.0_r33</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>NBD92F</td>
+ <td>android-7.0.0_r32</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>NBD92E</td>
+ <td>android-7.0.0_r31</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>NBD92D</td>
+ <td>android-7.0.0_r30</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>NBD91Z</td>
+ <td>android-7.0.0_r29</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>NBD91Y</td>
+ <td>android-7.0.0_r28</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>NBD91X</td>
+ <td>android-7.0.0_r27</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>NBD91U</td>
+ <td>android-7.0.0_r24</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>N5D91L</td>
+ <td>android-7.0.0_r21</td>
+ <td>Nougat</td>
+ <td>Nexus 5X</td>
+ </tr>
+ <tr>
+ <td>NBD91P</td>
+ <td>android-7.0.0_r19</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>NRD91K</td>
+ <td>android-7.0.0_r17</td>
+ <td>Nougat</td>
+ <td>Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>NRD91N</td>
+ <td>android-7.0.0_r15</td>
+ <td>Nougat</td>
+ <td>Nexus 5X、Pixel C、Nexus Player、Nexus 9 (volantis/volantisg)</td>
+ </tr>
+ <tr>
+ <td>NBD90Z</td>
+ <td>android-7.0.0_r14</td>
+ <td>Nougat</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>NBD90X</td>
+ <td>android-7.0.0_r13</td>
+ <td>Nougat</td>
+ <td>Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>NBD90W</td>
+ <td>android-7.0.0_r12</td>
+ <td>Nougat</td>
+ <td>Nexus 5X</td>
+ </tr>
+ <tr>
+ <td>NRD91D</td>
+ <td>android-7.0.0_r7</td>
+ <td>Nougat</td>
+ <td>Pixel C、Nexus Player、Nexus 9 (WLAN)</td>
+ </tr>
+ <tr>
+ <td>NRD90U</td>
+ <td>android-7.0.0_r6</td>
+ <td>Nougat</td>
+ <td>Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>NRD90T</td>
+ <td>android-7.0.0_r5</td>
+ <td>Nougat</td>
+ <td>Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>NRD90S</td>
+ <td>android-7.0.0_r4</td>
+ <td>Nougat</td>
+ <td>Nexus 5X</td>
+ </tr>
+ <tr>
+ <td>NRD90R</td>
+ <td>android-7.0.0_r3</td>
+ <td>Nougat</td>
+ <td>Nexus 5X、Nexus 9 (volantis)、Nexus Player、Pixel C</td>
+ </tr>
+ <tr>
+ <td>NRD90M</td>
+ <td>android-7.0.0_r1</td>
+ <td>Nougat</td>
+ <td>Nexus 5X、Nexus 9 (volantis)、Nexus Player、Pixel C</td>
+ </tr>
+ <tr>
+ <td>MOI10E</td>
+ <td>android-6.0.1_r81</td>
+ <td>Marshmallow</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>MOB31Z</td>
+ <td>android-6.0.1_r80</td>
+ <td>Marshmallow</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>MOB31T</td>
+ <td>android-6.0.1_r79</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>MOB31S</td>
+ <td>android-6.0.1_r78</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>M4B30Z</td>
+ <td>android-6.0.1_r77</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5</td>
+ </tr>
+ <tr>
+ <td>MOB31K</td>
+ <td>android-6.0.1_r74</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>MMB31C</td>
+ <td>android-6.0.1_r73</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>M4B30X</td>
+ <td>android-6.0.1_r72</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5</td>
+ </tr>
+ <tr>
+ <td>MOB31H</td>
+ <td>android-6.0.1_r70</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>MMB30Y</td>
+ <td>android-6.0.1_r69</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>MTC20K</td>
+ <td>android-6.0.1_r67</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5X</td>
+ </tr>
+ <tr>
+ <td>MOB31E</td>
+ <td>android-6.0.1_r66</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5、Nexus 6、Nexus 9 (volantis)</td>
+ </tr>
+ <tr>
+ <td>MMB30W</td>
+ <td>android-6.0.1_r65</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>MXC89L</td>
+ <td>android-6.0.1_r63</td>
+ <td>Marshmallow</td>
+ <td>Pixel C</td>
+ </tr>
+ <tr>
+ <td>MTC20F</td>
+ <td>android-6.0.1_r62</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5X、Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>MOB30Y</td>
+ <td>android-6.0.1_r60</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5</td>
+ </tr>
+ <tr>
+ <td>MOB30X</td>
+ <td>android-6.0.1_r59</td>
+ <td>Marshmallow</td>
+ <td>Nexus 7 (flo/deb)</td>
+ </tr>
+ <tr>
+ <td>MOB30W</td>
+ <td>android-6.0.1_r58</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6、Nexus 9 (volantis/volantisg)、Nexus Player</td>
+ </tr>
+ <tr>
+ <td>MMB30S</td>
+ <td>android-6.0.1_r57</td>
+ <td>Marshmallow</td>
+ <td>Nexus 7 (deb)</td>
+ </tr>
+ <tr>
+ <td>MMB30R</td>
+ <td>android-6.0.1_r56</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>MXC89K</td>
+ <td>android-6.0.1_r55</td>
+ <td>Marshmallow</td>
+ <td>Pixel C</td>
+ </tr>
+ <tr>
+ <td>MTC19Z</td>
+ <td>android-6.0.1_r54</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5X</td>
+ </tr>
+ <tr>
+ <td>MTC19X</td>
+ <td>android-6.0.1_r53</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>MOB30P</td>
+ <td>android-6.0.1_r50</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5、Nexus 7 (flo/deb)、Nexus 9 (volantis/volantisg)、Nexus Player</td>
+ </tr>
+ <tr>
+ <td>MOB30O</td>
+ <td>android-6.0.1_r49</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>MMB30M</td>
+ <td>android-6.0.1_r48</td>
+ <td>Marshmallow</td>
+ <td>Nexus 7 (deb)</td>
+ </tr>
+ <tr>
+ <td>MMB30K</td>
+ <td>android-6.0.1_r47</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>MOB30M</td>
+ <td>android-6.0.1_r46</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5、Nexus 6、Nexus 7 (flo/deb)、Nexus 9 (volantis/volantisg)、Nexus Player</td>
+ </tr>
+ <tr>
+ <td>MTC19V</td>
+ <td>android-6.0.1_r45</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5X、Nexus 6P</td>
+ </tr>
+ <tr>
+ <td>MOB30J</td>
+ <td>android-6.0.1_r43</td>
+ <td>Marshmallow</td>
+ <td>Nexus 7 (flo/deb)</td>
+ </tr>
+ <tr>
+ <td>MOB30I</td>
+ <td>android-6.0.1_r42</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6</td>
+ </tr>
+ <tr>
+ <td>MOB30H</td>
+ <td>android-6.0.1_r41</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5</td>
+ </tr>
+ <tr>
+ <td>MOB30G</td>
+ <td>android-6.0.1_r40</td>
+ <td>Marshmallow</td>
+ <td>Nexus 9 (volantis/volantisg)、Nexus Player</td>
+ </tr>
+ <tr>
+ <td>MXC89H</td>
+ <td>android-6.0.1_r33</td>
+ <td>Marshmallow</td>
+ <td>Pixel C</td>
+ </tr>
+ <tr>
+ <td>MXC89F</td>
+ <td>android-6.0.1_r32</td>
+ <td>Marshmallow</td>
+ <td>Pixel C</td>
+ </tr>
+ <tr>
+ <td>MMB30J</td>
+ <td>android-6.0.1_r28</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6、Nexus 7 (deb)</td>
+ </tr>
+ <tr>
+ <td>MTC19T</td>
+ <td>android-6.0.1_r25</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5X、Nexus 6P</td>
+ </tr>
+<tr>
+ <td>M5C14J</td>
+ <td>android-6.0.1_r31</td>
+ <td>Marshmallow</td>
+ <td>Pixel C</td>
+</tr>
+<tr>
+ <td>MOB30D</td>
+ <td>android-6.0.1_r30</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5、Nexus 6、Nexus 7 (flo/deb)、Nexus 9 (volantis/volantisg)、Nexus Player</td>
+</tr>
+<tr>
+ <td>MHC19Q</td>
+ <td>android-6.0.1_r24</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5X、Nexus 6P</td>
+</tr>
+<tr>
+ <td>MHC19J</td>
+ <td>android-6.0.1_r22</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5X</td>
+</tr>
+<tr>
+ <td>MHC19I</td>
+ <td>android-6.0.1_r21</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6P</td>
+</tr>
+<tr>
+ <td>MMB29X</td>
+ <td>android-6.0.1_r20</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5、Nexus 6、Nexus 7 (deb)、Nexus 9 (volantisg)</td>
+</tr>
+<tr>
+ <td>MXC14G</td>
+ <td>android-6.0.1_r18</td>
+ <td>Marshmallow</td>
+ <td>Pixel C</td>
+</tr>
+<tr>
+ <td>MMB29V</td>
+ <td>android-6.0.1_r17</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5、Nexus 5X、Nexus 6、Nexus 6P、Nexus 7 (flo/deb)、Nexus 9 (volantis/volantisg)</td>
+</tr>
+<tr>
+ <td>MXB48T</td>
+ <td>android-6.0.1_r16</td>
+ <td>Marshmallow</td>
+ <td>Pixel C</td>
+</tr>
+<tr>
+ <td>MMB29U</td>
+ <td>android-6.0.1_r13</td>
+ <td>Marshmallow</td>
+ <td>Nexus Player</td>
+</tr>
+<tr>
+ <td>MMB29R</td>
+ <td>android-6.0.1_r12</td>
+ <td>Marshmallow</td>
+ <td>Nexus 9 (volantis/volantisg)</td>
+</tr>
+<tr>
+ <td>MMB29Q</td>
+ <td>android-6.0.1_r11</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5、Nexus 5X、Nexus 6、Nexus 6P、Nexus 7 (flo/deb)</td>
+</tr>
+<tr>
+ <td>MMB29T</td>
+ <td>android-6.0.1_r10</td>
+ <td>Marshmallow</td>
+ <td>Nexus Player</td>
+</tr>
+<tr>
+ <td>MMB29S</td>
+ <td>android-6.0.1_r9</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5、Nexus 6、Nexus 9 (volantis/volantisg)</td>
+</tr>
+<tr>
+ <td>MMB29P</td>
+ <td>android-6.0.1_r8</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5X、Nexus 6P</td>
+</tr>
+<tr>
+ <td>MMB29O</td>
+ <td>android-6.0.1_r7</td>
+ <td>Marshmallow</td>
+ <td>Nexus 7 (flo/deb)</td>
+</tr>
+<tr>
+ <td>MXB48K</td>
+ <td>android-6.0.1_r5</td>
+ <td>Marshmallow</td>
+ <td>Pixel C</td>
+</tr>
+<tr>
+ <td>MXB48J</td>
+ <td>android-6.0.1_r4</td>
+ <td>Marshmallow</td>
+ <td>Pixel C</td>
+</tr>
+<tr>
+ <td>MMB29M</td>
+ <td>android-6.0.1_r3</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6P、Nexus Player</td>
+</tr>
+<tr>
+ <td>MMB29K</td>
+ <td>android-6.0.1_r1</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5、Nexus 5X、Nexus 6、Nexus 7 (flo/deb)、Nexus 9 (volantis/volantisg)</td>
+</tr>
+<tr>
+ <td>MMB29N</td>
+ <td>android-6.0.0_r41</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6P</td>
+</tr>
+<tr>
+ <td>MDB08M</td>
+ <td>android-6.0.0_r26</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5X、Nexus 6P</td>
+</tr>
+<tr>
+ <td>MDB08L</td>
+ <td>android-6.0.0_r25</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5X、Nexus 6P</td>
+</tr>
+<tr>
+ <td>MDB08K</td>
+ <td>android-6.0.0_r24</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6P</td>
+</tr>
+<tr>
+ <td>MDB08I</td>
+ <td>android-6.0.0_r23</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5X</td>
+</tr>
+<tr>
+ <td>MDA89E</td>
+ <td>android-6.0.0_r12</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5X</td>
+</tr>
+<tr>
+ <td>MDA89D</td>
+ <td>android-6.0.0_r11</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6P</td>
+</tr>
+<tr>
+ <td>MRA59B</td>
+ <td>android-6.0.0_r7</td>
+ <td>Marshmallow</td>
+ <td>Nexus 7 (deb)</td>
+</tr>
+<tr>
+ <td>MRA58X</td>
+ <td>android-6.0.0_r6</td>
+ <td>Marshmallow</td>
+ <td>Nexus 6</td>
+</tr>
+<tr>
+ <td>MRA58V</td>
+ <td>android-6.0.0_r5</td>
+ <td>Marshmallow</td>
+ <td>Nexus 7 (flo/deb)</td>
+</tr>
+<tr>
+ <td>MRA58U</td>
+ <td>android-6.0.0_r4</td>
+ <td>Marshmallow</td>
+ <td>Nexus 7 (flo)</td>
+</tr>
+<tr>
+ <td>MRA58N</td>
+ <td>android-6.0.0_r2</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5、Nexus 6、Nexus 7 (flo/deb)、Nexus 9 (volantis/volantisg)、Nexus Player</td>
+</tr>
+<tr>
+ <td>MRA58K</td>
+ <td>android-6.0.0_r1</td>
+ <td>Marshmallow</td>
+ <td>Nexus 5、Nexus 6、Nexus 7 (flo/deb)、Nexus 9 (volantis/volantisg)、Nexus Player</td>
+</tr>
+<tr>
+ <td>LMY49M</td>
+ <td>android-5.1.1_r38</td>
+ <td>Lollipop</td>
+ <td>Nexus 10</td>
+</tr>
+<tr>
+ <td>LMY49J</td>
+ <td>android-5.1.1_r37</td>
+ <td>Lollipop</td>
+ <td>Nexus 10</td>
+</tr>
+<tr>
+ <td>LMY49I</td>
+ <td>android-5.1.1_r36</td>
+ <td>Lollipop</td>
+ <td>Nexus 10</td>
+</tr>
+<tr>
+ <td>LMY49H</td>
+ <td>android-5.1.1_r35</td>
+ <td>Lollipop</td>
+ <td>Nexus 10</td>
+</tr>
+<tr>
+ <td>LMY49G</td>
+ <td>android-5.1.1_r34</td>
+ <td>Lollipop</td>
+ <td>Nexus 10</td>
+</tr>
+<tr>
+ <td>LMY49F</td>
+ <td>android-5.1.1_r33</td>
+ <td>Lollipop</td>
+ <td>Nexus 9 (volantisg)、Nexus 10</td>
+</tr>
+<tr>
+ <td>LMY48Z</td>
+ <td>android-5.1.1_r30</td>
+ <td>Lollipop</td>
+ <td>Nexus 6、Nexus 7 (deb)、Nexus 9 (volantisg)、Nexus 10</td>
+</tr>
+<tr>
+ <td>LYZ28N</td>
+ <td>android-5.1.1_r28</td>
+ <td>Lollipop</td>
+ <td>Nexus 6(仅面向 T-Mobile)</td>
+</tr>
+<tr>
+ <td>LMY48Y</td>
+ <td>android-5.1.1_r26</td>
+ <td>Lollipop</td>
+ <td>Nexus 6</td>
+</tr>
+<tr>
+ <td>LMY48X</td>
+ <td>android-5.1.1_r25</td>
+ <td>Lollipop</td>
+ <td>Nexus 6、Nexus 7 (deb)、Nexus 9 (volantisg)、Nexus 10</td>
+</tr>
+<tr>
+ <td>LMY48W</td>
+ <td>android-5.1.1_r24</td>
+ <td>Lollipop</td>
+ <td>Nexus 6</td>
+</tr>
+<tr>
+ <td>LVY48H</td>
+ <td>android-5.1.1_r23</td>
+ <td>Lollipop</td>
+ <td>Nexus 6(仅面向 Project Fi)</td>
+</tr>
+<tr>
+ <td>LYZ28M</td>
+ <td>android-5.1.1_r22</td>
+ <td>Lollipop</td>
+ <td>Nexus 6(仅面向 T-Mobile)</td>
+</tr>
+<tr>
+ <td>LMY48U</td>
+ <td>android-5.1.1_r20</td>
+ <td>Lollipop</td>
+ <td>Nexus 7 (deb)</td>
+</tr>
+<tr>
+ <td>LMY48T</td>
+ <td>android-5.1.1_r19</td>
+ <td>Lollipop</td>
+ <td>Nexus 4、Nexus 6、Nexus 9 (volantis/volantisg)、Nexus 10</td>
+</tr>
+<tr>
+ <td>LVY48F</td>
+ <td>android-5.1.1_r18</td>
+ <td>Lollipop</td>
+ <td>Nexus 6(仅面向 Project Fi)</td>
+</tr>
+<tr>
+ <td>LYZ28K</td>
+ <td>android-5.1.1_r17</td>
+ <td>Lollipop</td>
+ <td>Nexus 6(仅面向 T-Mobile)</td>
+</tr>
+<tr>
+ <td>LMY48P</td>
+ <td>android-5.1.1_r16</td>
+ <td>Lollipop</td>
+ <td>Nexus 7 (deb)</td>
+</tr>
+<tr>
+ <td>LMY48N</td>
+ <td>android-5.1.1_r15</td>
+ <td>Lollipop</td>
+ <td>Nexus Player</td>
+</tr>
+<tr>
+ <td>LMY48M</td>
+ <td>android-5.1.1_r14</td>
+ <td>Lollipop</td>
+ <td>Nexus 4、Nexus 5、Nexus 6、Nexus 7 (flo)、Nexus 9 (volantis/volantisg)、Nexus 10</td>
+</tr>
+<tr>
+ <td>LVY48E</td>
+ <td>android-5.1.1_r13</td>
+ <td>Lollipop</td>
+ <td>Nexus 6(仅面向 Project Fi)</td>
+</tr>
+<tr>
+ <td>LYZ28J</td>
+ <td>android-5.1.1_r12</td>
+ <td>Lollipop</td>
+ <td>Nexus 6(仅面向 T-Mobile)</td>
+</tr>
+<tr>
+ <td>LMY48J</td>
+ <td>android-5.1.1_r10</td>
+ <td>Lollipop</td>
+ <td>Nexus Player</td>
+</tr>
+<tr>
+ <td>LMY48I</td>
+ <td>android-5.1.1_r9</td>
+ <td>Lollipop</td>
+ <td>Nexus 4、Nexus 5、Nexus 6、Nexus 7 (flo)、Nexus 9 (volantis/volantisg)、Nexus 10</td>
+</tr>
+<tr>
+ <td>LVY48C</td>
+ <td>android-5.1.1_r8</td>
+ <td>Lollipop</td>
+ <td>Nexus 6(仅面向 Project Fi)</td>
+</tr>
+<tr>
+ <td>LMY48G</td>
+ <td>android-5.1.1_r6</td>
+ <td>Lollipop</td>
+ <td>Nexus 7 (flo)</td>
+</tr>
+<tr>
+ <td>LYZ28E</td>
+ <td>android-5.1.1_r5</td>
+ <td>Lollipop</td>
+ <td>Nexus 6(仅面向 T-Mobile)</td>
+</tr>
+<tr>
+ <td>LMY47Z</td>
+ <td>android-5.1.1_r4</td>
+ <td>Lollipop</td>
+ <td>Nexus 6(面向除 T-Mobile(美国)之外的所有运营商)</td>
+</tr>
+<tr>
+ <td>LMY48B</td>
+ <td>android-5.1.1_r3</td>
+ <td>Lollipop</td>
+ <td>Nexus 5</td>
+</tr>
+<tr>
+ <td>LMY47X</td>
+ <td>android-5.1.1_r2</td>
+ <td>Lollipop</td>
+ <td>Nexus 9 (volantis)</td>
+</tr>
+<tr>
+ <td>LMY47V</td>
+ <td>android-5.1.1_r1</td>
+ <td>Lollipop</td>
+ <td>Nexus 7 (flo/grouper)、Nexus 10、Nexus Player</td>
+</tr>
+<tr>
+ <td>LMY47O</td>
+ <td>android-5.1.0_r5</td>
+ <td>Lollipop</td>
+ <td>Nexus 4、Nexus 7 (flo/deb)</td>
+</tr>
+<tr>
+ <td>LMY47M</td>
+ <td>android-5.1.0_r4</td>
+ <td>Lollipop</td>
+ <td>Nexus 6(仅面向 T-Mobile)</td>
+</tr>
+<tr>
+ <td>LMY47I</td>
+ <td>android-5.1.0_r3</td>
+ <td>Lollipop</td>
+ <td>Nexus 5、Nexus 6</td>
+</tr>
+<tr>
+ <td>LMY47E</td>
+ <td>android-5.1.0_r2</td>
+ <td>Lollipop</td>
+ <td>Nexus 6</td>
+</tr>
+<tr>
+ <td>LMY47D</td>
+ <td>android-5.1.0_r1</td>
+ <td>Lollipop</td>
+ <td>Nexus 5、Nexus 6、Nexus 7 (grouper/tilapia)、Nexus 10、Nexus Player</td>
+</tr>
+<tr>
+ <td>LRX22L</td>
+ <td>android-5.0.2_r3</td>
+ <td>Lollipop</td>
+ <td>Nexus 9 (volantis/volantisg)</td>
+</tr>
+<tr>
+ <td>LRX22G</td>
+ <td>android-5.0.2_r1</td>
+ <td>Lollipop</td>
+ <td>Nexus 7 (flo/deb/grouper/tilapia)、Nexus 10</td>
+</tr>
+<tr>
+ <td>LRX22C</td>
+ <td>android-5.0.1_r1</td>
+ <td>Lollipop</td>
+ <td>Nexus 4、Nexus 5、Nexus 6 (shamu)、Nexus 7 (flo)、Nexus 9 (volantis/volantisg)、Nexus 10</td>
+</tr>
+<tr>
+ <td>LRX21V</td>
+ <td>android-5.0.0_r7.0.1</td>
+ <td>Lollipop</td>
+ <td>Nexus Player (fugu)</td>
+</tr>
+<tr>
+ <td>LRX21T</td>
+ <td>android-5.0.0_r6.0.1</td>
+ <td>Lollipop</td>
+ <td>Nexus 4</td>
+</tr>
+<tr>
+ <td>LRX21R</td>
+ <td>android-5.0.0_r5.1.0.1</td>
+ <td>Lollipop</td>
+ <td>Nexus 9 (volantis)</td>
+</tr>
+<tr>
+ <td>LRX21Q</td>
+ <td>android-5.0.0_r5.0.1</td>
+ <td>Lollipop</td>
+ <td>Nexus 9 (volantis)</td>
+</tr>
+<tr>
+ <td>LRX21P</td>
+ <td>android-5.0.0_r4.0.1</td>
+ <td>Lollipop</td>
+ <td>Nexus 7 (flo/grouper)、Nexus 10</td>
+</tr>
+<tr>
+ <td>LRX21O</td>
+ <td>android-5.0.0_r3.0.1</td>
+ <td>Lollipop</td>
+ <td>Nexus 5 (hammerhead)、Nexus 6 (shamu)</td>
+</tr>
+<tr>
+ <td>LRX21M</td>
+ <td>android-5.0.0_r2.0.1</td>
+ <td>Lollipop</td>
+ <td>Nexus Player (fugu)</td>
+</tr>
+<tr>
+ <td>LRX21L</td>
+ <td>android-5.0.0_r1.0.1</td>
+ <td>Lollipop</td>
+ <td>Nexus 9 (volantis)</td>
+</tr>
+<tr>
+ <td>KTU84Q</td>
+ <td>android-4.4.4_r2</td>
+ <td>KitKat</td>
+ <td>Nexus 5 (hammerhead)(仅面向新西兰的 2Degrees、澳大利亚的 Telstra 和印度)</td>
+</tr>
+<tr>
+ <td>KTU84P</td>
+ <td>android-4.4.4_r1</td>
+ <td>KitKat</td>
+ <td>Nexus 5、Nexus 7 (flo/deb/grouper/tilapia)、Nexus 4、Nexus 10</td>
+</tr>
+<tr>
+ <td>KTU84M</td>
+ <td>android-4.4.3_r1.1</td>
+ <td>KitKat</td>
+ <td>Nexus 5 (hammerhead)</td>
+</tr>
+<tr>
+ <td>KTU84L</td>
+ <td>android-4.4.3_r1</td>
+ <td>KitKat</td>
+ <td>Nexus 7 (flo/deb/grouper/tilapia)、Nexus 4、Nexus 10</td>
+</tr>
+<tr>
+ <td>KVT49L</td>
+ <td>android-4.4.2_r2</td>
+ <td>KitKat</td>
+ <td>Nexus 7 (deb Verizon)</td>
+</tr>
+<tr>
+ <td>KOT49H</td>
+ <td>android-4.4.2_r1</td>
+ <td>KitKat</td>
+ <td>Nexus 5、Nexus 7 (flo/deb/grouper/tilapia)、Nexus 4、Nexus 10</td>
+</tr>
+<tr>
+ <td>KOT49E</td>
+ <td>android-4.4.1_r1</td>
+ <td>KitKat</td>
+ <td>Nexus 5、Nexus 7 (flo/deb/grouper/tilapia)、Nexus 4、Nexus 10</td>
+</tr>
+<tr>
+ <td>KRT16S</td>
+ <td>android-4.4_r1.2</td>
+ <td>KitKat</td>
+ <td>Nexus 7 (flo/deb/grouper/tilapia)、Nexus 4、Nexus 10</td>
+</tr>
+<tr>
+ <td>KRT16M</td>
+ <td>android-4.4_r1</td>
+ <td>KitKat</td>
+ <td>Nexus 5 (hammerhead)</td>
+</tr>
+<tr>
+ <td>JLS36I</td>
+ <td>android-4.3.1_r1</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 7 (deb)</td>
+</tr>
+<tr>
+ <td>JLS36C</td>
+ <td>android-4.3_r3</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 7 (deb)</td>
+</tr>
+<tr>
+ <td>JSS15R</td>
+ <td>android-4.3_r2.3</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 7 (flo)</td>
+</tr>
+<tr>
+ <td>JSS15Q</td>
+ <td>android-4.3_r2.2</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 7 (flo)</td>
+</tr>
+<tr>
+ <td>JSS15J</td>
+ <td>android-4.3_r2.1</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 7 (flo/deb)</td>
+</tr>
+<tr>
+ <td>JSR78D</td>
+ <td>android-4.3_r2</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 7 (deb)</td>
+</tr>
+<tr>
+ <td>JWR66Y</td>
+ <td>android-4.3_r1.1</td>
+ <td>Jelly Bean</td>
+ <td>Galaxy Nexus、Nexus 7 (grouper/tilapia)、Nexus 4、Nexus 10</td>
+</tr>
+<tr>
+ <td>JWR66V</td>
+ <td>android-4.3_r1</td>
+ <td>Jelly Bean</td>
+ <td>Galaxy Nexus、Nexus 7 (grouper/tilapia)、Nexus 4、Nexus 10</td>
+</tr>
+<tr>
+ <td>JWR66N</td>
+ <td>android-4.3_r0.9.1</td>
+ <td>Jelly Bean</td>
+ <td>Galaxy Nexus、Nexus 7 (grouper/tilapia/flo)、Nexus 4、Nexus 10</td>
+</tr>
+<tr>
+ <td>JWR66L</td>
+ <td>android-4.3_r0.9</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 7</td>
+</tr>
+<tr>
+ <td>JDQ39E</td>
+ <td>android-4.2.2_r1.2</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 4</td>
+</tr>
+<tr>
+ <td>JDQ39B</td>
+ <td>android-4.2.2_r1.1</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 7</td>
+</tr>
+<tr>
+ <td>JDQ39</td>
+ <td>android-4.2.2_r1</td>
+ <td>Jelly Bean</td>
+ <td>Galaxy Nexus、Nexus 7、Nexus 4、Nexus 10</td>
+</tr>
+<tr>
+ <td>JOP40G</td>
+ <td>android-4.2.1_r1.2</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 4</td>
+</tr>
+<tr>
+ <td>JOP40F</td>
+ <td>android-4.2.1_r1.1</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 10</td>
+</tr>
+<tr>
+ <td>JOP40D</td>
+ <td>android-4.2.1_r1</td>
+ <td>Jelly Bean</td>
+ <td>Galaxy Nexus、Nexus 7、Nexus 4、Nexus 10</td>
+</tr>
+<tr>
+ <td>JOP40C</td>
+ <td>android-4.2_r1</td>
+ <td>Jelly Bean</td>
+ <td>Galaxy Nexus、Nexus 7、Nexus 4、Nexus 10</td>
+</tr>
+<tr>
+ <td>JZO54M</td>
+ <td>android-4.1.2_r2.1</td>
+ <td>Jelly Bean</td>
+ <td></td>
+</tr>
+<tr>
+ <td>JZO54L</td>
+ <td>android-4.1.2_r2</td>
+ <td>Jelly Bean</td>
+ <td></td>
+</tr>
+<tr>
+ <td>JZO54K</td>
+ <td>android-4.1.2_r1</td>
+ <td>Jelly Bean</td>
+ <td>Nexus S、Galaxy Nexus、Nexus 7</td>
+</tr>
+<tr>
+ <td>JRO03S</td>
+ <td>android-4.1.1_r6.1</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 7</td>
+</tr>
+<tr>
+ <td>JRO03R</td>
+ <td>android-4.1.1_r6</td>
+ <td>Jelly Bean</td>
+ <td>Nexus S 4G</td>
+</tr>
+<tr>
+ <td>JRO03O</td>
+ <td>android-4.1.1_r5</td>
+ <td>Jelly Bean</td>
+ <td>Galaxy Nexus</td>
+</tr>
+<tr>
+ <td>JRO03L</td>
+ <td>android-4.1.1_r4</td>
+ <td>Jelly Bean</td>
+ <td>Nexus S</td>
+</tr>
+<tr>
+ <td>JRO03H</td>
+ <td>android-4.1.1_r3</td>
+ <td>Jelly Bean</td>
+ <td></td>
+</tr>
+<tr>
+ <td>JRO03E</td>
+ <td>android-4.1.1_r2</td>
+ <td>Jelly Bean</td>
+ <td>Nexus S</td>
+</tr>
+<tr>
+ <td>JRO03D</td>
+ <td>android-4.1.1_r1.1</td>
+ <td>Jelly Bean</td>
+ <td>Nexus 7</td>
+</tr>
+<tr>
+ <td>JRO03C</td>
+ <td>android-4.1.1_r1</td>
+ <td>Jelly Bean</td>
+ <td>Galaxy Nexus</td>
+</tr>
+<tr>
+ <td>IMM76L</td>
+ <td>android-4.0.4_r2.1</td>
+ <td>Ice Cream Sandwich</td>
+ <td> </td>
+</tr>
+<tr>
+ <td>IMM76K</td>
+ <td>android-4.0.4_r2</td>
+ <td>Ice Cream Sandwich</td>
+ <td>Galaxy Nexus</td>
+</tr>
+<tr>
+ <td>IMM76I</td>
+ <td>android-4.0.4_r1.2</td>
+ <td>Ice Cream Sandwich</td>
+ <td>Galaxy Nexus</td>
+</tr>
+<tr>
+ <td>IMM76D</td>
+ <td>android-4.0.4_r1.1</td>
+ <td>Ice Cream Sandwich</td>
+ <td>Nexus S、Nexus S 4G、Galaxy Nexus</td>
+</tr>
+<tr>
+ <td>IMM76</td>
+ <td>android-4.0.4_r1</td>
+ <td>Ice Cream Sandwich</td>
+ <td></td>
+</tr>
+<tr>
+ <td>IML77</td>
+ <td>android-4.0.3_r1.1</td>
+ <td>Ice Cream Sandwich</td>
+ <td></td>
+</tr>
+<tr>
+ <td>IML74K</td>
+ <td>android-4.0.3_r1</td>
+ <td>Ice Cream Sandwich</td>
+ <td>Nexus S</td>
+</tr>
+<tr>
+ <td>ICL53F</td>
+ <td>android-4.0.2_r1</td>
+ <td>Ice Cream Sandwich</td>
+ <td>Galaxy Nexus</td>
+</tr>
+<tr>
+ <td>ITL41F</td>
+ <td>android-4.0.1_r1.2</td>
+ <td>Ice Cream Sandwich</td>
+ <td>Galaxy Nexus</td>
+</tr>
+<tr>
+ <td>ITL41D</td>
+ <td>android-4.0.1_r1.1</td>
+ <td>Ice Cream Sandwich</td>
+ <td>Galaxy Nexus</td>
+</tr>
+<tr>
+ <td>ITL41D</td>
+ <td>android-4.0.1_r1</td>
+ <td>Ice Cream Sandwich</td>
+ <td>Galaxy Nexus</td>
+</tr>
+<tr>
+ <td>GWK74</td>
+ <td>android-2.3.7_r1</td>
+ <td>Gingerbread</td>
+ <td>Nexus S 4G</td>
+</tr>
+<tr>
+ <td>GRK39F</td>
+ <td>android-2.3.6_r1</td>
+ <td>Gingerbread</td>
+ <td>Nexus One、Nexus S</td>
+</tr>
+<tr>
+ <td>GRK39C</td>
+ <td>android-2.3.6_r0.9</td>
+ <td>Gingerbread</td>
+ <td>Nexus S</td>
+</tr>
+<tr>
+ <td>GRJ90</td>
+ <td>android-2.3.5_r1</td>
+ <td>Gingerbread</td>
+ <td>Nexus S 4G</td>
+</tr>
+<tr>
+ <td>GRJ22</td>
+ <td>android-2.3.4_r1</td>
+ <td>Gingerbread</td>
+ <td>Nexus One、Nexus S、Nexus S 4G</td>
+</tr>
+<tr>
+ <td>GRJ06D</td>
+ <td>android-2.3.4_r0.9</td>
+ <td>Gingerbread</td>
+ <td>Nexus S 4G</td>
+</tr>
+<tr>
+ <td>GRI54</td>
+ <td>android-2.3.3_r1.1</td>
+ <td>Gingerbread</td>
+ <td>Nexus S</td>
+</tr>
+<tr>
+ <td>GRI40</td>
+ <td>android-2.3.3_r1</td>
+ <td>Gingerbread</td>
+ <td>Nexus One、Nexus S</td>
+</tr>
+<tr>
+ <td>GRH78C</td>
+ <td>android-2.3.2_r1</td>
+ <td>Gingerbread</td>
+ <td>Nexus S</td>
+</tr>
+<tr>
+ <td>GRH78</td>
+ <td>android-2.3.1_r1</td>
+ <td>Gingerbread</td>
+ <td>Nexus S</td>
+</tr>
+<tr>
+ <td>GRH55</td>
+ <td>android-2.3_r1</td>
+ <td>Gingerbread</td>
+ <td>使用 Gingerbread 最早期版本的设备、Nexus S</td>
+</tr>
+<tr>
+ <td>FRK76C</td>
+ <td>android-2.2.3_r2</td>
+ <td>Froyo</td>
+ <td> </td>
+</tr>
+<tr>
+ <td>FRK76</td>
+ <td>android-2.2.3_r1</td>
+ <td>Froyo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>FRG83G</td>
+ <td>android-2.2.2_r1</td>
+ <td>Froyo</td>
+ <td>Nexus One</td>
+</tr>
+<tr>
+ <td>FRG83D</td>
+ <td>android-2.2.1_r2</td>
+ <td>Froyo</td>
+ <td>Nexus One</td>
+</tr>
+<tr>
+ <td>FRG83</td>
+ <td>android-2.2.1_r1</td>
+ <td>Froyo</td>
+ <td>Nexus One</td>
+</tr>
+<tr>
+ <td>FRG22D</td>
+ <td>android-2.2_r1.3</td>
+ <td>Froyo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>FRG01B</td>
+ <td>android-2.2_r1.2</td>
+ <td>Froyo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>FRF91</td>
+ <td>android-2.2_r1.1</td>
+ <td>Froyo</td>
+ <td>Nexus One</td>
+</tr>
+<tr>
+ <td>FRF85B</td>
+ <td>android-2.2_r1</td>
+ <td>Froyo</td>
+ <td>Nexus One</td>
+</tr>
+<tr>
+ <td>EPF21B</td>
+ <td>android-2.1_r2.1p2</td>
+ <td>Eclair</td>
+ <td> </td>
+</tr>
+<tr>
+ <td>ESE81</td>
+ <td>android-2.1_r2.1s</td>
+ <td>Eclair</td>
+ <td></td>
+</tr>
+<tr>
+ <td>EPE54B</td>
+ <td>android-2.1_r2.1p</td>
+ <td>Eclair</td>
+ <td>Nexus One</td>
+</tr>
+<tr>
+ <td>ERE27</td>
+ <td>android-2.1_r2</td>
+ <td>Eclair</td>
+ <td>Nexus One</td>
+</tr>
+<tr>
+ <td>ERD79</td>
+ <td>android-2.1_r1</td>
+ <td>Eclair</td>
+ <td>Nexus One</td>
+</tr>
+<tr>
+ <td>ESD56</td>
+ <td>android-2.0.1_r1</td>
+ <td>Eclair</td>
+ <td></td>
+</tr>
+<tr>
+ <td>ESD20</td>
+ <td>android-2.0_r1</td>
+ <td>Eclair</td>
+ <td> </td>
+</tr>
+<tr>
+ <td>DMD64</td>
+ <td>android-1.6_r1.5</td>
+ <td>Donut</td>
+ <td> </td>
+</tr>
+<tr>
+ <td>DRD20</td>
+ <td>android-1.6_r1.4</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>DRD08</td>
+ <td>android-1.6_r1.3</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>DRC92</td>
+ <td>android-1.6_r1.2</td>
+ <td></td>
+ <td></td>
+</tr>
+</tbody>
+</table>
+
+<p>froyo、gingerbread、ics-mr0、ics-mr1、jb-dev、jb-mr1-dev、jb-mr1.1-dev、jb-mr2-dev 和 kitkat-dev 等分支代表与经过 Google 测试的配置不完全一致的开发分支。因此,除官方命名的版本之外,这些分支可能还包含尚未经过全面测试的各种更改。</p>
+
+<p>要区分各个版本,您可以运行以下命令并指定两个分支标记,以获取与每个项目相关联的更改列表:</p>
+
+<pre class="devsite-terminal devsite-click-to-copy">
+repo forall -pc 'git log --no-merges --oneline branch-1..branch-2'
+</pre>
+
+<p>例如:</p>
+
+<pre class="devsite-terminal devsite-click-to-copy">
+repo forall -pc 'git log --no-merges --oneline android-4.4.2_r2..android-4.4.2_r1'
+</pre>
+
+<p>要将输出发送到文本文件,请运行以下命令:</p>
+
+<pre class="devsite-terminal devsite-click-to-copy">
+ repo forall -pc 'git log --no-merges --oneline android-4.4.2_r2..android-4.4.2_r1' &gt; /tmp/android-4.4.2_r2-android-4.4.2_r1-diff.txt
+</pre>
+
+<h2 id="honeycomb-gpl-modules">Honeycomb GPL 模块</h2>
+
+<p>Honeycomb 的整个平台源代码未对外公开。不过,遵循 GPL 和 LGPL 许可的某些 Honeycomb 模块已对外公开,对应于如下的标记:</p>
+
+<table>
+<thead>
+<tr>
+<th>细分版本</th>
+<th>标记</th>
+<th>备注</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>HRI39</td>
+<td>android-3.0_r1</td>
+<td>Honeycomb 最早期版本</td>
+</tr>
+<tr>
+<td>HRI66</td>
+<td>android-3.0_r1.1</td>
+<td></td>
+</tr>
+<tr>
+<td>HWI69</td>
+<td>android-3.0_r1.2</td>
+<td></td>
+</tr>
+<tr>
+<td>HRI83</td>
+<td>android-3.0_r1.3</td>
+<td></td>
+</tr>
+<tr>
+<td>HMJ37</td>
+<td>android-3.1_r1</td>
+<td></td>
+</tr>
+<tr>
+<td>HTJ85B</td>
+<td>android-3.2_r1</td>
+<td></td>
+</tr>
+<tr>
+<td>HTK55D</td>
+<td>android-3.2.1_r1</td>
+<td></td>
+</tr>
+<tr>
+<td>HTK75D</td>
+<td>android-3.2.1_r2</td>
+<td></td>
+</tr>
+<tr>
+<td>HLK75C</td>
+<td>android-3.2.2_r1</td>
+<td></td>
+</tr>
+<tr>
+<td>HLK75D</td>
+<td>android-3.2.2_r2</td>
+<td></td>
+</tr>
+<tr>
+<td>HLK75F</td>
+<td>android-3.2.4_r1</td>
+<td></td>
+</tr>
+<tr>
+<td>HLK75H</td>
+<td>android-3.2.6_r1</td>
+<td>Honeycomb 的最新版本</td>
+</tr>
+</tbody>
+</table>
+
+<p>我们未提供刚好包含以上模块的清单。不过,有些清单允许构建这些组件。以下命令适用于 3.0_r1.1:</p>
+
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">repo init -b master -m base-for-3.0-gpl.xml</code>
+<code class="devsite-terminal">repo sync</code>
+<code class="devsite-terminal">repo forall -c git checkout android-3.0_r1.1</code>
+</pre>
+
+<p>要使用其他版本,请切换 <code>git checkout</code> 参数,还可以在必要时切换 <code>repo init</code> 中的 <code>-m</code> 参数。对于非 GPL 项目,<code>git checkout</code> 命令会返回错误,因为它找不到相应的标记。</p>
+
+</ul></body></html> \ No newline at end of file
diff --git a/zh-cn/setup/start/codelines.html b/zh-cn/setup/start/codelines.html
new file mode 100644
index 00000000..df2c3520
--- /dev/null
+++ b/zh-cn/setup/start/codelines.html
@@ -0,0 +1,106 @@
+<html devsite><head>
+ <title>代码流水线、分支和版本</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>
+Android 开源项目 (AOSP) 维护着一个全面的软件堆栈,OEM 和其他设备实现者可移植并在自己的硬件上运行该堆栈。为了维持 Android 项目的质量,Google 分派了全职工程师、产品经理、界面设计师、质量保证测试人员以及更多相关人员(将新型设备推向市场所需的所有其他角色)来负责相关工作。
+</p>
+
+<p>
+相应地,我们还维护着多个代码流水线,以便明确区分当前稳定版 Android 与不稳定的实验性版本。我们将 Android 代码流水线的开放源代码管理和维护工作纳入到了更大的产品开发周期中。
+</p>
+
+<h2 id="aosp-management">AOSP 代码管理</h2>
+<p>
+下图描述了 AOSP 代码管理和版本背后的概念。
+</p>
+
+<img src="/images/code-lines.png" alt="代码流水线示意图" id="figure1"/>
+<figcaption><strong>图 1</strong> AOSP 代码和版本</figcaption>
+
+<ol>
+ <li>
+ 在任何特定时刻,Android 平台都有一个当前最新版本。该版本通常作为树中的一个分支。
+ </li>
+ <li>
+ 设备制造商和贡献者会以当前最新版本为基础来修复错误、发布新设备、试验新功能等。
+ </li>
+ <li>
+ 与此同时,Google 会根据产品的需求和目标,在内部开发下一版 Android 平台和框架。开发下一版 Android 时,我们会与设备合作伙伴协作,在旗舰设备上推出新版 Android,旗舰设备的规格经过深思熟虑,旨在推动 Android 朝着我们希望的方向发展。
+ </li>
+ <li>
+ 当第 n+1 版准备就绪时,它就会发布到公开源代码树,成为新的最新版本。
+ </li>
+</ol>
+
+<aside class="note"><strong>注意</strong>:我们使用“代码流水线”而不是“分支”,只是因为在任何特定时刻,特定“代码流水线”可能有多个分支。<em></em><em></em>例如,当某个版本定型时,它可能会(也可能不会)根据当前需要变为新的分支。
+</aside>
+
+<h2 id="terms-and-caveats">术语和注意事项</h2>
+
+<ul>
+ <li>
+ 一个版本对应一个正式版 Android 平台,如 1.5、2.1 等等。<em></em>一个平台版本对应于 <code>AndroidManifest.xml</code> 文件的 <code>SdkVersion</code> 字段中的版本(如源代码树的 <code>frameworks/base/api</code> 中所定义)。
+ </li>
+ <li>
+ 上游项目是指 Android 堆栈从中提取代码的开源项目。<em></em>除了 Linux 内核和 WebKit 等项目以外,我们会继续引入一些半自主性 Android 项目(如 ART、Android SDK 工具、Bionic 等)作为上游项目进行开发。一般情况下,这些项目完全是在公开树中开发的。对于某些上游项目,开发是通过直接为上游项目本身做贡献来完成的。有关详情,请参阅<a href="../contribute/submit-patches.html#upstream-projects">上游项目</a>。在这两种情况下,快照会定期纳入版本中。
+ </li>
+ <li>
+ 在任何时候,版本代码流水线(实际上可能由 Git 中的多个真实存在的分支组成)都被视为给定 Android 平台版本的唯一规范源代码。OEM 和开发设备的其他组织应该仅从版本分支中提取源代码。
+ </li>
+ <li>
+ 实验性代码流水线是为了收集社区带来的更改,从而在保持稳定性的基础上反复进行改进。
+ </li>
+ <li>
+ 被认定为稳定的更改最终会提取到版本分支中。这仅适用于错误修复、应用改进和不影响平台 API 的其他更改。
+ </li>
+ <li>
+ 在必要时,更改将从上游项目(包括 Android 上游项目)提取到版本分支中。
+ </li>
+ <li>
+ 第 n+1 版(即框架和平台 API 的下一个重大版本)由 Google 在内部开发而成。有关详情,请参阅<a href="#private-codelines">不公开代码流水线</a>。
+ </li>
+ <li>
+ 在必要时,更改将从上游、版本和实验性分支提取到 Google 的不公开分支。
+ </li>
+ <li>
+ 当下一版本的平台 API 已经稳定并经过全面测试后,Google 会针对下一版平台定型一个版本(特别是新的 <code>SdkVersion</code>)。这个版本将对应于作为公开版本分支的内部代码流水线和新的当前平台代码流水线。
+ </li>
+ <li>
+ 当某个新的平台版本定型时,Google 会同时创建相应的实验性代码流水线。
+ </li>
+</ul>
+
+<h2 id="private-codelines">不公开代码流水线</h2>
+<p>
+上述源代码管理策略谈到了 Google 会维护一个不公开的代码流水线,以将注意力集中在 Android 的当前公开版本上。
+</p>
+<p>
+OEM 和其他设备制造商自然希望发布搭载最新版 Android 的设备。同样,如非必要,应用开发者也不希望处理更多个平台版本。与此同时,Google 要负责把握 Android 作为平台和产品的战略方向。我们的做法侧重于在少量旗舰设备上推进功能的演化,同时确保与 Android 相关的知识产权得到妥善保护。
+</p>
+<p>
+如此一来,Google 经常掌握来自第三方的机密信息;在确保采取适当的保护措施之前,我们必须避免泄露敏感功能。此外,同时存在太多平台版本会给平台带来真正的风险。考虑到这些因素,我们构建了开源项目(包含第三方贡献的内容),以专注于目前公开的稳定版 Android。下一版平台的深度开发将会私下进行,直到一切就绪,最终成为正式版本。
+</p>
+<p>
+我们意识到,许多贡献者不同意这种做法,我们也尊重他们的不同观点。不过,这是我们认为的最佳方式,我们也选择以这种方式实现 Android。
+</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/start/faqs.html b/zh-cn/setup/start/faqs.html
new file mode 100644
index 00000000..e81e68c4
--- /dev/null
+++ b/zh-cn/setup/start/faqs.html
@@ -0,0 +1,166 @@
+<html devsite><head>
+ <title>常见问题解答</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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.
+ -->
+
+<a name="top"></a>
+<p>
+本页提供了常见问题解答 (FAQ)。有关其他常见问题的解答,请参阅 developer.android.com 上的 <a href="http://developer.android.com/guide/faq/index.html" class="external">Android 常见问题解答</a>。
+</p>
+
+<h2 id="open-source">开放源代码</h2>
+
+<h3 id="what-is-the-android-open-source-project">Android 开源项目是什么?</h3>
+<p>我们使用“Android 开源项目”或“AOSP”来表示 Android 涉及的人员、流程和源代码。</p>
+<p>人员负责监督该项目并开发实际的源代码。流程指我们为了管理该软件的开发而使用的工具和程序。该项目的最终结果是您可以用来打造手机和其他设备的源代码。</p>
+
+<h3 id="why-did-we-open-the-android-source-code">我们为什么开放了 Android 源代码?</h3>
+<p>根据我们自己在开发移动应用方面的经验,Google 启动了 Android 项目。我们希望确保始终有开放的平台可供运营商、原始设备制造商 (OEM) 和开发者使用,以便他们将创新的想法变为现实。我们还希望确保不存在任何集中瓶颈,这样的话,就没有任何行业参与者可以一手限制或控制任何其他参与者开展创新。Android 开源项目 (AOSP) 有一个最重要的目标,就是确保尽可能广泛、兼容地实现 Android 开放源代码软件,使每个人都能从中受益。</p>
+
+<h3 id="what-kind-of-open-source-project-is-android">Android 是哪种开源项目?</h3>
+<p>Google 负责监督 Android 开放源代码平台核心部分的开发工作,并致力于打造卓越的开发者和用户社区。在大多数情况下,Android 源代码都是根据宽松的 Apache Software License 2.0(而非“Copyleft”许可)授权用户使用。这主要是因为我们最重要的目标是让用户广泛采用该软件,而我们认为 ASL2.0 许可有助于最好地实现这一目标。有关详情,请参阅<a href="licenses.html">许可</a>。</p>
+
+<h3 id="why-is-google-in-charge-of-android">为什么由 Google 主管 Android 项目?</h3>
+<p>开发软件平台是一项非常复杂的工作。开放性对于平台的长远成功至关重要,这是因为要吸引开发者投入到其中并确保公平的竞争环境,开放性必不可少。不过,平台本身也必须是对用户极具吸引力的产品。</p>
+<p>正是因为这个原因,Google 调配了必需的专业工程资源,以确保 Android 是具备充分竞争力的软件平台。Google 将 Android 项目视为一个全方位的产品开发运营项目,并致力于达成必要的业务交易,以确保运行 Android 的卓越设备能够确确实实地将其推向市场。</p>
+<p>通过确保 Android 在用户那里获得成功,我们可以帮助确保 Android 作为平台和开放源代码项目的活力。毕竟,谁不希望 Android 源代码成为一款成功的产品呢?</p>
+<p>Google 的目标是确保围绕 Android 打造一个成功的生态系统。当然,没有哪个人必须参与其中。我们开放了 Android 源代码,以便任何人都可以修改和分发该软件来满足自己的需求。</p>
+
+<h3 id="what-is-googles-overall-strategy-for-android-product-development">Google 在 Android 产品开发方面的总体策略是什么?</h3>
+<p>我们致力于向竞争激烈的市场推出卓越的设备。有鉴于此,我们会将开发的创新技术和增强功能纳入到下一版本的核心平台中。</p>
+<p>在实践中,这意味着 Android 工程团队通常只侧重于少数“旗舰”设备,并负责开发下一版 Android 软件来为这些产品的发布提供支持。这些旗舰设备可以消化很多产品风险,并为广泛的原始设备制造商 (OEM) 社区开辟新的道路,让他们接下来能够推出更多充分利用新功能的设备。通过这种方式,我们可以确保 Android 平台能够根据现实设备的实际需求不断发展完善。</p>
+
+<h3 id="how-is-the-android-software-developed">Android 软件的开发方式是怎样的?</h3>
+<p>Android 的每个平台版本(例如 1.5、1.6 等)在开放源代码树中都有对应的分支。在任何指定的时刻,最新的此类分支将被视为“当前稳定”的分支版本。这个当前稳定的分支是制造商移植到其设备的分支。该分支会始终保持适合发布的状态。</p>
+<p>同时,每个版本还有一个“当前实验性”分支,开发者可以在其中开发实验性贡献内容,例如大型的下一代功能。在适当情况下,实验性分支中的错误更正内容和其他贡献内容可以纳入到当前稳定分支中。</p>
+<p>最后,Google 会在开发旗舰设备的同时致力于开发下一版 Android 平台。在适当情况下,该分支将纳入实验性分支和稳定分支中的更改。</p>
+<p>有关详情,请参阅<a href="codelines.html">代码流水线、分支和版本</a>。</p>
+
+<h3 id="why-are-parts-of-android-developed-in-private">为什么 Android 的部分代码是在私下开发的?</h3>
+<p>将一款设备推向市场通常需要超过一年的时间。设备制造商无疑希望尽可能搭载最新的 Android 软件。与此同时,开发者也不希望在编写应用时还要不断追用该平台的新版本。制造商和开发者都会面临及时推出自家产品与追用最新版本难以两全的状况。</p>
+<p>为了解决这个问题,下一版 Android 的部分内容(包括核心平台 API)会在私有分支中进行开发。这些 API 将纳入到下一版 Android 中。我们的目标是,在我们开发下一版平台的同时,让其他人将注意力放在当前稳定版 Android 源代码上。这样一来,开发者和原始设备制造商 (OEM) 便可以使用单个版本,而无需为了跟上 Android 开发步伐而追用尚不完善的未来版本。不过,Android 系统中与应用兼容性无关的其他部分是在开放环境中开发的。我们打算逐渐将其中更多的部分转移到开放的开发环境中。</p>
+
+<h3 id="when-are-source-code-releases-made">何时发布源代码?</h3>
+<p>当源代码准备就绪时发布。发布源代码是一个相当复杂的过程。Android 的某些部分是在开放环境中开发的,因此相应的源代码始终可用。还有一些部分最初是在私有树中开发的,并且相应的源代码会在下一个平台版本准备就绪时发布。</p>
+<p>对于某些版本,核心平台 API 会提前足够长的时间准备就绪。这种情况下,我们就可以在设备发布之前推出源代码,以便提前了解反馈情况。不过,对于另外一些版本,我们无法做到这一点。在所有情况下,当我们认为相应版本已足够稳定并且开发流程允许时,我们就会发布平台源代码。</p>
+
+<h3 id="what-is-involved-in-releasing-the-source-code-for-a-new-android-version">发布新版 Android 的源代码涉及哪些流程?</h3>
+<p>发布新版 Android 平台的源代码是一个非常重要的过程。首先,该软件要移植到设备的系统映像中,并通过各种形式的认证,包括手机销售区域的政府监管机构认证。另外,该软件还需要通过运营商测试。这是发布过程的一个重要阶段,因为这项测试有助于发现大量的软件错误。</p>
+<p>在发布事宜得到监管机构和运营商的批准后,制造商将开始大批量生产设备,并且我们将着手发布源代码。</p>
+<p>在制造商大批量生产设备的同时,Google 团队将开始为发布开放源代码做一些准备工作。这些准备工作包括进行最终的 API 更改、更新文档(例如,反映在合格性测试期间进行的任何修改)、为新版本准备 SDK,以及发布平台兼容性信息。</p>
+<p>此外,准备工作还包括一项最终法定签核程序,以同意将代码发布到开放源代码中。正如开放源代码贡献者需要签署《贡献者许可协议》来证明其拥有所贡献内容的知识产权一样,Google 也必须证明自己在做贡献。</p>
+<p>从制造商开始大批量生产设备算起,软件发布过程通常需要大约一个月的时间。这样一来,源代码的发布时间与设备到达用户手中的时间通常差不多。</p>
+
+<h3 id="how-does-the-aosp-relate-to-the-android-compatibility-program">AOSP 与 Android 兼容性计划有何关联?</h3>
+<p>Android 开源项目旨在维护 Android 软件以及开发新版本。由于是开放源代码,因此该软件可用于任何用途,包括开发与基于同一源代码的其他设备不兼容的设备。</p>
+<p>Android 兼容性计划旨在为 Android 制定与开发者编写的第三方应用兼容的基准实现方式。“与 Android 兼容”的设备可以参与 Android 生态系统,包括 Google Play;不符合兼容性要求的设备将无法参与该生态系统。</p>
+<p>也就是说,Android 兼容性计划规定了我们如何区分“与 Android 兼容的设备”与只是运行 Android 源代码衍生品的设备。我们欢迎各种 Android 源代码使用方式,但只有与 Android 兼容的设备(符合 Android 兼容性计划的定义并通过该计划的测试)才可以参与 Android 生态系统。</p>
+
+<h3 id="how-can-i-contribute-to-android">如何为 Android 做贡献?</h3>
+<p>您可以通过多种方式为 Android 做贡献。您可以报告错误、编写适用于 Android 平台的应用,或者为 Android 开放源代码项目贡献源代码。</p>
+<p>关于我们愿意或能够接受哪些类型的代码贡献内容,有一些限制。例如,有人可能想要贡献备选应用 API,比如完全基于 C++ 的环境。我们会拒绝这种贡献内容,因为 Android 鼓励开发在 ART 运行时中运行的应用。同样,我们也不会接受与我们的许可目标不符的贡献内容(例如 GPL 或 LGPL 库)。</p>
+<p>如果您有意贡献源代码,我们建议您在开始任何相关工作前先通过 <a href="../community.html">Android 社区</a>页面中列出的方式与我们联系。有关详情,请参阅<a href="../contribute/index.html">做出贡献</a>。</p>
+
+<h3 id="how-do-i-become-an-android-committer">如何成为 Android 代码提交者?</h3>
+<p>Android 开源项目其实并没有“提交者”这一概念。所有贡献内容(包括由 Google 员工创作的内容)都是通过一个称为“Gerrit”的基于网页的系统提交的,该系统是 Android 工程流程的一部分。该系统与 Git 源代码管理系统协同工作,以便明晰地管理源代码贡献内容。</p>
+<p>提交之后,相应更改需要获得指定审批者的批准。审批者通常是 Google 员工,但这些审批者还要负责所有提交内容,不论其来源为何。</p>
+<p>有关详情,请参阅<a href="../contribute/submit-patches.html">提交补丁程序</a>。</p>
+
+<a href="#top">返回页首</a>
+
+<h2 id="compatibility">兼容性</h2>
+
+<h3 id="what-does-compatibility-mean">“兼容性”是什么意思?</h3>
+<p>我们将“与 Android 兼容的设备”定义为可以运行由第三方开发者使用 Android SDK 和 NDK 编写的任何应用的设备。我们将此作为过滤条件来区分可以参与和无法参与 Android 应用生态系统的设备。与 Android 妥善兼容的设备可以申请使用 Android 商标。不兼容的设备只不过是 Android 源代码的衍生产品,不能使用 Android 商标。</p>
+<p>也就是说,兼容性是参与 Android 应用生态系统的前提条件。我们欢迎任何人使用 Android 源代码。但如果设备与 Android 不兼容,则不会被视为 Android 生态系统的一部分。</p>
+
+<h3 id="what-is-the-role-of-google-play-in-compatibility">Google Play 在兼容性方面发挥什么作用?</h3>
+<p>与 Android 兼容的设备可以申请 Google Play 客户端软件使用许可。获得该许可后,这些设备便成为了 Android 应用生态系统的一部分,其用户将能够从所有与 Android 兼容的设备共享的目录中下载开发者的应用。与 Android 不兼容的设备无法获得该许可。</p>
+
+<h3 id="what-kinds-of-devices-can-be-android-compatible">哪些类型的设备可与 Android 兼容?</h3>
+<p>Android 软件可以移植到许多不同类型的设备上,包括第三方应用无法在其中正常运行的某些设备。<a href="/compatibility/index.html">Android 兼容性定义文档</a> (CDD) 中详细说明了将被视为与 Android 兼容的具体设备配置。</p>
+<p>例如,虽然可以将 Android 源代码移植到没有摄像头的手机上,但兼容性定义文档要求所有手机都要有摄像头。该要求使得开发者在编写应用时可以采用一系列一致的功能。</p>
+<p>兼容性定义文档将会不时进行修订,以反映市场实际情况。例如,1.6 版兼容性定义文档仅支持手机。但 2.1 版兼容性定义文档允许设备不包含电话硬件,这使得平板式音乐播放器等非手机设备也可以是兼容的设备。在修订兼容性定义文档的同时,我们还将改进 Google Play,以便开发者可以控制在哪些地区提供其应用。让我们继续以电话为例,某个用于管理短信的应用在媒体播放器上并没有什么用处,因此 Google Play 允许开发者将该应用限制为专用于手机设备。</p>
+
+<h3 id="if-my-device-is-compatible-does-it-automatically-have-access-to-google-play-and-branding">如果我的设备与 Android 兼容,它是否会自动获得 Google Play 和品牌标识的使用权限?</h3>
+<p>Google Play 是由 Google 运营的服务。实现兼容性是获得 Google Play 软件和品牌标识使用权限的前提条件。设备制造商应填写<a href="/compatibility/contact-us#for-business-inquiries">申请 Google 移动服务许可</a>中提供的联系表单,以获得 Google Play 使用权限。如果我们可以为您提供帮助,将会与您联系。</p>
+
+<h3 id="if-i-am-not-a-manufacturer-how-can-i-get-google-play">如果我不是制造商,如何获得 Google Play 使用权限?</h3>
+<p>我们只会向在设备中搭载 Android 的手机制造商授予 Google Play 使用许可。如有关于具体情况方面的问题,请发送电子邮件至 <a href="mailto:android-partnerships@google.com">android-partnerships@google.com</a> 与我们联系。
+</p>
+
+<h3 id="how-can-i-get-access-to-the-google-apps-for-android-such-as-maps">如何获得 Android 版 Google 应用(例如 Google 地图)的使用权限?</h3>
+<p>Android 版 Google 应用(例如 YouTube、Google 地图、Gmail 等)属于 Google 产品和服务,并不是 Android 的一部分,需要单独授予许可。如有关于这些应用方面的问题,请发送电子邮件至 <a href="mailto:android-partnerships@google.com">android-partnerships@google.com</a> 与我们联系。</p>
+
+<h3 id="is-compatibility-mandatory">兼容性是否为强制要求?</h3>
+<p>不是,您可以自行选择是否参与 Android 兼容性计划。由于 Android 源代码是开放源代码,因此任何人都可以使用它来打造任何类型的设备。不过,如果制造商希望在其产品中使用 Android 名称,或希望获得 Google Play 使用权限,则必须要先证明其设备与 Android 兼容。</p>
+
+<h3 id="how-much-does-compatibility-certification-cost">兼容性认证的费用是多少?</h3>
+<p>设备的 Android 兼容性认证无需任何费用。兼容性测试套件为开放源代码,可供任何人用于设备测试。</p>
+
+<h3 id="how-long-does-compatibility-take">兼容性认证需要多长时间?</h3>
+<p>该过程是自动进行的。兼容性测试套件会生成一份报告,您可以将该报告提供给 Google 来证明兼容性。我们计划将来提供一些用于将这些报告上传到公共数据库的自助服务工具。</p>
+
+<h3 id="who-determines-what-will-be-part-of-the-compatibility-definition">谁负责决定兼容性定义的内容?</h3>
+<p>由于 Google 负责把握 Android 作为平台和产品的总体发展方向,因此 Google 会为每个版本维护兼容性定义文档。在为 Android 新版本起草兼容性定义文档时,我们会咨询各种 OEM,他们将为该文档的内容提供建议。</p>
+
+<h3 id="how-long-will-each-android-version-be-supported-for-new-devices">各 Android 版本可用于开发新设备的时间有多长?</h3>
+<p>由于 Android 的代码为开放源代码,因此我们无法阻止任何人使用旧版本来推出设备。不过,Google 将不会授予在被视为已过时的版本上使用 Google Play 客户端软件的许可。这样一来,虽然任何人都可以继续搭载旧版 Android,但这些设备将不能使用 Android 名称,并且无法参与 Android 应用生态系统,这同设备与 Android 不兼容的情况类似。</p>
+
+<h3 id="can-a-device-have-a-different-user-interface-and-still-be-compatible">设备是否可以采用不同的界面但仍保持与 Android 兼容?</h3>
+<p>Android 兼容性计划旨在决定设备是否可以运行第三方应用。设备附带的界面组件(例如主屏幕、拨号器、配色方案等)一般对第三方应用的影响不大。因此,设备制造商可以根据自己的喜好随意定制界面。兼容性定义文档确实规定了 OEM 可在多大程度内更改系统界面中会影响第三方应用的区域。</p>
+
+<h3 id="when-are-compatibility-definitions-released-for-new-android-versions">何时发布 Android 新版本的兼容性定义?</h3>
+<p>我们的目标是,一旦相应的 Android 平台版本已足够成型,允许发布新版 Android 兼容性定义文档,我们就会发布。虽然我们无法在植入相应 Android 软件的首款旗舰设备之前发布该软件版本的兼容性定义文档终稿,但我们一定会在这一首款设备之后发布兼容性定义文档终稿。不过,只要实际可行,我们就会提供兼容性定义文档的草稿版本。</p>
+
+<h3 id="how-are-device-manufacturers-compatibility-claims-validated">如何验证设备制造商的兼容性声明?</h3>
+<p>我们并没有针对 Android 设备兼容性的验证流程。不过,如果设备要添加 Google Play,Google 通常会先验证设备的兼容性,设备通过验证后,才会同意为其授予 Google Play 客户端软件使用许可。</p>
+
+<h3 id="what-happens-if-a-device-that-claims-compatibility-is-later-found-to-have-compatibility-problems">如果之后发现声称兼容的设备存在兼容性问题,会怎样?</h3>
+<p>通常情况下,Google 与 Google Play 被许可人之间保持着良好的关系,这使得我们可以要求他们发布经过更新的系统映像以解决相关问题。</p>
+
+<a href="#top">返回页首</a>
+
+<h2 id="compatibility-test-suite">兼容性测试套件</h2>
+
+<h3 id="what-is-the-purpose-of-the-cts">兼容性测试套件的用途是什么?</h3>
+<p>兼容性测试套件是一种工具,设备制造商可以借助该工具来确保其设备与 Android 兼容,以及报告测试结果供 Google 验证。OEM 应在整个工程流程中频繁运行兼容性测试套件,以便尽早发现兼容性问题。</p>
+
+<h3 id="what-kinds-of-things-does-the-cts-test">兼容性测试套件会测试哪些类型的项目?</h3>
+<p>目前,兼容性测试套件会测试所有受支持的 Android 强类型 API 是否存在以及行为是否正常。此外,它还会测试其他非 API 系统行为,例如应用生命周期和性能。我们计划在未来的兼容性测试套件版本中扩大支持范围,以便同时测试 Intent 等“软”API。</p>
+
+<h3 id="will-the-cts-reports-be-made-public">兼容性测试套件报告会公开吗?</h3>
+<p>会。虽然目前尚未实现,但 Google 打算为原始设备制造商 (OEM) 提供基于网络的自助服务工具来发布兼容性测试套件报告,以供任何人查看。制造商可在任意范围内分享兼容性测试套件报告。</p>
+
+<h3 id="how-is-the-cts-licensed">兼容性测试套件采用哪种许可方式?</h3>
+<p>兼容性测试套件是根据大部分 Android 代码使用的 Apache Software License 2.0 授权用户使用。</p>
+
+<h3 id="does-the-cts-accept-contributions">兼容性测试套件接受贡献内容吗?</h3>
+<p>接受,而且非常欢迎!Android 开放源代码项目接受贡献内容,以便采用与任何其他组件相同的方式来改进兼容性测试套件。事实上,提高兼容性测试套件测试案例的覆盖范围和质量是协助 Android 的最佳方式之一。</p>
+
+<h3 id="can-anyone-use-the-cts-on-existing-devices">任何人都可以在现有设备上使用兼容性测试套件吗?</h3>
+<p>兼容性定义文档要求与 Android 兼容的设备实现 <code>adb</code> 调试实用工具。这意味着,任何与 Android 兼容的设备(包括零售的设备)都必须能够运行兼容性测试套件测试。</p>
+
+<h3 id="are-codecs-verified">编解码器需要通过兼容性测试套件验证吗?</h3>
+<p>需要。所有必需的编解码器都要通过兼容性测试套件验证。</p>
+
+<a href="#top">返回页首</a>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/start/licenses.html b/zh-cn/setup/start/licenses.html
new file mode 100644
index 00000000..497ad6ce
--- /dev/null
+++ b/zh-cn/setup/start/licenses.html
@@ -0,0 +1,62 @@
+<html devsite><head>
+ <title>内容许可</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>
+在 Android 开源项目 (AOSP) 中,我们的软件使用<a href="http://www.opensource.org/" class="external">开放源代码促进会</a>批准的一些开放源代码许可。
+</p>
+<h2 id="android-open-source-project-license">AOSP 许可</h2>
+<p>
+AOSP 的首选许可是 <a href="http://www.apache.org/licenses/LICENSE-2.0" class="external">Apache Software License 2.0 版</a>(“Apache 2.0”),Android 软件的大部分内容都是根据 Apache 2.0 授权用户使用。尽管该项目尽可能遵循此首选许可,但也可能存在将根据具体情况处理的例外情况。例如,与系统使用的许可不同,Linux 内核补丁程序使用的是 GPLv2 许可,您可以在 <a href="http://www.kernel.org/pub/linux/kernel/COPYING" class="external">kernel.org</a> 上找到相关信息。
+</p>
+<h2 id="contributor-license-grants">贡献者许可协议</h2>
+<p><em></em>为 AOSP 提供想法、代码或文档的所有个人贡献者(即仅以个人名义做贡献的贡献者)都需要填写、签署并提交《<a href="https://cla.developers.google.com/about/google-individual" class="external">个人贡献者许可协议</a>》。该协议可通过<a href="https://android-review.googlesource.com/#/settings/agreements" class="external">代码审核工具</a>在线签署。该协议明确规定了他们为 AOSP 贡献知识产权内容时遵循的条款。该许可既是为了保护贡献者,也是为了保护该项目;它不会影响贡献者将贡献内容用于任何其他用途的权利。
+</p>
+<p><em></em>对于已指派员工参与 AOSP 的企业(或其他实体),则需要签署《<a href="https://cla.developers.google.com/about/google-corporate" class="external">企业贡献者许可协议</a>》。该版本的协议中规定,企业可以对其指派的员工提交的贡献内容进行授权,并可以授予版权和专利许可。签署《企业贡献者许可协议》并不意味着任何开发者无需再以个人名义签署《个人贡献者许可协议》。所有开发者都必须签署个人协议,以涵盖他们贡献的任何不归签署《企业贡献者许可协议》的企业所有的内容。<em></em>
+</p>
+<p>我们的协议是根据 <a href="http://www.apache.org">Apache 软件基金会</a>所用的协议(可在 <a href="http://www.apache.org/licenses/" class="external">Apache 网站</a>上找到)制定的。
+</p>
+<h2 id="why-apache-software-license">为什么使用 Apache Software License?</h2>
+<p>
+有时候,有人会问我们,为什么 Apache Software License 2.0 是 Android 的首选许可。对于用户空间(非内核)软件,相比其他许可(例如 LGPL),我们更倾向于 ASL2.0(以及 BSD、MIT 等类似许可)。</p>
+<p>
+Android 的宗旨是自由和选择。Android 旨在促进移动世界的开放性,我们不认为我们能够预测出或规定用户希望将我们的软件应用到的所有用途。因此,虽然我们鼓励每个人打造开放且可修改的设备,但我们并不认为我们有权利强制他们这样做。使用 LGPL 库则往往会强制他们这样做。
+</p>
+<p>
+以下是我们关心的一些具体问题:
+</p>
+<ul>
+ <li>
+LGPL(简化条款形式)要求:将源代码植入到应用中;书面提供源代码;或者动态关联 LGPL-ed 库,并允许用户手动升级或替换该库。由于 Android 软件通常是以静态系统映像的形式植入的,因此遵守这些要求将会限制 OEM 的设计。(例如,用户很难在只读闪存中替换库。)
+ </li>
+ <li>
+LGPL 要求允许用户进行修改,并要求允许用户进行逆向工程以便调试这些修改。大多数设备制造商都不希望受到这些条款的约束。因此,为了尽量减轻这些公司的负担,我们会最大限度地减少在用户空间中使用 LGPL 软件。
+ </li>
+
+ <li>
+过去,LGPL 库是下游设备制造商和应用开发者面临的大量合规问题的根源。遗憾的是,就这些问题对工程师提供指导非常困难而且进展缓慢。设备制造商能够尽可能轻松地遵守许可对于 Android 的成功至关重要。鉴于过去在遵守 LGPL 方面遇到的困难,最明智的做法就是,如果我们能够避免使用 LGPL 库,便不使用它们。
+ </li>
+</ul>
+<p>
+上面讨论的问题是我们为自己的代码首选 ASL2.0 的原因。它们并不是批判 LGPL 或其他许可。我们非常热衷于这一主题,甚至不厌其烦地想方设法确保尽可能多的代码根据 ASL2.0 授权用户使用。不过,我们喜欢各种免费的开放源代码许可,并尊重其他人的意见和偏好。我们只是认定 ASL2.0 是适合我们目标的许可而已。
+</p>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/start/roles.html b/zh-cn/setup/start/roles.html
new file mode 100644
index 00000000..fe2f6cae
--- /dev/null
+++ b/zh-cn/setup/start/roles.html
@@ -0,0 +1,80 @@
+<html devsite><head>
+ <title>项目角色</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>
+Android 开源项目 (AOSP) 涉及担任各种角色的人员。Google 负责 Android 产品管理以及核心框架和平台的工程流程;不过,该项目要考虑所有来源的贡献,而不仅仅只是 Google 的贡献。本页介绍了有兴趣者可以担任的各种角色。
+</p>
+<p>
+任何有兴趣探索 Android 以及有兴趣为 Android 做贡献的人都可以使用 AOSP 资源。任何人都可以加入论坛、提问、贡献补丁程序、报告错误、查看贡献者提交的补丁程序,以及使用相关工具。要开始开展 Android 代码方面的工作,请参阅<a href="../contribute/index.html">贡献</a>。
+</p>
+
+<h2 id="contributor">贡献者</h2>
+<p>
+“贡献者”是指为 AOSP 源代码做贡献的人,包括 Google 或其他公司的员工,以及以个人名义为 Android 做贡献的个人开发者。Google 聘请的贡献者与其他贡献者并无差别;所有工程师都使用相同的工具(Git、Repo 和 Gerrit),遵循相同的代码审核流程,并遵守相同的代码样式要求,等等。
+</p>
+
+<h2 id="developer">开发者</h2>
+<p>
+“开发者”是指编写在 Android 设备上运行的应用的工程师。开发者与贡献者要具备的技能通常并没有太大差异。但 AOSP 使用“开发者”将使用该平台的工程师与为该平台做贡献的工程师区分开来。开发者(以及用户)是贡献者打造的 Android 平台的“客户”。因此,我们经常会提到开发者,尽管从技术层面来讲,其本质上并不是 AOSP 中的一个单独角色。
+</p>
+
+<h2 id="verifier">验证者</h2>
+<p>
+“验证者”负责测试更改请求。当有人向该项目提交了大量高质量代码后,项目负责人可能会邀请他们成为验证者。
+</p>
+<aside class="note"><strong>注意</strong>:目前,验证者的角色与审批者类似。</aside>
+
+<h2 id="approver">审批者</h2>
+<p>
+“审批者”是该项目中经验丰富的成员,他们展现出了出色的设计技能,并为该项目做出了重大的技术贡献。在代码审核流程中,审批者会决定是纳入还是排除某项更改。项目负责人(通常是 Google 员工)负责选择审批者,有时也会将曾在特定项目中展现出杰出专业技能的验证者晋升为审批者。
+</p>
+
+<h2 id="project-leads">项目负责人</h2>
+<p>
+Android 包含许多子项目;您可以在 Git 代码库中看到这些作为单个 .git 文件存在的子项目。“项目负责人”是资深贡献者,负责监督单个 Android 项目的工程工作。这些项目负责人通常是 Google 员工。各个项目的负责人负责以下事项:</p>
+<ul>
+ <li>
+主导项目的所有技术事宜,包括项目路线图、开发、发布周期、版本管理和质量保证 (QA)。
+ </li><li>
+确保项目及时通过 QA 测试,不耽误预定的 Android 平台发布。
+ </li>
+ <li>
+为贡献者提交的补丁程序指定验证者和审批者。
+ </li>
+ <li>
+在审核更改时保持客观公正。根据技术价值以及是否符合 Android 策略来接受或拒绝补丁程序。
+ </li>
+ <li>
+及时审核更改,并在更改未被接受时尽最大努力与相关人员进行沟通。<p></p>
+ </li>
+ <li>
+视需要维护一个项目网站,以便提供针对该项目的信息和文档。
+ </li>
+ <li>
+担任解决技术冲突的调解者。
+ </li>
+ <li>
+担任项目的公开负责人以及项目相关问题的联系人。
+ </li>
+</ul>
+
+</body></html> \ No newline at end of file
diff --git a/zh-cn/setup/start/site-updates.html b/zh-cn/setup/start/site-updates.html
new file mode 100644
index 00000000..32798b2c
--- /dev/null
+++ b/zh-cn/setup/start/site-updates.html
@@ -0,0 +1,476 @@
+<html devsite><head>
+ <title>网站更新</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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>
+本页介绍了我们对 source.android.com 进行的重大修订。要查看我们对本网站所做更改的完整列表,请参阅 Android 开源项目 (AOSP) <a href="https://android.googlesource.com/platform/docs/source.android.com/+log/master?pretty=full&no-merges" class="external">docs/source.android.com 日志</a>。
+</p>
+
+<h2 id="Dec-2017">2017 年 12 月</h2>
+<p>
+Android 8.1 已发布!要了解此版本中引入的主要平台功能,请参阅以下条目。
+</p>
+
+<h3 id="aaudio">AAudio 和 MMAP</h3>
+<p>
+AAudio 是一种具有增强功能的音频 API,可在与支持 MMAP 的 HAL 和驱动程序结合使用时缩短延迟时间。请参阅 <a href="/devices/audio/aaudio">AAudio 和 MMAP</a> 文档,了解需要进行哪些硬件抽象层 (HAL) 及驱动程序方面的更改,才能在 Android 中支持 AAudio 的 MMAP 功能。
+</p>
+
+<h3 id="art-config">ART 配置更改</h3>
+<p>
+在 Android 8.1 中,我们从 Android Runtime (ART) 中移除了 <code>WITH_DEXPREOPT_BOOT_IMG_ONLY</code> Makefile 选项,并将其替换为 <code>WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY</code> 选项(该选项可以预先优化系统服务器 JAR 以及启动相关的类路径)。有关弃用通知,请参阅<a href="/devices/tech/dalvik/configure#build_options">配置 ART</a>。
+</p>
+
+<h3 id="biometric-unlock">生物识别解锁模式安全性衡量方式</h3>
+<p>
+Android 8.1 引入了以下两项与生物识别解锁相关的新指标,旨在帮助设备制造商更准确地评估设备安全性:冒名接受率 (IAR) 和欺骗接受率 (SAR)。要了解示例攻击和测试方法,请参阅<a href="/security/biometric/">衡量生物识别解锁模式的安全性</a>。
+</p>
+
+<h3 id="boot-times">启动时间优化</h3>
+<p>
+从 Android 8.1 开始,您可以停用 UFS 和 CPU 调节器等组件的节电设置,以便缩短设备启动时间。请参阅<a href="/devices/tech/perf/boot-times#disable-power-saving">优化启动时间</a>,以了解新的 <code>init.*.rc</code> 设置。
+</p>
+
+<h3 id="“color-mgmt”">颜色管理</h3>
+<p>
+Android 8.1 新增了对颜色管理功能的支持,此功能可用于在采用不同显示技术的设备间提供一致的体验。在 Android 8.1 上运行的应用可以获得广色域显示屏的所有功能,以便充分利用显示设备。有关如何实现、自定义及测试此功能的说明,请参阅<a href="/devices/tech/display/color-mgmt">颜色管理</a>。
+</p>
+
+<h3 id="opengl-config">OpenGLRenderer 配置简化</h3>
+<p>
+在 Android 8.1 及更高版本中,只有 <code>ro.zygote.disable_gl_preload
+ property</code> 仍适用于 OpenGLRenderer 配置。所有其他属性均已移除。要了解相关通知及之前支持的属性,请参阅 <a href="/devices/graphics/renderer">OpenGLRenderer 配置</a>。
+</p>
+
+<h3 id="retail-mode">零售演示模式得到简化</h3>
+<p>
+通过设备政策管理器,Android 8.1 支持借助演示类型用户角色在零售店展示设备功能。有关实现说明,请参阅<a href="/devices/tech/display/retail-mode.html">零售演示模式</a>。
+</p>
+
+<h3 id="textclassifier">TEXTCLASSIFIER</h3>
+<p>
+Android 8.1 引入了 TextClassfier API,该 API 使用机器学习技术来协助开发者对文本进行分类。有关实现说明,请参阅 <a href="/devices/tech/display/textclassifier.html">TEXTCLASSIFIER</a>。
+</p>
+
+<h3 id="timezone-rules">时区规则</h3>
+<p>
+Android 8.1 为 OEM 提供了一种新机制:无需进行系统更新就可以将更新的时区规则数据推送到设备中。借助此机制,用户能够及时获得更新,OEM 也能够独立于系统映像更新来测试时区更新。有关如何应用这些更新的说明,请参阅<a href="/devices/tech/config/timezone-rules">时区规则</a>。
+</p>
+
+<h3 id="wifi-aware">WLAN 感知</h3>
+<p>
+Android 8.1 中的 WLAN 感知功能支持多个设备直接通过 WLAN 进行互连(无需连接到互联网或移动网络)。此功能支持在断开网络的情况下,在可信设备和应用之间轻松共享高吞吐量数据。有关示例、源文件及指向其他文档的链接,请参阅 <a href="/devices/tech/connect/wifi-aware">WLAN 感知</a>。
+</p>
+
+<h2 id="Nov-2017">2017 年 11 月</h2>
+<p>
+<em></em>“源代码”部分已更名为<a href="/setup"><em>设置</em></a>。我们设置了重定向,以确保旧网址仍可正常运行。
+</p>
+
+<h2 id="Sept-2017">2017 年 9 月</h2>
+<p>
+本网站已在中国发布,网址为:<a href="https://source.android.google.cn" class="external-link">source.android.google.cn</a>。此外,所有非参考资料也都已翻译为简体中文,方便用户使用。
+</p>
+
+<h2 id="August-2017">2017 年 8 月</h2>
+<p>
+Android 8.0 已发布!本部分介绍了 Android 8.0 平台中的主要新功能。
+</p>
+<h3 id="architecture">架构</h3>
+<h4>Treble</h4>
+<p>
+Android 8.0 支持 Treble,这是 Android 操作系统框架在架构方面的一项重大改变,旨在让制造商以更低的成本更轻松、更快速地将设备更新到新版 Android 系统。文档中详细介绍了 <a href="/devices/architecture/hidl/index.html">HAL 接口定义语言 (HIDL)</a>、全新的 <a href="/devices/architecture/configstore/index.html">ConfigStore HAL</a>、<a href="/devices/architecture/dto/index.html">设备树叠加层</a>、<a href="/devices/architecture/vndk/index.html">供应商原生开发套件 (VNDK)</a>、<a href="/devices/architecture/vintf/index.html">供应商接口对象 (VINTF)</a>、<a href="/devices/architecture/kernel/modular-kernels.html">模块化内核要求</a>以及<a href="/devices/tech/vts/index.html">供应商测试套件 (VTS) 和基础架构</a>。
+</p>
+
+<h4>FunctionFS 支持</h4>
+<p>
+ <a class="external-link" href="https://www.kernel.org/doc/Documentation/usb/functionfs.txt">FunctionFS</a> (FFS) 是一个通过用户空间进行设计和控制的 USB gadget 函数。提供对该函数的支持后,所有特定于函数和协议的代码都将存在于用户空间中,而所有 USB 传输代码则存在于内核中。使用 FFS 可将媒体传输协议 (MTP) 实现移至用户空间。
+</p>
+<p>
+在框架方面,大部分主要变化都发生在 MtpServer 中。USB 驱动程序接口已被重构为两个不同的类:一个类使用旧的内核驱动程序,另一个类使用 FFS。然后,MtpServer 可以使用该驱动程序接口,而无需了解实现的细节。服务器启动时,FFS 驱动程序会将 USB 描述符写入文件;然后,它会将数据写入端点文件(类似于内核驱动程序使用方式)。
+</p>
+
+<h4>用于 LLDB/C++ 调试的内核增强功能</h4>
+<p>
+Android 8.0 版本包含一些内核增强功能,这些功能可改善开发者的调试体验,有助于开发者开发出更好的应用。如需更多信息,请参阅<a href="/devices/architecture/kernel/lldb-debug.html">实现用于 LLDB/C++ 调试的内核增强功能</a>。
+</p>
+
+<h4>内核加固</h4>
+<p>
+已将内核加固功能和工具放入上游,以便发现内核驱动程序中的错误。如需更多信息,请参阅<a href="/devices/architecture/kernel/hardening.html">内核加固</a>。
+</p>
+
+<h4>在内核级别优化 SquashFS</h4>
+<p>
+SquashFS 是一个面向 Linux 且经过压缩的只读文件系统,适合在系统分区上使用。该文档中描述的优化功能有助于提高 SquashFS 的性能。如需更多信息,请参阅<a href="/devices/architecture/kernel/squashfs.html">在内核级别优化 SquashFS</a>。
+</p>
+
+<h3 id="art-dalvik">ART 和 Dalvik</h3>
+
+<h4>模糊测试</h4>
+<p>
+AOSP 提供了用于测试 <a href="/devices/tech/dalvik/">Android Runtime (ART)</a> 基础架构的全新模糊测试套件。全新的工具包 JFuzz 以及经过改进的 DexFuzz 现在可以直接在 AOSP 中获得,并且随附了相关文档。请参阅:<a href="https://android.googlesource.com/platform/art/+/master/tools/jfuzz/README.md">https://android.googlesource.com/platform/art/+/master/tools/jfuzz/README.md</a>
+<a href="https://android.googlesource.com/platform/art/+/master/tools/dexfuzz/README">https://android.googlesource.com/platform/art/+/master/tools/dexfuzz/README</a>
+</p>
+<p>
+无需执行任何操作,即可实现或使用这些新工具。必要时您可以对这些工具进行更改,就像您可以更改运行时/编译器一样。
+</p>
+
+<h4>VDEX 文件:提升系统更新性能</h4>
+<p>
+VDEX 文件有助于提升软件更新的性能和用户体验。VDEX 文件会存储包含验证程序依赖项且经过预验证的 DEX 文件,以便 ART 在系统更新期间无需再次解压和验证 DEX 文件。无需执行任何操作,即可实现该功能。该功能默认处于启用状态。要停用该功能,请将 <code>ART_ENABLE_VDEX</code> 环境变量设为 <code>false</code>。
+</p>
+
+<h4>ART 性能改进</h4>
+<p>
+ 在 Android 8.0 版本中,Android Runtime (ART) 有了极大改进。该文档总结了设备制造商可以在 ART 中获得的增强功能。如需更多信息,请参阅<a href="/devices/tech/dalvik/improvements.html">提升 Android 8.0 中的 ART 性能</a>。
+</p>
+
+<h4>Android A/B OTA 更新</h4>
+<p>
+该更新解答了设备制造商经常遇到的 Android A/B(无缝)系统更新问题。如需更多信息,请参阅 A/B 更新<a href="/devices/tech/ota/ab/ab_faqs.html">常见问题解答</a>。
+</p>
+
+<h3 id="automotive">车载</h3>
+
+<h4>蓝牙连接管理</h4>
+<p>
+Android 8.0 在车载信息娱乐系统中提供了蓝牙连接管理功能,可实现更顺畅的蓝牙用户体验。如需更多信息,请参阅<a href="/devices/automotive/ivi_connectivity.html#bluetooth-connection-management">蓝牙连接管理</a>。
+</p>
+
+<h4>蓝牙多设备 HFP</h4>
+<p>
+借助蓝牙多设备连接功能,用户可以将多台设备连接到 Android Automotive IVI 蓝牙中的电话配置文件。如需更多信息,请参阅 <a href="/devices/automotive/ivi_connectivity.html#bluetooth-multi-device-connectivity">IVI 连接</a>。
+</p>
+
+<h4>车载相机 HAL</h4>
+<p>
+介绍了外景系统 (EVS) 堆栈的设计,并提供了可获取和呈现车载相机数据的 HAL 规范。如需更多信息,请参阅<a href="/devices/automotive/camera-hal.html">外景系统 (EVS) 车载相机 HAL</a>。
+</p>
+
+<h3 id="bluetooth">蓝牙</h3>
+<p>
+请参阅更新后的<a href="/devices/bluetooth/index.html">蓝牙概览</a>。
+</p>
+
+<h4>验证和调试蓝牙</h4>
+<p>
+有关如何验证和调试原生蓝牙堆栈的详细信息,请参阅<a href="/devices/bluetooth/verifying_debugging.html">验证和调试</a>。
+</p>
+
+<h4>蓝牙服务</h4>
+<p>
+蓝牙提供了多种协助实现跨设备核心服务的功能,如音频流式传输、接打电话和收发短信。如需关于 Android 蓝牙服务的更多信息,请参阅<a href="/devices/bluetooth/services.html">蓝牙服务</a>。
+</p>
+
+<h4>BLE 广播</h4>
+<p>
+蓝牙 5 支持不同的蓝牙低功耗数据广播模式,包括更高的带宽或更大的范围。如需更多信息,请参阅<a href="/devices/bluetooth/ble_advertising.html">蓝牙低功耗广播</a>。
+</p>
+
+<h4>音频编解码器的蓝牙支持</h4>
+<p>
+Android 8.0 版本支持蓝牙高清音频编解码器。如需更多信息,请参阅<a href="/devices/bluetooth/services.html#advanced-audio-codecs">高级音频编解码器</a>。
+</p>
+<h3 id="camera">相机</h3>
+<h4>主要相机功能</h4>
+<p>
+Android 8.0 版本中包含对相机服务的以下主要增强功能:共享 surface、多个 surface 可共用相同的 OutputConfiguration System API 以实现自定义相机模式,以及 onCaptureQueueEmpty。如需更多信息,请参阅<a href="/devices/camera/versioning.html">相机版本支持</a>。
+</p>
+
+<h3 id="configuration">配置</h3>
+
+<h4>Ambient 权能</h4>
+<p>
+借助此类权能,Linux 进程可以舍弃大多数类似于 root 的权限,同时保留执行其功能所需的权限。Ambient 权能允许系统服务在其 <code>.rc</code> 文件中配置各项权能,从而将所有配置放入单个文件中。如需更多信息,请参阅<a href="/devices/tech/config/ambient.html">实现 Ambient 权能</a>。
+</p>
+
+<h4>特许权限白名单要求</h4>
+<p>
+从 Android 8.0 开始,必须将所有特权应用显式加入到 <code>/etc/permissions</code> 目录下的系统配置 XML 文件的白名单中。如果不这样做,虽然设备可以启动,但设备实现将无法通过 CTS。如需更多信息,请参阅<a href="/devices/tech/config/perms-whitelist.html">特许权限白名单要求</a>。
+</p>
+
+<h4>实现 USB HAL</h4>
+<p>
+Android 8.0 版本将 USB 命令的处理从 init 脚本移至了原生 USB 守护进程,以实现更好的配置和代码可靠性。如需更多信息,请参阅<a href="/devices/tech/config/usb-hal.html">实现 USB HAL</a>。
+</p>
+
+<h3 id="connectivity">网络连接</h3>
+
+<h4>为流量已用完的用户自定义设备行为</h4>
+<p>
+流量已用完的 Android 设备允许网络流量通过,但需要运营商和电信服务商来实现缓解协议。该功能实现了一个通用解决方案,使运营商和电信服务商能够在设备用完流量时发出提示。如需更多信息,请参阅<a href="/devices/tech/connect/oob-users.html">为流量已用完的用户自定义设备行为</a>。
+</p>
+
+<h3 id="debugging">调试</h3>
+
+<h4>在 Android 编译系统中启用排错程序</h4>
+<p>
+排错程序是基于编译器的工具组件,在开发和测试期间使用,旨在发现错误和改进 Android。Android 目前的一系列排错程序可以发现和诊断内存滥用错误以及可能存在危险的未定义行为。如需更多信息,请参阅<a href="/devices/tech/debug/sanitizers.html">在 Android 编译系统中启用排错程序</a>。
+</p>
+
+<h4>恢复陷入重新启动循环的设备</h4>
+<p>
+Android 8.0 中包含一项能够在发现核心系统组件陷入崩溃循环时派出“救援队”(Rescure Party) 的功能。然后,Rescue Party 会采取一系列措施来上报相关情况,以恢复设备。如需更多信息,请参阅 <a href="/devices/tech/debug/rescue-party.html">Rescue Party</a>。
+</p>
+
+<h4>Storaged</h4>
+<p>
+Android 8.0 添加了对 <code>storaged</code>(一个 Android 本机守护进程,可在 Android 设备上收集和发布存储指标)的支持。如需更多信息,请参阅<a href="/devices/tech/debug/storaged.html">实现 Storaged</a>。
+</p>
+
+<h3 id="display">显示</h3>
+
+<h4>针对悬浮窗口的 Air Traffic Control</h4>
+<p>
+Android 8.0 引入了针对悬浮窗口的 Air Traffic Control,以简化和统一应用的叠加显示方式。AOSP 中包含使用该功能所需的所有内容。</p>
+<p>
+借助 Air Traffic Control,开发者可以为应用创建全新的(受管理)悬浮层/窗口类型,以用于在其他应用之前显示窗口。该功能会为所有使用悬浮层的应用显示持续性通知,以便用户管理此类提醒窗口。
+</p>
+<p>
+Android 兼容性测试套件 (CTS) 可以确认:
+</p>
+<ul>
+ <li>当前提醒窗口类型为:<code>TYPE_PHONE</code>、<code>TYPE_PRIORITY_PHONE</code>、<code>TYPE_SYSTEM_ALERT</code>、<code>TYPE_SYSTEM_OVERLAY</code> 或 <code>TYPE_SYSTEM_ERROR</code>
+ </li>
+ <li>目标为 Android 8.0 SDK 的应用无法使用上述窗口类型在其他应用之前显示窗口。它们需要使用新窗口类型 <code>TYPE_APPLICATION_OVERLAY</code>。
+ </li>
+ <li>目标为较低版本 SDK 的应用仍然可以使用目前的窗口类型;不过,这些窗口在 Z 轴上将排在新的 <code>TYPE_APPLICATION_OVERLAY</code> 窗口之后。
+ </li>
+ <li>系统可以在新层中移动或调整窗口大小,以减少杂乱现象。
+ </li>
+ <li>设备制造商必须保留通知,以便用户控制哪个应用显示在其他应用之前。
+ </li>
+</ul>
+
+<h4>在辅助显示屏上启动 Activity</h4>
+<p>
+所有人都可以使用虚拟显示屏,无需任何特殊硬件。任何应用都可以创建虚拟显示屏实例;在 Android 8.0 版本中,如果关联的功能已启用,则可以在相应虚拟显示屏上启动 Activity。
+</p>
+<p>
+要支持多显示屏功能,您应使用现有受支持的辅助设备连接方式之一,或编译新硬件。在 Nexus 和 Pixel 设备上连接显示屏的受支持的方式包括 Google Cast 和<a href="https://developer.android.com/reference/android/hardware/display/VirtualDisplay.html" class="external">应用内虚拟显示屏</a>。是否支持其他方式取决于每种具体情况下(如 MHL 或 DisplayPort over USB-C)的内核驱动程序支持,以及完全实现 HardwareComposer HAL(<code>IComposerCallback.hal</code> 和 <code>IComposerClient.hal</code>)中与显示屏相关的接口定义。
+</p>
+<p>
+每种方式都可能需要 SoC 或 OEM 支持。例如,要启用 DisplayPort over USB-C,则同时需要硬件 (SOC) 和软件(驱动程序)支持。您可能需要为硬件实现驱动程序,才能支持连接外接显示器。
+</p>
+<p>
+默认实现将允许在辅助显示屏上启动各项 Activity 的全屏堆叠。您可以自定义辅助显示屏上的堆叠、系统界面和行为。
+</p>
+<h4>对通用提示的支持</h4>
+<p>
+Android 8.0 允许开发者为按钮及其他图标上的鼠标悬停行为提供描述性操作名称及其他实用信息。设备制造商可以设计弹出式提示的样式。其布局在 <code>android/frameworks/base/core/res/res/layout/tooltip.xml</code> 中定义。
+
+</p>
+<p>
+OEM 可以替换该布局或更改其尺寸和样式参数。请仅使用文字,并使尺寸在合理的范围内尽可能小。该功能完全在 View 类中实现,且有一些相当详尽的 CTS 测试可用于检查提示行为的很多方面。
+</p>
+<p>
+
+</p><h4>对扩展宽高比的支持</h4>
+<p>
+Android 8.0 包含一个新的清单属性 <a href="https://developer.android.com/reference/android/R.attr.html#maxAspectRatio" class="external">maxAspectRatio</a>,该属性可让 Activity 或应用指定其支持的最大宽高比。maxAspectRatio 将之前的元数据标记替换成一个顶级 API,并让设备可支持大于 16:9 的宽高比。
+</p>
+<ul>
+ <li>如果 Activity 或应用的<a href="https://developer.android.com/guide/topics/ui/multi-window.html#configuring" class="external">大小可调整</a>,则允许 Activity 填充屏幕。
+ </li><li>
+如果 Activity 或应用的大小不可调整,或者平台会强制调整 Activity 的大小,则允许应用窗口根据 <a href="https://developer.android.com/reference/android/R.attr.html#maxAspectRatio" class="external">maxAspectRatio</a> 值,以不超过此值的宽高比显示。
+ <ul>
+ <li>对于在搭载 Android 8.0 的设备上运行的应用,默认值为当前设备的宽高比。</li>
+ <li>对于在搭载较低版本 Android 的设备上运行的应用,默认值为 16:9。</li>
+ </ul>
+ </li>
+</ul>
+
+<h4>实现自适应图标</h4>
+<p>
+如果开发者仅提供一个图标素材资源,自适应图标的形状在设备内会保持一致,但在设备之间会有所差异。此外,图标支持两个图层(前景和背景),以实现动画效果,为用户提供愉悦的视觉体验。如需更多信息,请参阅<a href="/devices/tech/display/adaptive-icons.html">实现自适应图标</a>。
+</p>
+
+<h4>夜间模式</h4>
+<p>
+Android 7.0.1 中引入了夜间模式,该模式允许用户降低其屏幕发出的蓝光量。Android 8.0 使用户可以更好地控制夜间模式的强度。如需更多信息,请参阅<a href="/devices/tech/display/night-light.html">实现夜间模式</a>。
+</p>
+
+<h4>画中画</h4>
+<p>
+Android 8.0 支持在 Android 手持设备上使用画中画 (PIP) 功能。借助画中画功能,用户可以将有正在进行的活动(如视频)的应用调整到一个小窗口中。如需更多信息,请参阅 <a href="/devices/tech/display/pip.html">Android 手机上的画中画</a>。
+</p>
+
+<h4>改进分屏交互</h4>
+<p>
+多窗口模式使用户设备的屏幕上可以同时显示多个应用。Android 8.0 改进了默认模式(分屏),当用户在进入分屏模式后点按主屏幕时,会压缩顶部窗格并调整启动器的大小。如需更多信息,请参阅<a href="/devices/tech/display/split-screen.html">改进分屏交互</a>。
+</p>
+
+<h4>添加微件/快捷方式</h4>
+<p>
+Android 8.0 中的一个新 API 使应用开发者可以从应用内添加快捷方式和微件,而不必依靠微件面板。出于安全考虑,以前通过发送广播添加快捷方式的方法已被弃用。如需更多信息,请参阅<a href="/devices/tech/display/widgets-shortcuts.html">实现添加微件/快捷方式</a>。
+</p>
+
+<h3 id="downloading-building">下载和编译</h3>
+
+<h4>Android LLVM 工具链改进</h4>
+<p>
+希望使用我们的最新工具链/工具的 OEM 必须确保其私有代码可以通过更新后的工具链成功编译。这可能需要他们修复其代码中存在的与未定义行为相关的问题。(当然,他们也可以随意使用喜欢的任何工具来编译自己的代码。)
+</p>
+<p>
+他们必须确保自己的代码不含未定义的行为(通过使用 UBSan 等工具),以使之不易受到新工具链带来的问题的影响。所有工具链都始终在 AOSP 中直接更新。远远在 OC 发布之前,所有功能便都已可用,因此 OEM 应已遵循相关规定。
+</p>
+<p>
+如需常规说明,请参阅<a href="https://llvm.org/" class="external">公开的 Clang/LLVM</a> 文档;如需 Android 专属指南,请参阅 AOSP 中的 <a href="https://android.googlesource.com/platform/external/clang/+/dev/ReadmeAndroid.md" class="external">Android Clang/LLVM</a> 文档集。最后,请加入 <a href="https://groups.google.com/forum/#!forum/android-llvm">android-llvm</a> 公开论坛,以获取帮助和参与开发。
+</p>
+
+<h3 id="drm-kms">DRM/KMS</h3>
+
+<h4>Linux 内核版本 4.9 中的 DRM/KMS</h4>
+<p>
+Android 使用的 Direct Rendering Manager (DRM)/Kernel Mode Setting (KMS) 框架由 Linux 内核开发者在 Linux 内核中开发和维护。Android 从 Linux 内核向下合并。如果从我们的通用内核向下合并,设备制造商可以自动获得 DRM/KMS 框架。
+</p>
+<p>
+DRM/KMS 在 Linux 内核版本 4.9 中开始可用,Android <strong>强烈建议</strong> OEM 合作伙伴从这个内核版本开始使用 DRM/KMS。
+ 4.9 及更高版本的通用 Android 内核将不再支持 <a href="https://lwn.net/Articles/565422/" class="external">Atomic Display Framework (ADF)</a>(Android 目前官方支持的显示框架);从 4.9 版开始,Android 将支持 DRM/KMS。OEM 可以继续使用 ADF(或任何其他框架),但 Android 在通用 Android 内核中将不再为其提供支持。
+</p>
+<p>
+要实现 DRM/KMS,除了从 Android 通用内核向下合并 DRM/KMS 框架之外,您还需要使用 DRM/KMS 编写自己的驱动程序。
+</p>
+
+<h3 id="keystore">密钥存储区</h3>
+
+<h4>Keymaster 3</h4>
+<p>
+Android 8.0 更新了 Keymaster(密钥存储区 HAL):扩展了 Android 设备上硬件支持的密钥存储区的功能。这基于 Android 7.1.2 对 Keymaster 2 的更新。如需更多信息,请参阅 <a href="/security/keystore/index.html">Keymaster 3 文档</a>。
+</p>
+
+<h3 id="security-enhancements">安全增强功能</h3>
+
+<h4>从 HttpsURLConnection 中移除了不安全的 TLS 版本回退功能</h4>
+<p>
+对于某些服务器中有问题的 TLS 协议降级协商实现,不安全的 TLS/SSL 协议版本回退功能是一种解决方法。这种方法容易受到 POODLE 攻击。Chrome 45 在 2015 年 9 月弃用不安全的回退功能时,依赖它的服务器不到 0.01%。为了提高安全性,在 Android 8.0 中,我们从 <a href="https://developer.android.com/reference/javax/net/ssl/HttpsURLConnection.html" class="external">HttpsURLConnection</a> 中移除了不安全的 TLS 版本回退功能。如需更多信息,请参阅<a href="https://android-developers.googleblog.com/2017/04/android-o-to-drop-insecure-tls-version.html
+ " class="external">这篇博文</a>。
+</p>
+<p>
+要在搭载 Android 8.0 的设备上测试该功能,请运行以下 CTS 测试用例:
+</p>
+<pre class="devsite-click-to-copy devsite-terminal" data-terminal-prefix="# ">
+cts-tradefed run cts -m CtsLibcoreOkHttpTestCases</pre>
+
+<h3 id="performance">性能</h3>
+
+<h4>闪存磨损管理</h4>
+<p>
+介绍 eMMC 行为和新功能,以协助 OEM 降低 Automotive 环境中 eMMC 发生故障的风险。如需更多信息,请参阅 <a href="/devices/tech/perf/flash-wear.html">Android Automotive 中的闪存磨损管理</a>。
+</p>
+
+<h4>优化启动时间</h4>
+<p>
+有关缩短特定 Android 设备启动时间的指南。如需更多信息,请参阅<a href="/devices/tech/perf/boot-times.html">优化启动时间</a>。
+</p>
+
+<h4>任务快照</h4>
+<p>
+任务快照是在 Android 8.0 中引入的基础架构,可将窗口管理器中的最近任务缩略图和已保存 Surface 这两者的屏幕截图进行合并,从而节省内存。如需更多信息,请参阅<a href="/devices/tech/perf/task-snapshots.html">任务快照</a>。
+</p>
+
+<h3 id="peripherals">外设</h3>
+
+<h4>默认打印服务</h4>
+<p>
+<a href="https://developer.android.com/reference/android/printservice/PrintService.html" class="external">打印服务</a>是一款应用,可用于发现打印机并将其呈现给设备的打印框架。在较低的 Android 版本中,用户必须搜索并安装第三方打印服务才能进行打印。
+</p>
+<p>
+Android 8.0 在 <code><a href="https://android.googlesource.com/platform/packages/services/BuiltInPrintService/" class="external">platform/packages/services/BuiltInPrintService/</a></code> 中纳入了一项默认打印服务,该服务可让用户在现代打印机上进行打印,而无需安装额外的应用。此实现支持符合以下条件的打印机:使用互联网打印协议 (IPP) 进行通信,并使用 PCLm、PWG-Raster 或 PDF 发送可打印的内容。对于较旧的打印机,用户应安装 <a href="https://android.googlesource.com/platform/frameworks/base/+/android-7.0.0_r1/packages/PrintRecommendationService/" class="external">PrintRecommendationService</a> 推荐的应用,如<a href="https://youtu.be/M_JGeGLpOKs?t=16m20s" class="external">此 I/O 演示</a>中所示。
+
+</p><h3 id="reference">参考资料更新</h3>
+<p>
+顶级导航菜单中添加了<a href="/reference/">参考资料</a>部分。作为 <a href="/devices/architecture/treble">Treble</a> 更新的一部分,其中添加了 <a href="/reference/hidl/">HIDL 参考资料</a>部分。<a href="/reference/tradefed/">Trade Federation</a> 和<a href="/reference/hal/">旧版 HAL</a> 参考文档已更新。
+</p>
+
+<h3 id="settings-menu">“设置”菜单</h3>
+
+<h4>设置:模式和组件</h4>
+<p>
+在 Android 8.0 中,“设置”菜单中增加了一些能够涵盖常见使用情况的组件和微件。如需更多信息,请参阅<a href="/devices/tech/settings/patterns-components.html">模式和组件</a>。
+</p>
+
+<h4>设置:已更新的信息架构</h4>
+<p>
+Android 8.0 为“设置”应用引入了全新的信息架构。新信息架构的目标是简化设置的组织方式,让用户能够更轻松地快速查找自定义 Android 设备所需的设置。如需更多信息,请参阅如何实现<a href="/devices/tech/settings/info-architecture.html">已更新的信息架构</a>。
+</p>
+
+<h4>个性化设置</h4>
+<p>
+Android“设置”应用可为用户提供一系列建议。该功能会根据所有相关信息或用户以往与建议的互动情况对建议进行排名。如需更多信息,请参阅<a href="/devices/tech/settings/personalized.html">个性化设置</a>。
+</p>
+
+<h4>实现设置:通用搜索</h4>
+<p>
+Android 8.0 为“设置”菜单添加了经过扩展的搜索功能。该文档介绍了如何添加设置,以及如何确保正确地将其加入“设置”索引。如需更多信息,请参阅<a href="/devices/tech/settings/universal-search.html">通用搜索</a>。
+</p>
+
+<h3 id="storage">存储</h3>
+
+<h4>更快地获取存储统计信息</h4>
+<p>
+Android 8.0 利用 EXT4 文件系统的“配额”支持,近乎即时地提供磁盘使用情况统计信息。如需更多信息,请参阅如何<a href="/devices/storage/faster-stats.html">实现更快地获取存储统计信息</a>。
+</p>
+
+<h2 id="april-2017">2017 年 4 月</h2>
+<p>
+欢迎访问新版 source.android.com!本网站经过了全新改版,可让您更轻松地浏览、搜索和阅读日益增多的信息。以下是我们对本网站所做改进的摘要:
+</p>
+
+<h3 id="screen-estate">屏幕空间更宽裕,字体更大</h3>
+<p>
+整个网站的空间更宽裕,可让您同时查看更多内容。代码示例和命令更加醒目,并且所有文字均采用更大的字体。
+</p>
+
+<h3 id="mobile-ready">适合移动设备的视图</h3>
+<p>通过专门的移动视图,新版网站可以在手持设备上更明晰地呈现内容。
+</p>
+
+<img src="../images/mobile-view.png" alt="新移动视图" height="533px"/>
+<figcaption><strong>图 1</strong> 网站的新移动视图</figcaption>
+
+<h3 id="top-tabs">新的顶级标签</h3>
+<p>
+<em></em><em></em>之前的“设备”标签已更名为<a href="/devices/">移植</a>,并且之前的“核心技术”子标签已更名为<a href="/devices/tech/">微调</a>并移到了网站顶部,以便更好地显示给用户。
+</p>
+
+<h3 id="security-forefront">“安全性”标签排在了前列</h3>
+<p>
+随着人们越来越关注 Android 的安全性,我们将<a href="/security/">安全性</a>标签向前移到了<a href="/setup/">源代码</a>旁边,以体现其重要性。
+</p>
+
+<h3 id="reference-materials">更好的参考资料</h3>
+<p>
+ 您可以直接从顶层的<a href="/reference/">参考资料</a>标签获得<a href="/reference/hal/">硬件抽象层</a>和 <a href="/reference/tradefed/packages">Trade Federation</a> 参考资料。
+</p>
+
+<h3 id="code-links">每页都有的代码链接</h3>
+<p>
+在每个页面中,您只需点击一下右上角的<strong>转到源代码</strong>按钮,即可访问 <a href="https://android.googlesource.com/" class="external">AOSP 代码库</a>。
+</p>
+
+<h3 id="comprehensive-footers">包罗广泛的页脚</h3>
+<p>
+<em></em><em></em><em></em>除了已有的“关于”、“社区”和“法律”页脚之外,现在您还可以在每个页面的底部找到完整的链接列表。通过这些链接,您可以编译 Android、与 Android 生态系统建立联系,以及获得使用操作系统方面的帮助。
+</p>
+
+</body></html> \ No newline at end of file