aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Partner Docs <noreply@android.com>2018-03-16 12:34:18 -0700
committerClay Murphy <claym@google.com>2018-03-16 12:39:03 -0700
commitc6df243a3316ba12bd910555abe5d2df44ea34d9 (patch)
tree583f1449d717126091363f8accd5f02f501bbf52
parente776910169664b89ac8ebb36627373136c8e532c (diff)
downloadsource.android.com-c6df243a3316ba12bd910555abe5d2df44ea34d9.tar.gz
Docs: Changes to source.android.com
- 189377827 hikey960: Use Image.gz-dtb as a kernel image by Android Partner Docs <noreply@android.com> - 189349681 Moving VTS from devices/tech to compatibility/vts (and im... by Heidi von Markham <hvm@google.com> - 189244963 Augment USB Audio CTS doc with additional peripherals by Clay Murphy <claym@google.com> - 189185354 New reports page for Android Security YIR and home page u... by Danielle Roberts <daroberts@google.com> - 189059228 Update CTS/CTS-Verifier downloads for CTS-Mar-2018 Releases by Android Partner Docs <noreply@android.com> - 189043885 Devsite localized content from translation request 6cb273... by Android Partner Docs <noreply@android.com> - 189038438 Devsite localized content from translation request 1306aa... by Android Partner Docs <noreply@android.com> - 189038430 Devsite localized content from translation request cbcbd6... by Android Partner Docs <noreply@android.com> - 188908346 Devsite localized content from translation request 946829... by Android Partner Docs <noreply@android.com> - 188908252 Devsite localized content from translation request 4ade76... by Android Partner Docs <noreply@android.com> - 188908248 Devsite localized content from translation request 3a86a7... by Android Partner Docs <noreply@android.com> - 188908238 Devsite localized content from translation request 090d64... by Android Partner Docs <noreply@android.com> - 188877475 Updated "Develop CTS" page to by Android Partner Docs <noreply@android.com> - 188805462 Devsite localized content from translation request 429221... by Android Partner Docs <noreply@android.com> - 188791843 CDD: Relax Overview title count requirement. by Android Partner Docs <noreply@android.com> - 188751143 Devsite localized content from translation request 1e4322... by Android Partner Docs <noreply@android.com> - 188751132 Devsite localized content from translation request 9e5f9b... by Android Partner Docs <noreply@android.com> - 188560973 CDD: SD card encryption required for the primary external... by Android Partner Docs <noreply@android.com> - 188560351 by Android Partner Docs <noreply@android.com> - 188418844 Add links and path to source files for Data Saver by Clay Murphy <claym@google.com> - 188368136 CDD: Apps can use ACTION_OPEN_DOCUMENT_TREE to write to s... by Android Partner Docs <noreply@android.com> - 188364381 by Android Partner Docs <noreply@android.com> - 188363534 CDD: Fixing typos in the USB section by Android Partner Docs <noreply@android.com> - 188360294 CDD: Relax Overview title count requirement. by Android Partner Docs <noreply@android.com> - 188351043 Devsite localized content from translation request e77cb5... by Android Partner Docs <noreply@android.com> - 188346717 CDD: Relax Near-ultrasound microphone SNR requirement. by Android Partner Docs <noreply@android.com> - 188344574 CDD: Updated section 3.8.10 Lock Screen Media Control to ... by Android Partner Docs <noreply@android.com> - 188269274 by Android Partner Docs <noreply@android.com> - 188268739 CDD: Relax Overview title count requirement. by Android Partner Docs <noreply@android.com> - 188254167 Add AOSP links to Android & Pixel bulletins by Danielle Roberts <daroberts@google.com> - 188246295 by Android Partner Docs <noreply@android.com> - 188243208 by Android Partner Docs <noreply@android.com> - 188235190 Devsite localized content from translation request f764fc... by Android Partner Docs <noreply@android.com> - 188213222 Add tag for Pixel C release for March 2018. by Android Partner Docs <noreply@android.com> - 188209010 Devsite localized content from translation request 8fd2a1... by Android Partner Docs <noreply@android.com> PiperOrigin-RevId: 189377827 Change-Id: I6f068548537b775ce3f2f086d87633726b1286b0
-rw-r--r--en/_index.yaml24
-rw-r--r--en/compatibility/5.0/android-5.0-cdd.html64
-rw-r--r--en/compatibility/5.1/android-5.1-cdd.html67
-rw-r--r--en/compatibility/6.0/android-6.0-cdd.html27
-rw-r--r--en/compatibility/_toc-compatibility.yaml14
-rw-r--r--en/compatibility/cts/development.html32
-rw-r--r--en/compatibility/cts/downloads.html108
-rw-r--r--en/compatibility/cts/images/usb_headset.pngbin92785 -> 120651 bytes
-rw-r--r--en/compatibility/cts/usb-audio.html39
-rw-r--r--en/compatibility/vts/database.html (renamed from en/devices/tech/vts/database.html)103
-rw-r--r--en/compatibility/vts/images/treble_latency_bubble.png (renamed from en/devices/tech/images/treble_latency_bubble.png)bin14509 -> 14509 bytes
-rw-r--r--en/compatibility/vts/images/treble_priority_inv_rta.png (renamed from en/devices/tech/images/treble_priority_inv_rta.png)bin12106 -> 12106 bytes
-rw-r--r--en/compatibility/vts/images/treble_priority_inv_rta_blocked.png (renamed from en/devices/tech/images/treble_priority_inv_rta_blocked.png)bin13461 -> 13461 bytes
-rw-r--r--en/compatibility/vts/images/treble_systrace_binder_processes.png (renamed from en/devices/tech/images/treble_systrace_binder_processes.png)bin23646 -> 23646 bytes
-rw-r--r--en/compatibility/vts/images/treble_vts_dash_arch.png (renamed from en/devices/tech/images/treble_vts_dash_arch.png)bin22245 -> 22245 bytes
-rw-r--r--en/compatibility/vts/images/treble_vts_dash_entity_ancestry.png (renamed from en/devices/tech/images/treble_vts_dash_entity_ancestry.png)bin11461 -> 11461 bytes
-rw-r--r--en/compatibility/vts/images/treble_vts_descend.png (renamed from en/devices/tech/images/treble_vts_descend.png)bin15098 -> 15098 bytes
-rw-r--r--en/compatibility/vts/images/treble_vts_descend_not.png (renamed from en/devices/tech/images/treble_vts_descend_not.png)bin9618 -> 9618 bytes
-rw-r--r--en/compatibility/vts/images/treble_vts_ui_coverage.png (renamed from en/devices/tech/images/treble_vts_ui_coverage.png)bin43220 -> 43220 bytes
-rw-r--r--en/compatibility/vts/images/treble_vts_ui_coverage_source.png (renamed from en/devices/tech/images/treble_vts_ui_coverage_source.png)bin100622 -> 100622 bytes
-rw-r--r--en/compatibility/vts/images/treble_vts_ui_favorites.png (renamed from en/devices/tech/images/treble_vts_ui_favorites.png)bin56963 -> 56963 bytes
-rw-r--r--en/compatibility/vts/images/treble_vts_ui_histogram.png (renamed from en/devices/tech/images/treble_vts_ui_histogram.png)bin33363 -> 33363 bytes
-rw-r--r--en/compatibility/vts/images/treble_vts_ui_main.png (renamed from en/devices/tech/images/treble_vts_ui_main.png)bin28568 -> 28568 bytes
-rw-r--r--en/compatibility/vts/images/treble_vts_ui_performance.png (renamed from en/devices/tech/images/treble_vts_ui_performance.png)bin77771 -> 77771 bytes
-rw-r--r--en/compatibility/vts/images/treble_vts_ui_results.png (renamed from en/devices/tech/images/treble_vts_ui_results.png)bin60387 -> 60387 bytes
-rw-r--r--en/compatibility/vts/index.html (renamed from en/devices/tech/vts/index.html)10
-rw-r--r--en/compatibility/vts/performance.html (renamed from en/devices/tech/vts/performance.html)18
-rw-r--r--en/compatibility/vts/setup.html (renamed from en/devices/tech/vts/setup.html)71
-rw-r--r--en/compatibility/vts/systems.html106
-rw-r--r--en/compatibility/vts/ui.html (renamed from en/devices/tech/vts/ui.html)31
-rw-r--r--en/devices/_toc-tech.yaml16
-rw-r--r--en/devices/tech/connect/data-saver.html4
-rw-r--r--en/security/_toc.yaml2
-rw-r--r--en/security/bulletin/2018-03-01.html137
-rw-r--r--en/security/bulletin/pixel/2018-03-01.html39
-rw-r--r--en/security/images/PHA-classification.pngbin0 -> 64454 bytes
-rw-r--r--en/security/images/yir-2014.pngbin0 -> 53887 bytes
-rw-r--r--en/security/images/yir-2015.pngbin0 -> 46628 bytes
-rw-r--r--en/security/images/yir-2016.pngbin0 -> 46927 bytes
-rw-r--r--en/security/images/yir-2017.pngbin0 -> 47201 bytes
-rw-r--r--en/security/overview/reports.html116
-rw-r--r--en/setup/build-numbers.html6
-rw-r--r--en/setup/devices.html4
-rw-r--r--ru/security/bulletin/2016.html86
-rw-r--r--zh-cn/_book.yaml8
-rw-r--r--zh-cn/compatibility/cts/interpret.html2
-rw-r--r--zh-cn/compatibility/cts/run.html2
-rw-r--r--zh-cn/compatibility/cts/setup.html3
-rw-r--r--zh-cn/compatibility/index.html3
-rw-r--r--zh-cn/devices/accessories/headset/usb-adapter.html2
-rw-r--r--zh-cn/devices/accessories/headset/usb-headset-spec.html87
-rw-r--r--zh-cn/devices/architecture/dto/optimize.html2
-rw-r--r--zh-cn/devices/architecture/hidl-java/interfaces.html2
-rw-r--r--zh-cn/devices/automotive/camera-hal.html6
-rw-r--r--zh-cn/devices/camera/versioning.html56
-rw-r--r--zh-cn/devices/graphics/index.html8
-rw-r--r--zh-cn/devices/graphics/renderer.html16
-rw-r--r--zh-cn/devices/graphics/run-tests.html2
-rw-r--r--zh-cn/devices/media/oem.html7
-rw-r--r--zh-cn/devices/sensors/batching.html2
-rw-r--r--zh-cn/devices/sensors/index.html8
-rw-r--r--zh-cn/devices/sensors/sensor-stack.html2
-rw-r--r--zh-cn/devices/storage/index.html2
-rw-r--r--zh-cn/devices/tech/admin/multiuser-apps.html42
-rw-r--r--zh-cn/devices/tech/admin/provision.html4
-rw-r--r--zh-cn/devices/tech/admin/testing-provision.html90
-rw-r--r--zh-cn/devices/tech/config/carrier.html8
-rw-r--r--zh-cn/devices/tech/config/filesystem.html35
-rw-r--r--zh-cn/devices/tech/config/uicc.html8
-rw-r--r--zh-cn/devices/tech/connect/block-numbers.html5
-rw-r--r--zh-cn/devices/tech/dalvik/gc-debug.html2
-rw-r--r--zh-cn/devices/tech/dalvik/improvements.html230
-rw-r--r--zh-cn/devices/tech/dalvik/index.html13
-rw-r--r--zh-cn/devices/tech/datausage/tags-explained.html4
-rw-r--r--zh-cn/devices/tech/debug/ftrace.html159
-rw-r--r--zh-cn/devices/tech/debug/sanitizers.html6
-rw-r--r--zh-cn/devices/tech/debug/systrace.html230
-rw-r--r--zh-cn/devices/tech/display/widgets-shortcuts.html11
-rw-r--r--zh-cn/devices/tech/ota/ab/ab_implement.html8
-rw-r--r--zh-cn/devices/tech/ota/ab/index.html36
-rw-r--r--zh-cn/devices/tech/ota/device_code.html24
-rw-r--r--zh-cn/devices/tech/ota/nonab/device_code.html21
-rw-r--r--zh-cn/devices/tech/ota/nonab/inside_packages.html5
-rw-r--r--zh-cn/devices/tech/ota/reduce_size.html25
-rw-r--r--zh-cn/devices/tech/ota/sign_builds.html2
-rw-r--r--zh-cn/devices/tech/perf/boot-times.html5
-rw-r--r--zh-cn/devices/tech/power/component.html2
-rw-r--r--zh-cn/devices/tv/index.html38
-rw-r--r--zh-cn/devices/tv/reference-tv-app.html2
-rw-r--r--zh-cn/license.html3
-rw-r--r--zh-cn/security/advisory/index.html2
-rw-r--r--zh-cn/security/apksigning/v2.html2
-rw-r--r--zh-cn/security/keystore/tags.html5
-rw-r--r--zh-cn/security/overview/acknowledgements.html120
-rw-r--r--zh-cn/setup/64-bit-builds.html2
-rw-r--r--zh-cn/setup/brands.html6
-rw-r--r--zh-cn/setup/build-numbers.html35
-rw-r--r--zh-cn/setup/community.html4
-rw-r--r--zh-cn/setup/initializing.html8
-rw-r--r--zh-cn/setup/read-bug-reports.html2
-rw-r--r--zh-cn/setup/requirements.html2
-rw-r--r--zh-cn/setup/site-updates.html4
102 files changed, 1697 insertions, 857 deletions
diff --git a/en/_index.yaml b/en/_index.yaml
index 85acc4bc..db5f4429 100644
--- a/en/_index.yaml
+++ b/en/_index.yaml
@@ -73,13 +73,20 @@ landing_page:
image_path: /images/android_stack.png
- heading: News
items:
- - heading: February Security Bulletins
+ - heading: Android 2017 Year in Review
description: >
- The February 2018 Android and Pixel/Nexus Security Bulletins have been
- published to support the February security release.
+ The Android Security 2017 Year in Review covers everything that happened
+ in Android Security in 2017.
buttons:
- - label: February 7th, 2018
- path: /security/bulletin/2018-02-01
+ - label: March 15th, 2018
+ path: /security/overview/reports
+ - heading: March Security Bulletins
+ description: >
+ The March 2018 Android and Pixel/Nexus Security Bulletins have been
+ published to support the March security release.
+ buttons:
+ - label: March 7th, 2018
+ path: /security/bulletin/2018-03-01
- heading: ART DEX bytecode improvements
description: >
Android runtime (ART) now includes bytecode documentation for
@@ -88,13 +95,6 @@ landing_page:
buttons:
- label: January 19th, 2018
path: /devices/tech/dalvik/dalvik-bytecode
- - heading: Android 8.1 Instructions
- description: >
- The Android 8.1 release is now available and offers many new features
- aimed at device manufacturers and users alike.
- buttons:
- - label: December 5th, 2017
- path: /setup/site-updates#Dec-2017
- classname: devsite-landing-row-100 tf-row-centered
items:
- buttons:
diff --git a/en/compatibility/5.0/android-5.0-cdd.html b/en/compatibility/5.0/android-5.0-cdd.html
index 7f0fbe87..828d6142 100644
--- a/en/compatibility/5.0/android-5.0-cdd.html
+++ b/en/compatibility/5.0/android-5.0-cdd.html
@@ -1725,7 +1725,7 @@ implementations including the recents function navigation key as detailed in <a
<ul>
<li> MUST display affiliated recents as a group that moves together
<li> MUST support at least up to 20 displayed activities
- <li> MUST at least display the title of 4 activities at a time
+ <li> SHOULD at least display the title of 4 activities at a time
<li> SHOULD display highlight color, icon, screen title in recents
<li> MUST implement the screen pinning behavior [<a href="https://developer.android.com/about/versions/android-5.0.html#ScreenPinning">Resources, 33</a>] and provide the user with a settings menu to toggle the feature
<li> SHOULD display a closing affordance ("x") but MAY delay this until user
@@ -4807,11 +4807,12 @@ Shared storage MUST otherwise be writable by any application that obtains that
permission.</p>
<p>Device implementations that include multiple shared storage paths (such as both
-an SD card slot and shared internal storage) MUST NOT allow Android
-applications to write to the secondary external storage, except for their
-package-specific directories on the secondary external storage, but SHOULD
-expose content from both storage paths transparently through Android's media
-scanner service and android.provider.MediaStore.</p>
+an SD card slot and shared internal storage) MUST allow only pre-installed &amp;
+privileged Android applications with the WRITE_EXTERNAL_STORAGE permission to
+write to the secondary external storage, except for the package-specific
+directories on the secondary external storage, but SHOULD expose content from
+both storage paths transparently through Android&rsquo;s media scanner service
+and android.provider.MediaStore.</p>
<p>Regardless of the form of shared storage used, device implementations MUST
provide some mechanism to access the contents of shared storage from a host
@@ -4841,16 +4842,15 @@ USB host mode.</p>
<ul>
<li> The port MUST be connectable to a USB host that has a standard type-A or type
-C USB port.
- <li> The port SHOULD use micro-A, micro-AB or type-C USB form factor. Existing and
-new Android devices are <strong>very strongly encouraged to meet these requirements</strong> so they will be able to upgrade to the future platform releases.
- <li> The port SHOULD be centered in the middle of an edge. Device implementations
-SHOULD either locate the port on the bottom of the device (according to natural
+ <li>The port SHOULD use micro-B, micro-AB or Type-C USB form factor. Existing and
+new Android devices are <strong>STRONGLY RECOMMENDED to meet these requirements</strong>
+so they will be able to upgrade to future platform releases.</li>
+ <li>The port SHOULD either be located on the bottom of the device (according to natural
orientation) or enable software screen rotation for all apps (including home
screen), so that the display draws correctly when the device is oriented with
-the port at bottom. Existing and new Android devices are <strong>very strongly encouraged to meet these requirements</strong> so they will be able to upgrade to future platform releases.
- <li> It MUST allow a USB host connected with the Android device to access the
-contents of the shared storage volume using either USB mass storage or Media
-Transfer.
+the port at bottom. Existing and new Android devices are <strong>STRONGLY RECOMMENDED
+to meet these requirements</strong> so they will be able to upgrade to future platform
+releases.</li>
<li> It SHOULD implement the Android Open Accessory (AOA) API and specification as
documented in the Android SDK documentation, and if it is an Android Handheld
device it MUST implement the AOA API. Device implementations implementing the
@@ -4860,8 +4860,8 @@ AOA specification:
<li> MUST implement the USB audio class as documented in the Android SDK
documentation [<a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">Resources, 98</a>]
</ul>
- <li> It SHOULD implement support to draw 1.5 A current during HS chirp and traffic
-as specified in the USB battery charging specification [<a href="http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf">Resources, 99</a>]. Existing and new Android devices are <strong>very strongly encouraged to meet these requirements</strong> so they will be able to upgrade to the future platform releases.
+ <li>It SHOULD implement support to draw 1.5 A current during HS chirp and traffic
+as specified in the USB Battery Charging Specification, Revision 1.2 [<a href="http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip">Resources, 99</a>]. Existing and new Android devices are <strong>STRONGLY RECOMMENDED to meet these requirements</strong> so they will be able to upgrade to the future platform releases.</li>
<li> The value of iSerialNumber in USB standard device descriptor MUST be equal to
the value of android.os.Build.SERIAL.
</ul>
@@ -4879,7 +4879,7 @@ documentation [<a href="http://developer.android.com/reference/android/hardware/
<li> MUST implement the Android USB host API as documented in the Android SDK, and
MUST declare support for the hardware feature android.hardware.usb.host [<a href="http://developer.android.com/guide/topics/connectivity/usb/host.html">Resources, 100</a>]
<li> SHOULD support the Charging Downstream Port output current range of 1.5 A ~ 5 A
-as specified in the USB Battery Charging Specifications [<a href="http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf">Resources, 99</a>]
+as specified in the USB Battery Charging Specification, Revision 1.2 [<a href="http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip">Resources, 99</a>].</li>
</ul>
<h2 id=7_8_audio>7.8. Audio</h2>
@@ -5145,8 +5145,8 @@ ensure that applications owned by and running on behalf a given user cannot
list, read, or write to data owned by any other user. Note that removable
media, such as SD card slots, can allow one user to access another's data by
means of a host PC. For this reason, device implementations that use removable
-media for the external storage APIs MUST encrypt the contents of the SD card if
-multiuser is enabled using a key stored only on non-removable media accessible
+media for the primary external storage APIs MUST encrypt the contents of the SD
+card if multiuser is enabled using a key stored only on non-removable media accessible
only to the system. As this will make the media unreadable by a host PC, device
implementations will be required to switch to MTP or a similar system to
provide host PCs with access to the current user's data. Accordingly, device
@@ -5504,7 +5504,8 @@ android.software.live_wallpaper.</p>
<p>3.8.8. Activity Switching</p>
</td>
<td>
-<p>Advised requirement to support new Recents User Interface</p>
+<p>Advised requirement to support new Recents User Interface.</p>
+ <p>SHOULD at least display the title of 4 activities at a time.</p>
</td>
</tr>
<tr>
@@ -5846,6 +5847,10 @@ removed. Devices MUST have at least 1.5GB of non-volatile storage</p>
</td>
</tr>
<tr>
+ <td>7.6.2. Application Shared Storage</td>
+ <td>Updated requirements that pre-installed system apps may write to secondary external storage.</td>
+ </tr>
+ <tr>
<td>
<p>7.7. USB</p>
</td>
@@ -5856,6 +5861,14 @@ micro-USB port. Updated requirements for Host and Peripheral mode. </p>
</tr>
<tr>
<td>
+<p>7.7. USB</p>
+</td>
+ <td>
+<p>Fixing typos in the USB section. </p>
+</td>
+ </tr>
+ <tr>
+ <td>
<p>7.8.1. Audio</p>
</td>
<td>
@@ -5882,6 +5895,15 @@ requirements by device type in section.</p>
</tr>
<tr>
<td>
+<p>9.5. Multi-User Support</p>
+</td>
+ <td>
+<p>SD card encryption required for the primary external storage.</p>
+</td>
+ </tr>
+
+ <tr>
+ <td>
<p>9.7. Kernel Security Features</p>
</td>
<td>
@@ -6153,7 +6175,7 @@ Android source code, at dalvik/docs</p>
<p>98. Android USB Audio: <a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO</a></p>
-<p>99. USB Charging Specification: <a href="http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf">http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf</a></p>
+<p>99. USB Battery Charging Specification, Revision 1.2: <a href="http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip">http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip</a></p>
<p>100. USB Host API:<a href="http://developer.android.com/guide/topics/usb/host.html"> http://developer.android.com/guide/topics/usb/host.html</a></p>
diff --git a/en/compatibility/5.1/android-5.1-cdd.html b/en/compatibility/5.1/android-5.1-cdd.html
index c2927814..377d9f9d 100644
--- a/en/compatibility/5.1/android-5.1-cdd.html
+++ b/en/compatibility/5.1/android-5.1-cdd.html
@@ -1413,7 +1413,7 @@ implementations including the recents function navigation key as detailed in <a
<ul>
<li>MUST display affiliated recents as a group that moves together.</li>
<li>MUST support at least up to 20 displayed activities.</li>
- <li>MUST at least display the title of 4 activities at a time.</li>
+ <li>SHOULD at least display the title of 4 activities at a time.</li>
<li>SHOULD display highlight color, icon, screen title in recents.</li>
<li>MUST implement the screen pinning behavior [<a href="http://developer.android.com/about/versions/android-5.0.html#ScreenPinning">Resources, 33</a>] and provide the user with a settings menu to toggle the feature.</li>
<li>SHOULD display a closing affordance ("x") but MAY delay this until user
@@ -2150,7 +2150,8 @@ hardware.</p>
<p>While some of the requirements outlined in this section are stated as SHOULD
since Android 4.3, the Compatibility Definition for a future version is planned
-to change these to MUST. Existing and new Android devices are <strong>very strongly encouraged</strong> to meet these requirements, or they will not be able to attain Android
+to change these to MUST. Existing and new Android devices are <strong>STRONGLY RECOMMENDED</strong>
+to meet these requirements that are stated as SHOULD, or they will not be able to attain Android
compatibility when upgraded to the future version.</p>
<h3 id="5_4_1_raw_audio_capture">5.4.1. Raw Audio Capture</h3>
@@ -3825,11 +3826,15 @@ Shared storage MUST otherwise be writable by any application that obtains that
permission.</p>
<p>Device implementations that include multiple shared storage paths (such as both
-an SD card slot and shared internal storage) MUST NOT allow Android
-applications to write to the secondary external storage, except for their
-package-specific directories on the secondary external storage, but SHOULD
-expose content from both storage paths transparently through Android&rsquo;s media
-scanner service and android.provider.MediaStore.</p>
+an SD card slot and shared internal storage) MUST allow only pre-installed and
+privileged Android applications with the WRITE_EXTERNAL_STORAGE 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.</p>
+
+<p>However, device implementations SHOULD expose content from
+both storage paths transparently through Android's media scanner service
+and android.provider.MediaStore.</p>
<p>Regardless of the form of shared storage used, if the device implementation
has a USB port with USB peripheral mode support, it MUST provide some mechanism
@@ -3856,13 +3861,15 @@ USB host mode.</p>
<ul>
<li>The port MUST be connectable to a USB host that has a standard type-A or type
-C USB port.</li>
- <li>The port SHOULD use micro-A, micro-AB or type-C USB form factor. Existing and
-new Android devices are <strong>very strongly encouraged to meet these requirements</strong> so they will be able to upgrade to the future platform releases.</li>
- <li>The port SHOULD be centered in the middle of an edge. Device implementations
-SHOULD either locate the port on the bottom of the device (according to natural
+ <li>The port SHOULD use micro-B, micro-AB or Type-C USB form factor. Existing and
+new Android devices are <strong>STRONGLY RECOMMENDED to meet these requirements</strong>
+so they will be able to upgrade to future platform releases.</li>
+ <li>The port SHOULD either be located on the bottom of the device (according to natural
orientation) or enable software screen rotation for all apps (including home
screen), so that the display draws correctly when the device is oriented with
-the port at bottom. Existing and new Android devices are <strong>very strongly encouraged to meet these requirements</strong> so they will be able to upgrade to future platform releases.</li>
+the port at bottom. Existing and new Android devices are <strong>STRONGLY RECOMMENDED
+to meet these requirements</strong> so they will be able to upgrade to future platform
+releases.</li>
<li>It SHOULD implement the Android Open Accessory (AOA) API and specification as
documented in the Android SDK documentation, and if it is an Android Handheld
device it MUST implement the AOA API. Device implementations implementing the
@@ -3873,7 +3880,7 @@ AOA specification:
documentation [<a href="http://developer.android.com/reference/android/hardware/usb/UsbConstants.html#USB_CLASS_AUDIO">Resources, 98</a>].</li>
</ul></li>
<li>It SHOULD implement support to draw 1.5 A current during HS chirp and traffic
-as specified in the USB battery charging specification [<a href="http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf">Resources, 99</a>]. Existing and new Android devices are <strong>very strongly encouraged to meet these requirements</strong> so they will be able to upgrade to the future platform releases.</li>
+as specified in the USB Battery Charging Specification, Revision 1.2 [<a href="http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip">Resources, 99</a>]. Existing and new Android devices are <strong>STRONGLY RECOMMENDED to meet these requirements</strong> so they will be able to upgrade to the future platform releases.</li>
<li>The value of iSerialNumber in USB standard device descriptor MUST be equal to
the value of android.os.Build.SERIAL.</li>
</ul>
@@ -3891,7 +3898,7 @@ documentation [<a href="http://developer.android.com/reference/android/hardware/
<li>MUST implement the Android USB host API as documented in the Android SDK, and
MUST declare support for the hardware feature android.hardware.usb.host [<a href="http://developer.android.com/guide/topics/connectivity/usb/host.html">Resources, 100</a>].</li>
<li>SHOULD support the Charging Downstream Port output current range of 1.5 A ~ 5 A
-as specified in the USB Battery Charging Specifications [<a href="http://www.usb.org/developers/docs/devclass_docs/USB_Battery_Charging_1.2.pdf">Resources, 99</a>].</li>
+as specified in the USB Battery Charging Specification, Revision 1.2 [<a href="http://www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip">Resources, 99</a>].</li>
</ul>
<h2 id="7_8_audio">7.8. Audio</h2>
@@ -4142,7 +4149,7 @@ ensure that applications owned by and running on behalf a given user cannot
list, read, or write to data owned by any other user. Note that removable
media, such as SD card slots, can allow one user to access another&rsquo;s data by
means of a host PC. For this reason, device implementations that use removable
-media for the external storage APIs MUST encrypt the contents of the SD card if
+media for the primary external storage APIs MUST encrypt the contents of the SD card if
multiuser is enabled using a key stored only on non-removable media accessible
only to the system. As this will make the media unreadable by a host PC, device
implementations will be required to switch to MTP or a similar system to
@@ -4407,6 +4414,10 @@ Definition in this release. </p>
<td>Clarified notification requirement for Android Watch, Television and
Automotive implementations.</td>
</tr>
+ <tr>
+ <td>3.8.8. Activity Switching</td>
+ <td>Relax Overview title count requirement.</td>
+ </tr>
<tr>
<td>3.8.10. Lock Screen Media Control</td>
<td>Clarified requirement for Android Watch and Automotive implementations.</td>
@@ -4436,6 +4447,10 @@ Definition in this release. </p>
<td>5.1.3 Video Codecs</td>
<td>Added Android automotive requirements.</td>
</tr>
+ <tr>
+ <td>5.4. Audio Recording</td>
+ <td>Clarified language at the beginning of the section to ensure MUST requirements are read as REQUIRED.</td>
+ </tr>
<tr>
<td>7.1.1.3. Screen Density</td>
<td>Added a new screen dpi (280dpi).</td>
@@ -4479,7 +4494,19 @@ Definition in this release. </p>
</tr>
<tr>
<td>7.6.2. Application Shared Storage</td>
- <td>Updated requirements when support for host machine access is mandatory.</td>
+ <td>Updated requirements when support for host machine access is mandatory.</td>
+ </tr>
+ <tr>
+ <td>7.7 USB</td>
+ <td>Fixing typos in USB section</td>
+ </tr>
+ <tr>
+ <td>7.6.2. Application Shared Storage</td>
+ <td>Updated requirements that pre-installed system apps may write to secondary external storage.</td>
+ </tr>
+ <tr>
+ <td>7.6.2. Application Shared Storage</td>
+ <td>Apps can use ACTION_OPEN_DOCUMENT_TREE to write to secondary ext. storage</td>
</tr>
<tr>
<td>7.8.1. Microphone</td>
@@ -4489,6 +4516,14 @@ Definition in this release. </p>
<td>8.2. File I/O Access Performance</td>
<td>Clarified requirements.</td>
</tr>
+ <tr>
+ <td>
+9.5. Multi-User Support
+</td>
+ <td>
+SD card encryption required for the primary external storage.
+</td>
+ </tr>
<tr>
<td>9.8. Privacy</td>
<td>Added privacy requirement for preloaded VPNs.</td>
diff --git a/en/compatibility/6.0/android-6.0-cdd.html b/en/compatibility/6.0/android-6.0-cdd.html
index ab69db8c..94351b69 100644
--- a/en/compatibility/6.0/android-6.0-cdd.html
+++ b/en/compatibility/6.0/android-6.0-cdd.html
@@ -1601,7 +1601,7 @@ implementations including the recents function navigation key as detailed in <a
<ul>
<li>MUST display affiliated recents as a group that moves together.</li>
<li>MUST support at least up to 6 displayed activities.</li>
- <li>MUST at least display the title of 4 activities at a time.</li>
+ <li>SHOULD at least display the title of 4 activities at a time.</li>
<li>SHOULD display highlight color, icon, screen title in recents.</li>
<li>MUST implement the screen pinning behavior [<a href="http://developer.android.com/about/versions/android-5.0.html#ScreenPinning">Resources, 38</a>] and provide the user with a settings menu to toggle the feature.</li>
<li>SHOULD display a closing affordance ("x") but MAY delay this until user
@@ -1629,10 +1629,10 @@ to the android.settings.INPUT_METHOD_SETTINGS intent.</p>
<p>The Remote Control Client API is deprecated from Android 5.0 in favor of the
Media Notification Template that allows media applications to integrate with
-playback controls that are displayed on the lock screen [<a href="http://developer.android.com/reference/android/app/Notification.MediaStyle.html">Resources, 40</a>].
-Device implementations that support a lock screen, unless an Android Automotive or Watch
-implementation, MUST display the Lockscreen Notifications including the Media Notification
-Template.</p>
+playback controls that are displayed on the lock screen [<a href="http://developer.android.com/reference/android/app/Notification.MediaStyle.html">Resources, 40</a>]
+as Lock screen notifications. Device implementations MUST render the Media Notification Template
+properly as part of the Lock screen notifications described in section 3.8.3.
+</p>
<h3 id="3_8_11_dreams">3.8.11. Dreams</h3>
@@ -4683,9 +4683,10 @@ API as follows:
<a href="http://developer.android.com/reference/android/media/AudioManager.html#PROPERTY_SUPPORT_MIC_NEAR_ULTRASOUND">PROPERTY_SUPPORT_MIC_NEAR_ULTRASOUND</a>
is "true", then
<ul>
- <li>The microphone's mean power response in the 18.5 kHz to 20 kHz band MUST be no more than
- 15 dB below the response at 2 kHz.</li>
- <li>The signal to noise ratio of the microphone MUST be no lower than 80 dB.</li>
+ <li>The microphone's mean power response in the 18.5 kHz to 20 kHz band MUST be no more
+ than 15 dB below the response at 2 kHz.</li>
+ <li>The microphone's unweighted signal-to-noise ratio (SNR) over 18.5 kHz to 20 kHz for a 19 kHz
+ tone at -26 dBFS MUST be no lower than 50 dB.</li>
</ul>
</li>
<li>If
@@ -5248,7 +5249,15 @@ Definition in this release.</p>
<td>3.8.6. Themes</td>
<td>Added requirement to support black system icons when requested by the SYSTEM_UI_FLAG_LIGHT_STATUS_BAR flag</td>
</tr>
+ <tr>
+ <td>3.8.8. Activity Switching</td>
+ <td>Relaxed Overview title count requirement.</td>
+ </tr>
<tr>
+ <td>3.8.10. Lock Screen Media Control</td>
+ <td> Lock Screen Media Control to refer to 3.8.3 in detail.</td>
+ </tr>
+ <tr>
<td>3.9.1. Device Provisioning</td>
<td>Contains new sections for device owner provisioning and managed profile provisioning</td>
</tr>
@@ -5355,6 +5364,8 @@ switching, and more</td>
<tr>
<td>7.8.3. Near-Ultrasound</td>
<td>Additions related to near-ultrasound recording, playback, and audio</td>
+ <td>Relax Near-ultrasound microphone SNR requirement.
+ </td>
</tr>
<tr>
<td>8.3. Power-Saving Modes</td>
diff --git a/en/compatibility/_toc-compatibility.yaml b/en/compatibility/_toc-compatibility.yaml
index 31f19da6..e10be874 100644
--- a/en/compatibility/_toc-compatibility.yaml
+++ b/en/compatibility/_toc-compatibility.yaml
@@ -47,3 +47,17 @@ toc:
path: /compatibility/cts/downloads
- title: Contact Us
path: /compatibility/contact-us
+- title: Vendor Test Suite (VTS)
+ section:
+ - title: Overview
+ path: /compatibility/vts/
+ - title: Systems Testing with VTS
+ path: /compatibility/vts/systems
+ - title: VTS Dashboard Setup
+ path: /compatibility/vts/setup
+ - title: VTS Dashboard Database
+ path: /compatibility/vts/database
+ - title: VTS Dashboard UI
+ path: /compatibility/vts/ui
+ - title: Performance Testing
+ path: /compatibility/vts/performance \ No newline at end of file
diff --git a/en/compatibility/cts/development.html b/en/compatibility/cts/development.html
index 1329c2cc..2044b750 100644
--- a/en/compatibility/cts/development.html
+++ b/en/compatibility/cts/development.html
@@ -253,6 +253,11 @@ updated from time to time as CTS for the given Android version matures.</p>
</thead>
<tbody>
<tr>
+ <td>8.1</td>
+ <td>oreo-mr1-cts-dev</td>
+ <td>Monthly</td>
+ </tr>
+<tr>
<td>8.0</td>
<td>oreo-cts-dev</td>
<td>Monthly</td>
@@ -278,24 +283,7 @@ updated from time to time as CTS for the given Android version matures.</p>
<td>Monthly</td>
</tr>
<tr>
- <td>5.0</td>
- <td>lollipop-cts-dev</td>
- <td>No releases planned</td>
-</tr>
-<tr>
- <td>4.4</td>
- <td>kitkat-cts-dev</td>
- <td>No releases planned</td>
-</tr>
-<tr>
- <td>4.3</td>
- <td>jb-mr2-cts-dev</td>
- <td>No releases planned</td>
-</tr>
-<tr>
- <td>4.2</td>
- <td>jb-mr1.1-cts-dev</td>
- <td>No releases planned</td>
+ <td colspan="3">No releases are planned for 5.0, 4.4, 4.3 and 4.2.</td>
</tr>
</table>
@@ -315,14 +303,16 @@ Open Source Project (AOSP).
<p>CTS development branches have been set up so that changes submitted to each
branch will automatically merge as below:<br>
-jb-dev-> jb-mr1.1-cts-dev -> jb-mr2-cts-dev -> kitkat-cts-dev ->
-lollipop-cts-dev -> lollipop-mr1-cts-dev -> marshmallow-cts-dev ->
-nougat-cts-dev -> nougat-mr1-cts-dev -> oreo-cts-dev -> &lt;private-development-branch for Android O MR1&gt;</p>
+lollipop-mr1-cts-dev -> marshmallow-cts-dev ->
+nougat-cts-dev -> nougat-mr1-cts-dev -> oreo-cts-dev -> oreo-mr1-cts-dev -> &lt;private-development-branch for Android P&gt;</p>
<p>If a changelist (CL) fails to merge correctly, the author of the CL will get
an email with instructions on how to resolve the conflict. In most of the
cases, the author of the CL can use the instructions to skip the auto-merge of
the conflicting CL.</p>
+<p>Additionally, if an older branch requires the change, then the CL needs to be
+ cherry-picked from the newer branch.</p>
+
</body>
</html>
diff --git a/en/compatibility/cts/downloads.html b/en/compatibility/cts/downloads.html
index 32413c37..ef52c343 100644
--- a/en/compatibility/cts/downloads.html
+++ b/en/compatibility/cts/downloads.html
@@ -31,115 +31,115 @@ R&lt;number&gt; in the link name.</p>
<h2 id="android-81">Android 8.1</h2>
<p>Android 8.1 is the release of the development milestone code-named Oreo-MR1.
The source code for the following tests can be synced with the
-'android-cts-8.1_r2' tag in the open-source tree.</p>
+'android-cts-8.1_r3' tag in the open-source tree.</p>
<ul>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-8.1_r2-linux_x86-arm.zip">Android
-8.1 R2 Compatibility Test Suite (CTS) - ARM</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-8.1_r3-linux_x86-arm.zip">Android
+8.1 R3 Compatibility Test Suite (CTS) - ARM</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-8.1_r2-linux_x86-x86.zip">Android
-8.1 R2 Compatibility Test Suite (CTS) - x86</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-8.1_r3-linux_x86-x86.zip">Android
+8.1 R3 Compatibility Test Suite (CTS) - x86</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-verifier-8.1_r2-linux_x86-arm.zip">Android
-8.1 R2 CTS Verifier - ARM</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-verifier-8.1_r3-linux_x86-arm.zip">Android
+8.1 R3 CTS Verifier - ARM</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-verifier-8.1_r2-linux_x86-x86.zip">Android
-8.1 R2 CTS Verifier - x86</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-verifier-8.1_r3-linux_x86-x86.zip">Android
+8.1 R3 CTS Verifier - x86</a></li>
</ul>
<h2 id="android-80">Android 8.0</h2>
<p>Android 8.0 is the release of the development milestone code-named Oreo.
The source code for the following tests can be synced with the
-'android-cts-8.0_r6' tag in the open-source tree.</p>
+'android-cts-8.0_r7' tag in the open-source tree.</p>
<ul>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-8.0_r6-linux_x86-arm.zip">Android
-8.0 R6 Compatibility Test Suite (CTS) - ARM</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-8.0_r7-linux_x86-arm.zip">Android
+8.0 R7 Compatibility Test Suite (CTS) - ARM</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-8.0_r6-linux_x86-x86.zip">Android
-8.0 R6 Compatibility Test Suite (CTS) - x86</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-8.0_r7-linux_x86-x86.zip">Android
+8.0 R7 Compatibility Test Suite (CTS) - x86</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-verifier-8.0_r6-linux_x86-arm.zip">Android
-8.0 R6 CTS Verifier - ARM</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-verifier-8.0_r7-linux_x86-arm.zip">Android
+8.0 R7 CTS Verifier - ARM</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-verifier-8.0_r6-linux_x86-x86.zip">Android
-8.0 R6 CTS Verifier - x86</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-verifier-8.0_r7-linux_x86-x86.zip">Android
+8.0 R7 CTS Verifier - x86</a></li>
</ul>
<h2 id="android-71">Android 7.1</h2>
<p>Android 7.1 is the release of the development milestone code-named Nougat-MR1.
The source code for the following tests can be synced with the
-'android-cts-7.1_r14' tag in the open-source tree.</p>
+'android-cts-7.1_r15' tag in the open-source tree.</p>
<ul>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-7.1_r14-linux_x86-arm.zip">Android
-7.1 R14 Compatibility Test Suite (CTS) - ARM</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-7.1_r15-linux_x86-arm.zip">Android
+7.1 R15 Compatibility Test Suite (CTS) - ARM</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-7.1_r14-linux_x86-x86.zip">Android
-7.1 R14 Compatibility Test Suite (CTS) - x86</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-7.1_r15-linux_x86-x86.zip">Android
+7.1 R15 Compatibility Test Suite (CTS) - x86</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-verifier-7.1_r14-linux_x86-arm.zip">Android
-7.1 R14 CTS Verifier - ARM</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-verifier-7.1_r15-linux_x86-arm.zip">Android
+7.1 R15 CTS Verifier - ARM</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-verifier-7.1_r14-linux_x86-x86.zip">Android
-7.1 R14 CTS Verifier - x86</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-verifier-7.1_r15-linux_x86-x86.zip">Android
+7.1 R15 CTS Verifier - x86</a></li>
</ul>
<h2 id="android-70">Android 7.0</h2>
<p>Android 7.0 is the release of the development milestone code-named Nougat.
The source code for the following tests can be synced with the
-'android-cts-7.0_r18' tag in the open-source tree.</p>
+'android-cts-7.0_r19' tag in the open-source tree.</p>
<ul>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-7.0_r18-linux_x86-arm.zip">Android
-7.0 R18 Compatibility Test Suite (CTS) - ARM</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-7.0_r19-linux_x86-arm.zip">Android
+7.0 R19 Compatibility Test Suite (CTS) - ARM</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-7.0_r18-linux_x86-x86.zip">Android
-7.0 R18 Compatibility Test Suite (CTS) - x86</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-7.0_r19-linux_x86-x86.zip">Android
+7.0 R19 Compatibility Test Suite (CTS) - x86</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-verifier-7.0_r18-linux_x86-arm.zip">Android
-7.0 R18 CTS Verifier - ARM</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-verifier-7.0_r19-linux_x86-arm.zip">Android
+7.0 R19 CTS Verifier - ARM</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-verifier-7.0_r18-linux_x86-x86.zip">Android
-7.0 R18 CTS Verifier - x86</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-verifier-7.0_r19-linux_x86-x86.zip">Android
+7.0 R19 CTS Verifier - x86</a></li>
</ul>
<h2 id="android-60">Android 6.0</h2>
<p>Android 6.0 is the release of the development milestone code-named Marshmallow.
The source code for the following tests can be synced with the
-'android-cts-6.0_r26' tag in the open-source tree.</p>
+'android-cts-6.0_r27' tag in the open-source tree.</p>
<ul>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-6.0_r26-linux_x86-arm.zip">Android
-6.0 R26 Compatibility Test Suite (CTS) - ARM</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-6.0_r27-linux_x86-arm.zip">Android
+6.0 R27 Compatibility Test Suite (CTS) - ARM</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-6.0_r26-linux_x86-x86.zip">Android
-6.0 R26 Compatibility Test Suite (CTS) - x86</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-6.0_r27-linux_x86-x86.zip">Android
+6.0 R27 Compatibility Test Suite (CTS) - x86</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-verifier-6.0_r26-linux_x86-arm.zip">Android
-6.0 R26 CTS Verifier - ARM</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-verifier-6.0_r27-linux_x86-arm.zip">Android
+6.0 R27 CTS Verifier - ARM</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-verifier-6.0_r26-linux_x86-x86.zip">Android
-6.0 R26 CTS Verifier - x86</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-verifier-6.0_r27-linux_x86-x86.zip">Android
+6.0 R27 CTS Verifier - x86</a></li>
</ul>
<h2 id="android-51">Android 5.1</h2>
<p>Android 5.1 is the release of the development milestone code-named Lollipop-MR1.
The source code for the following tests can be synced with the
-'android-cts-5.1_r27' tag in the open source tree.</p>
+'android-cts-5.1_r28' tag in the open source tree.</p>
<ul>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-5.1_r27-linux_x86-arm.zip">Android
-5.1 R27 Compatibility Test Suite (CTS) - ARM</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-5.1_r28-linux_x86-arm.zip">Android
+5.1 R28 Compatibility Test Suite (CTS) - ARM</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-5.1_r27-linux_x86-x86.zip">Android
-5.1 R27 Compatibility Test Suite (CTS) - x86</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-5.1_r28-linux_x86-x86.zip">Android
+5.1 R28 Compatibility Test Suite (CTS) - x86</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-verifier-5.1_r27-linux_x86-arm.zip">Android
-5.1 R27 CTS Verifier - ARM</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-verifier-5.1_r28-linux_x86-arm.zip">Android
+5.1 R28 CTS Verifier - ARM</a></li>
<li><a
-href="https://dl.google.com/dl/android/cts/android-cts-verifier-5.1_r27-linux_x86-x86.zip">Android
-5.1 R27 CTS Verifier - x86</a></li>
+href="https://dl.google.com/dl/android/cts/android-cts-verifier-5.1_r28-linux_x86-x86.zip">Android
+5.1 R28 CTS Verifier - x86</a></li>
</ul>
<h2 id="android-50">Android 5.0</h2>
diff --git a/en/compatibility/cts/images/usb_headset.png b/en/compatibility/cts/images/usb_headset.png
index ad21e7ac..4cc8c8cb 100644
--- a/en/compatibility/cts/images/usb_headset.png
+++ b/en/compatibility/cts/images/usb_headset.png
Binary files differ
diff --git a/en/compatibility/cts/usb-audio.html b/en/compatibility/cts/usb-audio.html
index 4ef581d6..bf3c9f7c 100644
--- a/en/compatibility/cts/usb-audio.html
+++ b/en/compatibility/cts/usb-audio.html
@@ -41,25 +41,26 @@ precise manner:
connected to the Android device.</li>
</ul>
-<h2 id="recommended-peripherals">Recommended peripherals</h2>
+<h2 id="recommended-peripherals">Mandated peripherals</h2>
<p>
In order for the USB audio CTS Verifier Tests to know the attributes and
capabilities they are verifying, it is necessary to specify a set of known
peripherals to test against. For this reason, specific brands and types are
-recommended below. Successful completion of the tests requires one peripheral of
+mandated below. Successful completion of the tests requires one peripheral of
each category of peripherals specified below. Use of other types will cause the
tests to fail.
</p>
<h3 id="usb-audio-interface">USB audio interface</h3>
-<p class="note"><strong>Note:</strong> This list is preliminary and subject to change.</p>
+<p>Use one of the peripherals here to conduct the USB Audio Peripheral
+Attributes test, Play test, and Record test:</p>
<ul>
-<li><a href="http://www.presonus.com/products/audiobox-22VSL">Presonus AudioBox
+ <li><a href="http://www.presonus.com/products/audiobox-22VSL">Presonus AudioBox
22VSL</a></li>
-<li><a href="https://www.presonus.com/products/audiobox-usb">Presonus AudioBox
+ <li><a href="https://www.presonus.com/products/audiobox-usb">Presonus AudioBox
USB</a></li>
</ul>
@@ -74,7 +75,33 @@ USB</a></li>
<h3 id="usb-headset">USB headset</h3>
-<p class="note"><strong>Note:</strong> This list is preliminary and subject to change.</p>
+<p>You may use the digital <a
+href="https://www.amazon.com/gp/product/B06VVGR2XM/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1">JBL
+Reflect Aware C in-ear Sport Headphones</a> to conduct the USB Audio Peripheral Play test and Headset
+buttons test without an adapter.</p>
+
+<p>Otherwise, use one of the USB-C digital to 3.5mm audio jack adapters here:
+
+<ul>
+ <li><a href="https://store.google.com/us/product/usb_c_headphone_adapter">Google USB-C
+ digital to 3.5 mm headphone adapter</a></li>
+ <li><a
+ href="https://www.htc.com/us/accessories-b/#!pid=htc-u11&acc=usb-c-digital-to-3-5mm-htc-u11">HTC
+ USB-C digital to 3.5mm audio jack adapter</a></li>
+</ul>
+
+<p>Connect one of the adapters above with one of these Android-compatible
+analog headsets to conduct the USB Audio Peripheral Play test and Headset
+buttons test:</p>
+
+<ul>
+ <li><a
+ href="https://www.bose.com/en_us/products/headphones/earphones/soundsport-in-ear-headphones-samsung-devices.html">Bose
+ SoundSport® in-ear headphones – Samsung and Android™ devices</a></li>
+ <li><a
+ href="https://www.urbanears.com/ue_us_en/reimers#reimers-black-belt">UrbanEars
+ Reimers Black Belt made for Android</a></li>
+</ul>
<table>
<tr>
diff --git a/en/devices/tech/vts/database.html b/en/compatibility/vts/database.html
index e0c285b1..ef11bb41 100644
--- a/en/devices/tech/vts/database.html
+++ b/en/compatibility/vts/database.html
@@ -43,30 +43,28 @@ creating an effective backend for the VTS Dashboard web service.
The following entities store summaries and resources from VTS test runs:
</p>
<ul>
-<li><strong>Test Entity</strong>. The test entity stores metadata
-about test runs of a particular test. Its key is the test name and its
-properties include the failure count, passing count, and list of test case
-breakages from when the alert jobs update it.</li>
-<li><strong>Test Run Entity</strong>. The test run entity contains metadata
-from runs of a particular test. It must store the test start and end timestamps,
-the test build ID, the number of passing and failing test cases, the type of run
-(e.g. pre-submit, post-submit, or local), a list of log links, the host machine
-name, and coverage summary counts.</li>
-<li><strong>Device Information Entity</strong>. Device information entities
-contain details about the devices used during the test run. It includes the
-device build ID, product name, build target, branch, and ABI information. This
-is stored separately from the test run entity to support multi-device test runs
-in a one-to-many fashion.</li>
-<li><strong>Profiling Point Run Entity</strong>. The profiling point run entity
-summarizes the data gathered for a particular profiling point within a test
-run. It describes the axis labels, profiling point name, values, type, and
-regression mode of the profiling data.</li>
-<li><strong>Coverage Entity</strong>. Each coverage entity describes the
-coverage data gathered for one file. It contains the GIT project information,
-file path, and the list of coverage counts per line in the source file.
-<li><strong>Test Case Run Entity</strong>. A test case run describes the outcome
-of a particular test case from a test run, including the test case name and its
-result.</li>
+<li><strong>Test Entity</strong>. Stores metadata about test runs of a
+particular test. Its key is the test name and its properties include the failure
+count, passing count, and list of test case breakages from when the alert jobs
+update it.</li>
+<li><strong>Test Run Entity</strong>. Contains metadata from runs of a
+particular test. It must store the test start and end timestamps, the test build
+ID, the number of passing and failing test cases, the type of run (e.g.
+pre-submit, post-submit, or local), a list of log links, the host machine name,
+and coverage summary counts.</li>
+<li><strong>Device Information Entity</strong>. Contains details about the
+devices used during the test run. It includes the device build ID, product name,
+build target, branch, and ABI information. This is stored separately from the
+test run entity to support multi-device test runs in a one-to-many fashion.</li>
+<li><strong>Profiling Point Run Entity</strong>. Summarizes the data gathered
+for a particular profiling point within a test run. It describes the axis
+labels, profiling point name, values, type, and regression mode of the profiling
+data.</li>
+<li><strong>Coverage Entity</strong>. Describes the coverage data gathered for
+one file. It contains the Git project information, file path, and the list of
+coverage counts per line in the source file.</li>
+<li><strong>Test Case Run Entity</strong>. Describes the outcome of a particular
+test case from a test run, including the test case name and its result.</li>
<li><strong>User Favorites Entity</strong>. Each user subscription can be
represented in an entity containing a reference to the test and the user ID
generated from the App Engine user service. This allows for efficient
@@ -76,20 +74,20 @@ tests favorited by a user).</li>
<h2 id=entity-grouping>Entity grouping</h2>
<p>
-When designing ancestry relationships, you must balance the need to provide
-effective and consistent querying mechanisms against the limitations enforced by
-the database.
+Each test module represents the root of an entity group. Test run entities
+are both children of this group and parents for device entities, profiling point
+entities, and coverage entities relevant to the respective test and test run
+ancestor.
</p>
-<p>
-Each test module will represent the root of an entity group, with test run
-entities as children. Each test run entity is also a parent for device entities,
-profiling point entities, and coverage entities relevant to the respective test
-and test run ancestor.
-</p>
-<img src="../images/treble_vts_dash_entity_ancestry.png">
+<img src="images/treble_vts_dash_entity_ancestry.png">
<figcaption><strong>Figure 1</strong>. Test entity ancestry.</figcaption>
+<p class="key-point"><strong>Key Point:</strong> When designing ancestry
+relationships, you must balance the need to provide effective and consistent
+querying mechanisms against the limitations enforced by the database.
+</p>
+
<h3 id=benefits>Benefits</h3>
<p>
The consistency requirement ensures that future operations will not see the
@@ -119,9 +117,9 @@ test runs usually take at least one minute including the overhead of the VTS
framework; unless a test is consistently being executed simultaneously on more
than 60 different hosts, there cannot be a write bottleneck. This becomes even
more unlikely given that each module is part of a test plan which often takes
-longer than one hour. However, anomalies can easily be handled if hosts run the
-tests at the same time, causing short bursts of writes to the same hosts (e.g.
-by catching write errors and trying again).
+longer than one hour. Anomalies can easily be handled if hosts run the tests at
+the same time, causing short bursts of writes to the same hosts (e.g. by
+catching write errors and trying again).
</p>
<h3 id=scaling>Scaling considerations</h3>
@@ -145,11 +143,11 @@ operative constraints are the write throughput maximum within of an entity group
of one per second, along with a maximum transaction size of 500 entities.
</p>
<p>
-One natural approach would be to specify a test case that has a test run as an
-ancestor (similar to how coverage data, profiling data, and device information
+One approach would be to specify a test case that has a test run as an ancestor
+(similar to how coverage data, profiling data, and device information
are stored):
</p>
-<img src="../images/treble_vts_descend_not.png">
+<img src="images/treble_vts_descend_not.png">
<figcaption><strong>Figure 2</strong>. Test Cases descend from Test Runs (NOT
RECOMMENDED).</figcaption>
@@ -169,7 +167,7 @@ the test cases can be stored independently and their keys provided to the test
run (a test run contains a list of identifiers to its test cases entities):
</p>
-<img src="../images/treble_vts_descend.png">
+<img src="images/treble_vts_descend.png">
<figcaption><strong>Figure 3</strong>. Test Cases stored independently
(RECOMMENDED).</figcaption>
@@ -178,11 +176,8 @@ At first glance, this may appear to break the strong consistency guarantee.
However, if the client has a test run entity and a list of test case
identifiers, it doesn't need to construct a query; it can instead directly get
the test cases by their identifiers, which is always guaranteed to be
-consistent.
-</p>
-<p>
-This approach vastly alleviates the constraint on the number of test cases a
-test run may have while gaining strong consistency without threatening
+consistent. This approach vastly alleviates the constraint on the number of test
+cases a test run may have while gaining strong consistency without threatening
excessive writing within an entity group.
</p>
@@ -191,13 +186,13 @@ excessive writing within an entity group.
The VTS Dashboard uses the following data access patterns:
</p>
<ul>
-<li><strong>User favorites</strong>. User favorites can be queried for by using
-an equality filter on user favorites entities having the particular App Engine
-User object as a property.</li>
-<li><strong>Test listing</strong>. Test listing is a simple query of test
-entities; to reduce bandwidth to render the home page, a projection can be used
-on passing and failing counts so as to omit the potentially long listing of
-failed test case IDs and other metadata used by the alerting jobs.</li>
+<li><strong>User favorites</strong>. Can be queried for by using an equality
+filter on user favorites entities having the particular App Engine User object
+as a property.</li>
+<li><strong>Test listing</strong>. Simple query of test entities. To reduce
+bandwidth to render the home page, a projection can be used on passing and
+failing counts so as to omit the potentially long listing of failed test case
+IDs and other metadata used by the alerting jobs.</li>
<li><strong>Test runs</strong>. Querying for test run entities requires a sort
on the key (timestamp) and possible filtering on the test run properties such as
build ID, passing count, etc. By performing an ancestor query with a test entity
@@ -217,7 +212,7 @@ consistent.</li>
<p>
For details on the UI and screenshots of these data patterns in action, see
-<a href="/devices/architecture/testing/ui.html">VTS Dashboard UI</a>.
+<a href="ui.html">VTS Dashboard UI</a>.
</p>
</body>
diff --git a/en/devices/tech/images/treble_latency_bubble.png b/en/compatibility/vts/images/treble_latency_bubble.png
index d0337ddd..d0337ddd 100644
--- a/en/devices/tech/images/treble_latency_bubble.png
+++ b/en/compatibility/vts/images/treble_latency_bubble.png
Binary files differ
diff --git a/en/devices/tech/images/treble_priority_inv_rta.png b/en/compatibility/vts/images/treble_priority_inv_rta.png
index 57df8f5b..57df8f5b 100644
--- a/en/devices/tech/images/treble_priority_inv_rta.png
+++ b/en/compatibility/vts/images/treble_priority_inv_rta.png
Binary files differ
diff --git a/en/devices/tech/images/treble_priority_inv_rta_blocked.png b/en/compatibility/vts/images/treble_priority_inv_rta_blocked.png
index fa21c958..fa21c958 100644
--- a/en/devices/tech/images/treble_priority_inv_rta_blocked.png
+++ b/en/compatibility/vts/images/treble_priority_inv_rta_blocked.png
Binary files differ
diff --git a/en/devices/tech/images/treble_systrace_binder_processes.png b/en/compatibility/vts/images/treble_systrace_binder_processes.png
index a2aefa59..a2aefa59 100644
--- a/en/devices/tech/images/treble_systrace_binder_processes.png
+++ b/en/compatibility/vts/images/treble_systrace_binder_processes.png
Binary files differ
diff --git a/en/devices/tech/images/treble_vts_dash_arch.png b/en/compatibility/vts/images/treble_vts_dash_arch.png
index 14d5f9bb..14d5f9bb 100644
--- a/en/devices/tech/images/treble_vts_dash_arch.png
+++ b/en/compatibility/vts/images/treble_vts_dash_arch.png
Binary files differ
diff --git a/en/devices/tech/images/treble_vts_dash_entity_ancestry.png b/en/compatibility/vts/images/treble_vts_dash_entity_ancestry.png
index 5b639376..5b639376 100644
--- a/en/devices/tech/images/treble_vts_dash_entity_ancestry.png
+++ b/en/compatibility/vts/images/treble_vts_dash_entity_ancestry.png
Binary files differ
diff --git a/en/devices/tech/images/treble_vts_descend.png b/en/compatibility/vts/images/treble_vts_descend.png
index 00b1b0ad..00b1b0ad 100644
--- a/en/devices/tech/images/treble_vts_descend.png
+++ b/en/compatibility/vts/images/treble_vts_descend.png
Binary files differ
diff --git a/en/devices/tech/images/treble_vts_descend_not.png b/en/compatibility/vts/images/treble_vts_descend_not.png
index c84a8da0..c84a8da0 100644
--- a/en/devices/tech/images/treble_vts_descend_not.png
+++ b/en/compatibility/vts/images/treble_vts_descend_not.png
Binary files differ
diff --git a/en/devices/tech/images/treble_vts_ui_coverage.png b/en/compatibility/vts/images/treble_vts_ui_coverage.png
index d4363a25..d4363a25 100644
--- a/en/devices/tech/images/treble_vts_ui_coverage.png
+++ b/en/compatibility/vts/images/treble_vts_ui_coverage.png
Binary files differ
diff --git a/en/devices/tech/images/treble_vts_ui_coverage_source.png b/en/compatibility/vts/images/treble_vts_ui_coverage_source.png
index f3580a80..f3580a80 100644
--- a/en/devices/tech/images/treble_vts_ui_coverage_source.png
+++ b/en/compatibility/vts/images/treble_vts_ui_coverage_source.png
Binary files differ
diff --git a/en/devices/tech/images/treble_vts_ui_favorites.png b/en/compatibility/vts/images/treble_vts_ui_favorites.png
index bc875627..bc875627 100644
--- a/en/devices/tech/images/treble_vts_ui_favorites.png
+++ b/en/compatibility/vts/images/treble_vts_ui_favorites.png
Binary files differ
diff --git a/en/devices/tech/images/treble_vts_ui_histogram.png b/en/compatibility/vts/images/treble_vts_ui_histogram.png
index b25f5a25..b25f5a25 100644
--- a/en/devices/tech/images/treble_vts_ui_histogram.png
+++ b/en/compatibility/vts/images/treble_vts_ui_histogram.png
Binary files differ
diff --git a/en/devices/tech/images/treble_vts_ui_main.png b/en/compatibility/vts/images/treble_vts_ui_main.png
index f68ab2b9..f68ab2b9 100644
--- a/en/devices/tech/images/treble_vts_ui_main.png
+++ b/en/compatibility/vts/images/treble_vts_ui_main.png
Binary files differ
diff --git a/en/devices/tech/images/treble_vts_ui_performance.png b/en/compatibility/vts/images/treble_vts_ui_performance.png
index 67f6da2d..67f6da2d 100644
--- a/en/devices/tech/images/treble_vts_ui_performance.png
+++ b/en/compatibility/vts/images/treble_vts_ui_performance.png
Binary files differ
diff --git a/en/devices/tech/images/treble_vts_ui_results.png b/en/compatibility/vts/images/treble_vts_ui_results.png
index 9996b469..9996b469 100644
--- a/en/devices/tech/images/treble_vts_ui_results.png
+++ b/en/compatibility/vts/images/treble_vts_ui_results.png
Binary files differ
diff --git a/en/devices/tech/vts/index.html b/en/compatibility/vts/index.html
index 510c1200..4f3dba45 100644
--- a/en/devices/tech/vts/index.html
+++ b/en/compatibility/vts/index.html
@@ -28,24 +28,24 @@ Android testing and promotes a test-driven development process. To help the
Android development community interact with test data, Android O includes the
following testing resources:</p>
<ul>
-<li><a href="/devices/tech/test_infra/tradefed/fundamentals/vts.html">Systems
+<li><a href="systems.html">Systems
Testing with VTS</a>. Describes how to use VTS to test an Android native system
implementation, set up a testing environment, then test a patch using a VTS
plan.</li>
<li><strong>VTS Dashboard</strong>. Web-based user interface for viewing VTS
results. Includes details on:
<ul>
- <li><a href="/devices/tech/vts/database.html">Dashboard
+ <li><a href="database.html">Dashboard
database</a>. A scalable back-end to support the continuous integration
dashboard.</li>
- <li><a href="/devices/tech/vts/ui.html">Dashboard UI</a>. A
+ <li><a href="ui.html">Dashboard UI</a>. A
cohesive user interface that uses material design to effectively display
information about test results, profiling, and coverage.</li>
- <li><a href="/devices/tech/vts/setup.html">Dashboard setup</a>.
+ <li><a href="setup.html">Dashboard setup</a>.
Instructions for setting up and configuring the VTS Dashboard.</li>
</ul>
</li>
-<li><a href="/devices/tech/vts/performance.html">binder and hwbinder
+<li><a href="performance.html">binder and hwbinder
performance tests</a>. Tools for measuring throughput and latency.</li>
</ul>
diff --git a/en/devices/tech/vts/performance.html b/en/compatibility/vts/performance.html
index 0f05b234..b8022dd1 100644
--- a/en/devices/tech/vts/performance.html
+++ b/en/compatibility/vts/performance.html
@@ -22,7 +22,7 @@
-->
-<p>Android O includes binder and hwbinder performance tests for throughput and
+<p>Android 8.0 includes binder and hwbinder performance tests for throughput and
latency. While many scenarios exist for detecting perceptible performance
problems, running such scenarios can be time consuming and results are often
unavailable until after a system is integrated. Using the provided performance
@@ -88,7 +88,7 @@ Parcel serialization</td>
<h3 id=transactions>Binder and hwbinder processes</h2>
<p>A systrace visualizer displays transactions as follows:</p>
-<img src="../images/treble_systrace_binder_processes.png">
+<img src="images/treble_systrace_binder_processes.png">
<figcaption><strong>Figure 1.</strong> Systrace visualization of binder
processes.</figcaption>
@@ -114,7 +114,7 @@ messages. However, when the OS kernel is handling an interrupt request (IRQ)
from hardware, waiting for locks, or simply choosing not to handle a message
immediately, a latency bubble can form.</p>
-<img src="../images/treble_latency_bubble.png">
+<img src="images/treble_latency_bubble.png">
<figcaption><strong>Figure 2.</strong> Latency bubble due to differences in
throughput and latency.</figcaption>
@@ -132,7 +132,7 @@ transactions whose latency meets a specified deadline.</p>
waiting for a thread with lower priority. Real-time (RT) applications have a
priority inversion problem:</p>
-<img src="../images/treble_priority_inv_rta.png">
+<img src="images/treble_priority_inv_rta.png">
<figcaption><strong>Figure 3.</strong> Priority inversion in real-time
applications.</figcaption>
@@ -146,7 +146,7 @@ must be resolved.</p>
<p>Example priority inversion during a binder transaction (RT thread is
logically blocked by other CFS threads when waiting for a binder thread to
service):</p>
-<img src="../images/treble_priority_inv_rta_blocked.png">
+<img src="images/treble_priority_inv_rta_blocked.png">
<figcaption><strong>Figure 4.</strong> Priority inversion, blocked real-time
threads.</figcaption>
@@ -457,16 +457,16 @@ userdebug mode.</li>
<li><strong>Framework</strong>. How does the framework service use
<code>ioctl</code> to config to the binder?</li>
<li><strong>Binder driver</strong>. Does the driver support fine-grained
-locking? Does the driver contain all performance turning patches?
+locking? Does it contain all performance turning patches?</li>
<li><strong>Kernel version</strong>. The better real time capability the kernel
has, the better the results.</li>
<li><strong>Kernel config</strong>. Does the kernel config contain
<code>DEBUG</code> configs such as <code>DEBUG_PREEMPT</code> and
<code>DEBUG_SPIN_LOCK</code>?</li>
<li><strong>Kernel scheduler</strong>. Does the kernel have an Energy-Aware
-scheduler (EAS) or Heterogeneous Multi-Processing (HMP) scheduler? Are there
-kernel drivers (<code>cpu-freq</code> driver, <code>cpu-idle</code> driver,
-<code>cpu-hotplug</code>, etc.) that impact the scheduler?</li>
+scheduler (EAS) or Heterogeneous Multi-Processing (HMP) scheduler? Do any kernel
+drivers (<code>cpu-freq</code> driver, <code>cpu-idle</code> driver,
+<code>cpu-hotplug</code>, etc.) impact the scheduler?</li>
</ul>
</body>
diff --git a/en/devices/tech/vts/setup.html b/en/compatibility/vts/setup.html
index 79bc79d7..0b2fa1c6 100644
--- a/en/devices/tech/vts/setup.html
+++ b/en/compatibility/vts/setup.html
@@ -22,19 +22,17 @@
-->
<p>
-The VTS Dashboard provides a user backend and user interface for viewing test
-results from the VTS continuous integration system. It supports test-driven
+The VTS Dashboard provides a user backend and user interface (UI) for viewing
+test results from the VTS continuous integration system. It supports test-driven
development with tools such as test status notifications to help developers to
locate and prevent regression areas during the development cycle (include test
-monitoring and
-triaging support).
+monitoring and triaging support).
</p>
<p>
-The user interface supports new features (such as native code coverage) provided
-by the VTS infrastructure and enables the development of tools with optimized
-and well-characterized performance by offering continuous performance
-monitoring.
+The VTS Dashboard UI supports features (such as native code coverage) provided
+by the VTS infrastructure and offers continuous performance monitoring to enable
+the development of optimized and well-characterized performance tools.
</p>
<h2 id=requirements>Requirements</h2>
@@ -42,28 +40,27 @@ monitoring.
The following services are required to use the VTS Dashboard:
</p>
<ul>
-<li><a href="https://maven.apache.org/">Apache Maven</a>, for building and
-deployment</li>
-<li><a href="https://cloud.google.com/appengine">Google Cloud App Engine</a>,
-for web-service hosting</li>
-<li><a href="https://cloud.google.com/datastore/docs/">Google Cloud
-Datastore</a>, for storage</li>
-<li><a href="http://www.stackdriver.com/">Google Stackdriver</a>, for
-monitoring</li>
+<li><a href="https://maven.apache.org/" class="external">Apache Maven</a>, for
+building and deployment</li>
+<li><a href="https://cloud.google.com/appengine" class="external">Google Cloud
+App Engine</a>, for web-service hosting</li>
+<li><a href="https://cloud.google.com/datastore/docs/" class="external">Google
+Cloud Datastore</a>, for storage</li>
+<li><a href="http://www.stackdriver.com/" class="external">Google
+Stackdriver</a>, for monitoring</li>
</ul>
<p>
-Viewing <a href="/devices/architecture/testing/ui.html#coverage">test
-coverage</a> relies on a REST API to a source code server (e.g. Gerrit), which
-enables the web service to fetch original source code according to existing
-access control lists.
+Viewing <a href="ui.html#coverage">test coverage</a> relies on a REST API to a
+source code server (e.g. Gerrit), which enables the web service to fetch
+original source code according to existing access control lists.
</p>
<h2 id=arch>Architecture</h2>
<p>
The VTS Dashboard uses the following architecture:
</p>
-<img src="../images/treble_vts_dash_arch.png" title="VTS Dashboard Architecture">
+<img src="images/treble_vts_dash_arch.png" title="VTS Dashboard Architecture">
<figcaption><strong>Figure 1</strong>. VTS Dashboard architecture.</figcaption>
<p>
@@ -138,8 +135,8 @@ the notifications service).</li>
To set up the VTS Dashboard:
</p>
<ol>
-<li>Create a Google Cloud App Engine Project.</li>
-<li>Set up the deployment host by installing:
+<li>Create a Google Cloud App Engine Project and set up the deployment host by
+ installing:
<ul>
<li>Java 8</li>
<li>Google App Engine SDK</li>
@@ -148,18 +145,19 @@ To set up the VTS Dashboard:
</li>
<li>Generate an OAuth 2.0 Client ID in the Google Cloud API Manager.</li>
<li>Create a Service Account and create a keyfile.</li>
-<li>Add an email address to the App Engine Email API Authorized Senders List.</li>
+<li>Add an email address to the App Engine Email API Authorized Senders List.
+</li>
<li>Set up a Google Analytics Account.</li>
<li>Specify environment variables in the Dashboard <code>pom.xml</code>:
<ul>
- <li>Set the client ID with the OAuth 2.0 ID (from step 3).</li>
+ <li>Set the client ID with the OAuth 2.0 ID (from step 2).</li>
<li>Set the service client ID with the identifier included in the keyfile (from
- step 4).</li>
- <li>Specify the sender email address for alerts (from step 5).</li>
+ step 3).</li>
+ <li>Specify the sender email address for alerts (from step 4).</li>
<li>Specify an email domain to which all emails will be sent.</li>
<li>Specify the address to the Gerrit REST server.</li>
<li>Specify the OAuth 2.0 scope to use for the Gerrit REST server.</li>
- <li>Specify the Google Analytics ID (from step 6).</li>
+ <li>Specify the Google Analytics ID (from step 5).</li>
<li>Build and deploy the project.</li>
</ul>
</li>
@@ -168,8 +166,8 @@ To set up the VTS Dashboard:
<p>
For more information regarding Dashboard setup and configuration, refer to the
-<a href="https://codelabs.developers.google.com/codelabs/android-vts">Android
-VTS Code Lab</a>.
+<a href="https://codelabs.developers.google.com/codelabs/android-vts"
+class="external">Android VTS Code Lab</a>.
</p>
<h2 id=security>Security considerations</h2>
@@ -181,17 +179,18 @@ for exploitation of existing access control lists.
<p>
To avoid this threat, instead of serving the source code with the coverage
information, the Dashboard directly handles a coverage vector (i.e., a vector of
-execution counts mapping to the lines in a source file). Along with the coverage
-vector, the Dashboard receives a Git project name and path so that the client
-can fetch the code from an external source code API. The client browser receives
+execution counts mapping to lines in a source file). Along with the coverage
+vector, the Dashboard receives a Git project name and path so the client can
+fetch the code from an external source code API. The client browser receives
this information and uses cross-origin resource sharing (CORS) in Javascript to
query the source code server for the original source code; the resulting code is
combined with the coverage vector to produce a display.
</p>
<p>
-This approach does not widen the attack surface because the Dashboard uses the
-user's cookies to authenticate with an outside service. A user who cannot access
-source code directly cannot exploit the Dashboard to view sensitive information.
+This direct approach does not widen the attack surface because the Dashboard
+uses the user's cookies to authenticate with an outside service (meaning a user
+who cannot access source code directly cannot exploit the Dashboard to view
+sensitive information).
</p>
</body>
diff --git a/en/compatibility/vts/systems.html b/en/compatibility/vts/systems.html
new file mode 100644
index 00000000..8ba912d8
--- /dev/null
+++ b/en/compatibility/vts/systems.html
@@ -0,0 +1,106 @@
+<html devsite>
+ <head>
+ <title>Systems Testing With VTS</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>The Vendor Test Suite (VTS) automates HAL and OS kernel testing. To use VTS
+to test an Android native system implementation, set up a testing environment
+then test a patch using a VTS plan.</p>
+
+<h2 id="establish">Establishing a test environment</h2>
+<p>To set up a testing environment:</p>
+<ol>
+<li>Install Python development kit:
+<pre class="devsite-terminal devsite-click-to-copy">
+sudo apt-get install python-dev
+</pre>
+</li>
+<li>Install Protocol Buffer tools (for Python):
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">sudo apt-get install python-protobuf</code>
+<code class="devsite-terminal">sudo apt-get install protobuf-compiler</code>
+</pre>
+</li>
+<li>Install Python virtual environment-related tools:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">sudo apt-get install python-virtualenv</code>
+<code class="devsite-terminal">sudo apt-get install python-pip</code>
+</pre>
+</li>
+</ol>
+
+<h2 id="test">Testing a patch</h2>
+<p>To test a patch:</p>
+<ol>
+<li>Build a VTS host-side package:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">. build/envsetup.sh</code>
+<code class="devsite-terminal">lunch aosp_arm64-userdebug</code>
+<code class="devsite-terminal">make vts -j</code>
+</pre>
+</li>
+<li>Run the default VTS tests:
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">vts-tradefed</code>
+tf&gt; run vts // where vts is the test plan name
+</pre>
+</li>
+</ol>
+
+<h2 id="plans">VTS plans</h2>
+<p>Available VTS test plans include:</p>
+
+<table>
+<thead>
+<tr>
+<th>Command</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>&gt; run vts</td>
+<td>For default VTS tests</td>
+</tr>
+<tr>
+<td>&gt; run vts-hal</td>
+<td>For default VTS HAL (hardware abstraction layer) tests</td>
+</tr>
+<tr>
+<td>&gt; run vts-kernel</td>
+<td>For default VTS kernel tests</td>
+</tr>
+</tbody>
+</table>
+
+<p>To view a list of all plans, refer to
+<code><a href="https://android.googlesource.com/platform/test/vts/+/master/tools/vts-tradefed/res/config/plans.md">/test/vts/tools/vts-tradefed/res/config.md</a></code>.</p>
+
+<h2 id="support">Support</h2>
+<p>You can view a user manual at
+<code><a href=" https://android.googlesource.com/platform/test/vts/+/master/README.md">/test/vts/doc</a></code>.
+For questions on VTS, please join
+<a href="https://groups.google.com/forum/#!forum/android-vts">android-vts@googlegroups.com</a>.</p>
+
+ </body>
+</html>
diff --git a/en/devices/tech/vts/ui.html b/en/compatibility/vts/ui.html
index 775ab372..a3894f59 100644
--- a/en/devices/tech/vts/ui.html
+++ b/en/compatibility/vts/ui.html
@@ -35,7 +35,7 @@ Engine.
The Dashboard home page displays a list of test suites a user has added to
favorites.
</p>
-<img src="../images/treble_vts_ui_main.png" title="VTS Dashboard landing page">
+<img src="images/treble_vts_ui_main.png" title="VTS Dashboard landing page">
<figcaption><strong>Figure 1.</strong> VTS Dashboard, home page.</figcaption>
<p>
@@ -44,8 +44,8 @@ From this list, users can:
<ul>
<li>Select a test suite to view results for that suite.
<li>Click <strong>SHOW ALL</strong> to view all VTS test names.
-<li>Select the <strong>Edit</strong> icon to modify the Favorites list.
-<img src="../images/treble_vts_ui_favorites.png" title="VTS Dashboard favorites">
+<li>Select the <strong>Edit</strong> icon to modify the Favorites list.<br>
+<img src="images/treble_vts_ui_favorites.png" title="VTS Dashboard favorites">
<figcaption><strong>Figure 2.</strong> VTS Dashboard, editing Favorites
page.</figcaption></li>
</ul>
@@ -58,7 +58,7 @@ chronological order, and a pie chart displaying the result breakdown of the
latest run (users can load older data by paging right).
</p>
-<img src="../images/treble_vts_ui_results.png" title="VTS Dashboard results">
+<img src="images/treble_vts_ui_results.png" title="VTS Dashboard results">
<figcaption><strong>Figure 3.</strong> VTS Dashboard, test results.</figcaption>
<p>
@@ -77,7 +77,7 @@ quantitative data for that point in a <strong>line graph</strong> or
<strong>histogram</strong> (examples below). By default, the view displays the
latest information; users can use the date picker to load specific time windows.
</p>
-<img src="../images/treble_vts_ui_performance.png" title="VTS Dashboard performance">
+<img src="images/treble_vts_ui_performance.png" title="VTS Dashboard performance">
<figcaption><strong>Figure 4.</strong> VTS Dashboard, line graph performance.
</figcaption>
<p>
@@ -86,14 +86,15 @@ which can be useful when a test of performance produces a vector of performance
values that vary as a function of another variable (e.g., throughput versus
message size).
</p>
-<img src="../images/treble_vts_ui_histogram.png" title="VTS Dashboard histogram">
+<img src="images/treble_vts_ui_histogram.png" title="VTS Dashboard histogram">
<figcaption><strong>Figure 5.</strong> VTS Dashboard, histogram performance.</figcaption>
<h2 id=coverage>Test coverage</h2>
<p>
Users can view coverage information from the coverage percent link in test
results.
-<img src="../images/treble_vts_ui_coverage.png" title="VTS Dashboard coverage">
+</p>
+<img src="images/treble_vts_ui_coverage.png" title="VTS Dashboard coverage">
<figcaption>
<strong>Figure 6.</strong> VTS Dashboard, coverage percentages.</figcaption>
@@ -102,7 +103,7 @@ For each test case and source file, users can view an expandable element
containing color-coded source code according to the coverage provided by the
selected test:
</p>
-<img src="../images/treble_vts_ui_coverage_source.png" title="VTS Dashboard coverage_source">
+<img src="images/treble_vts_ui_coverage_source.png" title="VTS Dashboard coverage_source">
<figcaption>
<strong>Figure 7.</strong> VTS Dashboard, coverage source code.</figcaption>
@@ -126,8 +127,8 @@ header is present: "Coverage: All".</li>
<p>
The Dashboard fetches source code client-side from a server, which uses the
open-source
-<a href="https://gerrit-review.googlesource.com/Documentation/rest-api.html">Gerrit
-REST API</a>.
+<a href="https://gerrit-review.googlesource.com/Documentation/rest-api.html"
+class="external">Gerrit REST API</a>.
</p>
<h2 id=monitor>Monitoring &amp; testing</h2>
@@ -149,12 +150,10 @@ Google App Engine to provide easy monitoring of the VTS Dashboard. Simple uptime
checks verify pages can be accessed while other tests can be created to verify
latency on each page, servlet, or database. These checks ensure the Dashboard is
always accessible (else an administrator will be notified).</li>
-<li><strong>Analytics</strong>. Each page on the VTS Dashboard supports
-integration with Google Cloud Analytics, provided that an Analytics ID is
-specified in the configuration. This provides more robust analysis of page
-usage, user interaction, locality, session statistics, etc. By simply providing
-the valid ID in the pom.xml file, analytics are automatically
-provided.</li>
+<li><strong>Analytics</strong>. You can integrate a VTS Dashboard page with
+Google Cloud Analytics by specifying a valid Analytics ID in the page
+configuration (the pom.xml file). Integration provides a more robust analysis of
+page usage, user interaction, locality, session statistics, etc.</li>
</ul>
</body>
diff --git a/en/devices/_toc-tech.yaml b/en/devices/_toc-tech.yaml
index 77e2419f..c30d4570 100644
--- a/en/devices/_toc-tech.yaml
+++ b/en/devices/_toc-tech.yaml
@@ -260,18 +260,4 @@ toc:
- title: An End-to-End Example
path: /devices/tech/test_infra/tradefed/full_example
- title: Package Index
- path: /reference/tradefed/
-- title: Vendor Test Suite (VTS)
- section:
- - title: Overview
- path: /devices/tech/vts/
- - title: Systems Testing with VTS
- path: /devices/tech/test_infra/tradefed/fundamentals/vts
- - title: VTS Dashboard Setup
- path: /devices/tech/vts/setup
- - title: VTS Dashboard Database
- path: /devices/tech/vts/database
- - title: VTS Dashboard UI
- path: /devices/tech/vts/ui
- - title: Performance Testing
- path: /devices/tech/vts/performance
+ path: /reference/tradefed/ \ No newline at end of file
diff --git a/en/devices/tech/connect/data-saver.html b/en/devices/tech/connect/data-saver.html
index e9624295..32e3d6aa 100644
--- a/en/devices/tech/connect/data-saver.html
+++ b/en/devices/tech/connect/data-saver.html
@@ -48,7 +48,9 @@ ensures desired background data exchange when Data Saver is on per user control.
<p>
Since the Data Saver is a feature in the platform, device manufacturers gain its
-functionality by default with the N release.
+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>
</p>
<h3 id="settings-interface">Settings interface</h3>
diff --git a/en/security/_toc.yaml b/en/security/_toc.yaml
index a48fdf29..b24dd01b 100644
--- a/en/security/_toc.yaml
+++ b/en/security/_toc.yaml
@@ -9,6 +9,8 @@ toc:
path: /security/overview/implement
- title: Updates and Resources
path: /security/overview/updates-resources
+- title: Reports
+ path: /security/overview/reports
- title: Enhancements
section:
- title: Overview
diff --git a/en/security/bulletin/2018-03-01.html b/en/security/bulletin/2018-03-01.html
index f269f461..b50f6331 100644
--- a/en/security/bulletin/2018-03-01.html
+++ b/en/security/bulletin/2018-03-01.html
@@ -20,7 +20,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<p><em>Published March 5, 2018</em></p>
+<p><em>Published March 5, 2018 | Updated March 7, 2018</em></p>
<p>
The Android Security Bulletin contains details of security vulnerabilities
@@ -31,9 +31,9 @@ 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.
+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
@@ -115,42 +115,52 @@ a privileged process.</p>
</tr>
<tr>
<td>CVE-2017-13248</td>
- <td>A-70349612</td>
+ <td><a href="https://android.googlesource.com/platform/external/libmpeg2/+/0ad7e37ac954dc3ae8b739439a8d9cf645a46a10">
+ A-70349612</a></td>
<td>RCE</td>
<td>Critical</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-13249</td>
- <td>A-70399408</td>
+ <td><a href="https://android.googlesource.com/platform/external/libmpeg2/+/9449ef411f32e2948190f9451726eb558996e8d3">
+ A-70399408</a></td>
<td>RCE</td>
<td>Critical</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-13250</td>
- <td>A-71375536</td>
+ <td><a href="https://android.googlesource.com/platform/external/libavc/+/a7f41c5d3425dbd89da38a4aa8398cf7351406e8">
+ A-71375536</a>
+ </td>
<td>RCE</td>
<td>Critical</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-13251</td>
- <td>A-69269702</td>
- <td>EoP</td>
+ <td><a href="https://android.googlesource.com/platform/external/libmpeg2/+/5687dbe62b2785d1b037336eb07e96ab81bddaea">
+ A-69269702</a>
+ </td>
+ <td>EoP</td>
<td>Critical</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-13252</td>
- <td>A-70526702</td>
+ <td><a href="https://android.googlesource.com/platform/frameworks/av/+/86141f9df21cb8ac91f9cc9804f5b75d26d98996">
+ A-70526702</a>
+ </td>
<td>EoP</td>
<td>High</td>
<td>8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13253</td>
- <td>A-71389378</td>
+ <td><a href="https://android.googlesource.com/platform/frameworks/av/+/871412cfa05770cfd8be0a130b68386775445057">
+ A-71389378</a>
+ </td>
<td>EoP</td>
<td>High</td>
<td>8.0, 8.1</td>
@@ -178,70 +188,90 @@ process.</p>
</tr>
<tr>
<td>CVE-2017-13255</td>
- <td>A-68776054</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/f0edf6571d2d58e66ee0b100ebe49c585d31489f">
+ A-68776054</a></td>
<td>RCE</td>
<td>Critical</td>
<td>5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13256</td>
- <td>A-68817966</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/f0edf6571d2d58e66ee0b100ebe49c585d31489f">
+ A-68817966</a>
+ </td>
<td>RCE</td>
<td>Critical</td>
<td>5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13272</td>
- <td>A-67110137</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/935ee775421e0c8a14f26669d9ab99f110ceb7d5">
+ A-67110137</a>
+ [<a href="https://android.googlesource.com/platform/system/bt/+/ec16f7d8c7e359a68ffe6b76e88add2210bf2cbd">2</a>]</td>
<td>RCE</td>
<td>Critical</td>
<td>7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13266</td>
- <td>A-69478941</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/2f2043f18463a5c963c138d24346870b1066e7a6">
+ A-69478941</a>
+ </td>
<td>RCE</td>
<td>Critical</td>
<td>5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13257</td>
- <td>A-67110692</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/08e68337a9eb45818d5a770570c8b1d15a14d904">
+ A-67110692</a>
+ </td>
<td>ID</td>
<td>High</td>
<td>5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13258</td>
- <td>A-67863755</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/a50e70468c0a8d207e416e273d05a08635bdd45f">
+ A-67863755</a>
+ </td>
<td>ID</td>
<td>High</td>
<td>5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13259</td>
- <td>A-68161546</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/0627e76edefd948dc3efe11564d7e53d56aac80c">
+ A-68161546</a>
+ [<a href="https://android.googlesource.com/platform/system/bt/+/1313abd1761c39e8619a77964f8c42e3e72b5fee">2</a>]
+ </td>
<td>ID</td>
<td>High</td>
<td>5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13260</td>
- <td>A-69177251</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/a50e70468c0a8d207e416e273d05a08635bdd45f">
+ A-69177251</a>
+ </td>
<td>ID</td>
<td>High</td>
<td>5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13261</td>
- <td>A-69177292</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/a50e70468c0a8d207e416e273d05a08635bdd45f">
+ A-69177292</a>
+ </td>
<td>ID</td>
<td>High</td>
<td>5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13262</td>
- <td>A-69271284</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/a50e70468c0a8d207e416e273d05a08635bdd45f">
+ A-69271284</a>
+ </td>
<td>ID</td>
<td>High</td>
<td>5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
@@ -282,8 +312,7 @@ process.</p>
<tr>
<td>CVE-2017-16530</td>
<td>A-69051940<br />
- <a
-href="https://github.com/torvalds/linux/commit/786de92b3cb26012d3d0f00ee37adf14527f35c4">
+ <a href="https://github.com/torvalds/linux/commit/786de92b3cb26012d3d0f00ee37adf14527f35c4">
Upstream kernel</a></td>
<td>EoP</td>
<td>High</td>
@@ -292,8 +321,7 @@ Upstream kernel</a></td>
<tr>
<td>CVE-2017-16525</td>
<td>A-69050921<br />
- <a
-href="https://github.com/torvalds/linux/commit/299d7572e46f98534033a9e65973f13ad1ce9047">
+ <a href="https://github.com/torvalds/linux/commit/299d7572e46f98534033a9e65973f13ad1ce9047">
Upstream kernel</a></td>
<td>EoP</td>
<td>High</td>
@@ -302,8 +330,7 @@ Upstream kernel</a></td>
<tr>
<td>CVE-2017-16535</td>
<td>A-69052675<br />
- <a
-href="https://github.com/torvalds/linux/commit/1c0edc3633b56000e18d82fc241e3995ca18a69e">
+ <a href="https://github.com/torvalds/linux/commit/1c0edc3633b56000e18d82fc241e3995ca18a69e">
Upstream kernel</a></td>
<td>ID</td>
<td>High</td>
@@ -312,8 +339,7 @@ Upstream kernel</a></td>
<tr>
<td>CVE-2017-16533</td>
<td>A-69052348<br />
- <a
-href="https://github.com/torvalds/linux/commit/f043bfc98c193c284e2cd768fefabe18ac2fed9b">
+ <a href="https://github.com/torvalds/linux/commit/f043bfc98c193c284e2cd768fefabe18ac2fed9b">
Upstream kernel</a></td>
<td>ID</td>
<td>High</td>
@@ -322,8 +348,7 @@ Upstream kernel</a></td>
<tr>
<td>CVE-2017-16531</td>
<td>A-69052055<br />
- <a
-href="https://github.com/torvalds/linux/commit/bd7a3fe770ebd8391d1c7d072ff88e9e76d063eb">
+ <a href="https://github.com/torvalds/linux/commit/bd7a3fe770ebd8391d1c7d072ff88e9e76d063eb">
Upstream kernel</a></td>
<td>ID</td>
<td>High</td>
@@ -332,8 +357,7 @@ Upstream kernel</a></td>
<tr>
<td>CVE-2017-16529</td>
<td>A-69051731<br />
- <a
-href="https://github.com/torvalds/linux/commit/bfc81a8bc18e3c4ba0cbaa7666ff76be2f998991">
+ <a href="https://github.com/torvalds/linux/commit/bfc81a8bc18e3c4ba0cbaa7666ff76be2f998991">
Upstream kernel</a></td>
<td>ID</td>
<td>High</td>
@@ -400,10 +424,9 @@ a privileged process.</p>
<tr>
<td>CVE-2017-18067</td>
<td>A-68992411<br />
- <a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=e1e9d0cb8a0bc33965d112725e205a78aab82986">
-QC-CR#2081734</a> [<a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/prima/commit/?id=4201fc6c8c7eb7dddcfb7f06b5f1012d7c5cf451">2</a>]</td>
+ <a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=e1e9d0cb8a0bc33965d112725e205a78aab82986">
+QC-CR#2081734</a>
+ [<a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/prima/commit/?id=4201fc6c8c7eb7dddcfb7f06b5f1012d7c5cf451">2</a>]</td>
<td>RCE</td>
<td>Critical</td>
<td>Wireless network driver</td>
@@ -411,8 +434,7 @@ href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan
<tr>
<td>CVE-2017-15815</td>
<td>A-68992395<br />
- <a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=a5096157fd80350a0e0409e7ad96265ae60861f6">
+ <a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=a5096157fd80350a0e0409e7ad96265ae60861f6">
QC-CR#2093392</a></td>
<td>RCE</td>
<td>Critical</td>
@@ -421,8 +443,7 @@ QC-CR#2093392</a></td>
<tr>
<td>CVE-2017-18068</td>
<td>A-70799990<br />
- <a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=b91ad6cf984a48ad52fe5af13cb3e0ac4bf012ed">
+ <a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=b91ad6cf984a48ad52fe5af13cb3e0ac4bf012ed">
QC-CR#2072064</a></td>
<td>EoP</td>
<td>High</td>
@@ -431,8 +452,7 @@ QC-CR#2072064</a></td>
<tr>
<td>CVE-2017-18056</td>
<td>A-70237692<br />
- <a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-2.0/commit/?id=67cfe475cb8ea3dfa86c68fca536b4ddb5168e9d">
+ <a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-2.0/commit/?id=67cfe475cb8ea3dfa86c68fca536b4ddb5168e9d">
QC-CR#2119404</a></td>
<td>EoP</td>
<td>High</td>
@@ -441,8 +461,7 @@ QC-CR#2119404</a></td>
<tr>
<td>CVE-2017-18063</td>
<td>A-68992442<br />
- <a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=b9c0beac8f021f774f39df54e1f96fd87c2660f0">
+ <a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=b9c0beac8f021f774f39df54e1f96fd87c2660f0">
QC-CR#2114776</a></td>
<td>EoP</td>
<td>High</td>
@@ -451,8 +470,7 @@ QC-CR#2114776</a></td>
<tr>
<td>CVE-2017-18064</td>
<td>A-68992438<br />
- <a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=84f144bedd81ad154a26c76fb322903c25374d20">
+ <a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=84f144bedd81ad154a26c76fb322903c25374d20">
QC-CR#2114323</a></td>
<td>EoP</td>
<td>High</td>
@@ -461,8 +479,7 @@ QC-CR#2114323</a></td>
<tr>
<td>CVE-2017-15821</td>
<td>A-68992432<br />
- <a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=44cd589c8a0f5a245e0003a7d0c4be1b5f3ba890">
+ <a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=44cd589c8a0f5a245e0003a7d0c4be1b5f3ba890">
QC-CR#2113072</a></td>
<td>EoP</td>
<td>High</td>
@@ -471,8 +488,7 @@ QC-CR#2113072</a></td>
<tr>
<td>CVE-2017-14885</td>
<td>A-70237686<br />
- <a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=44e992e169dbd601f95e845961cb2181b167a553">
+ <a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=44e992e169dbd601f95e845961cb2181b167a553">
QC-CR#2113758</a></td>
<td>EoP</td>
<td>High</td>
@@ -489,8 +505,7 @@ QC-CR#2113758</a></td>
<tr>
<td>CVE-2017-14882</td>
<td>A-68992424<br />
- <a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=cd10091f03f6255a47d7146eea5738f1f4ceea35">
+ <a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=cd10091f03f6255a47d7146eea5738f1f4ceea35">
QC-CR#2101439</a></td>
<td>ID</td>
<td>High</td>
@@ -499,13 +514,10 @@ QC-CR#2101439</a></td>
<tr>
<td>CVE-2017-14878</td>
<td>A-70237706<br />
- <a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=27f1c544d6737bcb3dc4bb114badcd47ce946a8b
-">QC-CR#2064580</a> [<a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-2.0/commit/?id=2167cc91261a50bf145467f4d03c8730a0d23709
-">2</a>] [<a
-href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=8952decf05939fad1cba625290ee7ae2ed528e12">
-3</a>]</td>
+ <a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=27f1c544d6737bcb3dc4bb114badcd47ce946a8b">
+ QC-CR#2064580</a>
+ [<a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-2.0/commit/?id=2167cc91261a50bf145467f4d03c8730a0d23709">2</a>]
+ [<a href="https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0/commit/?id=8952decf05939fad1cba625290ee7ae2ed528e12">3</a>]</td>
<td>DoS</td>
<td>High</td>
<td>Wireless network driver</td>
@@ -708,6 +720,11 @@ security bulletins.
<td>March 5, 2018</td>
<td>Bulletin published.</td>
</tr>
+ <tr>
+ <td>1.1</td>
+ <td>March 7, 2018</td>
+ <td>Bulletin revised to include AOSP links.</td>
+ </tr>
</table>
</body></html>
diff --git a/en/security/bulletin/pixel/2018-03-01.html b/en/security/bulletin/pixel/2018-03-01.html
index 0cfec04a..799216b5 100644
--- a/en/security/bulletin/pixel/2018-03-01.html
+++ b/en/security/bulletin/pixel/2018-03-01.html
@@ -22,7 +22,7 @@
-->
-<p><em>Published March 5, 2018</em></p>
+<p><em>Published March 5, 2018 | Updated March 7, 2018</em></p>
<p>
The Pixel&hairsp;/&hairsp;Nexus Security Bulletin contains details of security
@@ -80,7 +80,10 @@ additional references are linked to numbers following the bug ID.
</tr>
<tr>
<td>CVE-2017-13263</td>
- <td>A-69383160</td>
+ <td><a href="https://android.googlesource.com/platform/packages/apps/Settings/+/c38c7404fd89ae43716dddba89e5c8ac3e8bfcba">
+ A-69383160</a>
+ [<a href="https://android.googlesource.com/platform/frameworks/base/+/6f89a3e373271be0f93740b96d5792649962439f">2</a>]
+ </td>
<td>EoP</td>
<td>Moderate</td>
<td>8.0, 8.1</td>
@@ -105,7 +108,8 @@ additional references are linked to numbers following the bug ID.
</tr>
<tr>
<td rowspan="2">CVE-2017-13264</td>
- <td rowspan="2">A-70294343</td>
+ <td rowspan="2"><a href="https://android.googlesource.com/platform/external/libavc/+/4b58c8f3db9fdfd64230afac3e790c2053cb9cf7">
+ A-70294343</a></td>
<td>NSI</td>
<td>NSI</td>
<td>7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
@@ -117,7 +121,8 @@ additional references are linked to numbers following the bug ID.
</tr>
<tr>
<td rowspan="2">CVE-2017-13254</td>
- <td rowspan="2">A-70239507</td>
+ <td rowspan="2"><a href="https://android.googlesource.com/platform/frameworks/av/+/1617cbe5f71c025c5c8c0c468e7e289e3a830afd">
+ A-70239507</a></td>
<td>NSI</td>
<td>NSI</td>
<td>7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
@@ -147,28 +152,38 @@ additional references are linked to numbers following the bug ID.
</tr>
<tr>
<td>CVE-2017-13265</td>
- <td>A-36232423</td>
+ <td><a href="https://android.googlesource.com/platform/build/+/9de91d94e8224314f856d0d3c884142ef5d71f44">
+ A-36232423</a>
+ [<a href="https://android.googlesource.com/platform/system/update_engine/+/8c3c80cbc706137fa1a3dc8784fd8108c0841b30">2</a>]
+ [<a href="https://android.googlesource.com/platform/system/update_engine/+/55b7e08bf5dda75be4b3468b55bd9dda94f67e64">3</a>]
+ </td>
<td>EoP</td>
<td>Moderate</td>
<td>7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13266</td>
- <td>A-69478941</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/2f2043f18463a5c963c138d24346870b1066e7a6">
+ A-69478941</a>
+ </td>
<td>EoP</td>
<td>Moderate</td>
<td>5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13268</td>
- <td>A-67058064</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/49a57cd2346a716eca07153ac83026787fb9d03a">
+ A-67058064</a>
+ </td>
<td>ID</td>
<td>Moderate</td>
<td>5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
</tr>
<tr>
<td>CVE-2017-13269</td>
- <td>A-68818034</td>
+ <td><a href="https://android.googlesource.com/platform/system/bt/+/ae12fc48fa6c7a114234afa055ab1cd630d6da8d">
+ A-68818034</a>
+ </td>
<td>ID</td>
<td>Moderate</td>
<td>5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2, 8.0, 8.1</td>
@@ -524,7 +539,7 @@ QC-CR#2119401</a></td>
<tr>
<td>CVE-2017-15855</td>
<td>A-38232131<a href="#asterisk">*</a><br />
- QC-CR#2139514</td>
+ QC-CR#2025367</td>
<td>ID</td>
<td>Moderate</td>
<td>Camera_v2 driver</td>
@@ -697,6 +712,12 @@ bulletin, are not required for declaring a security patch level.
<td>March 5, 2018</td>
<td>Bulletin published.</td>
</tr>
+ <tr>
+ <td>1.1</td>
+ <td>March 7, 2018</td>
+ <td>Bulletin revised to include AOSP links and update reference number for
+ CVE-2017-15855.</td>
+ </tr>
</table>
</body></html>
diff --git a/en/security/images/PHA-classification.png b/en/security/images/PHA-classification.png
new file mode 100644
index 00000000..a10a0c82
--- /dev/null
+++ b/en/security/images/PHA-classification.png
Binary files differ
diff --git a/en/security/images/yir-2014.png b/en/security/images/yir-2014.png
new file mode 100644
index 00000000..2b7a5a33
--- /dev/null
+++ b/en/security/images/yir-2014.png
Binary files differ
diff --git a/en/security/images/yir-2015.png b/en/security/images/yir-2015.png
new file mode 100644
index 00000000..b8486d82
--- /dev/null
+++ b/en/security/images/yir-2015.png
Binary files differ
diff --git a/en/security/images/yir-2016.png b/en/security/images/yir-2016.png
new file mode 100644
index 00000000..31f06b43
--- /dev/null
+++ b/en/security/images/yir-2016.png
Binary files differ
diff --git a/en/security/images/yir-2017.png b/en/security/images/yir-2017.png
new file mode 100644
index 00000000..24fda24f
--- /dev/null
+++ b/en/security/images/yir-2017.png
Binary files differ
diff --git a/en/security/overview/reports.html b/en/security/overview/reports.html
new file mode 100644
index 00000000..dfb5f7ab
--- /dev/null
+++ b/en/security/overview/reports.html
@@ -0,0 +1,116 @@
+<html devsite>
+ <head>
+ <title>Security Reports</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>Sometimes the Android Security team publishes reports or whitepapers. Here are some of the most recent.</p>
+<h2 id="yir-2017">Year in Review 2017</h2>
+
+
+<p>This covers everything that Google did for Android security in 2017.</p>
+<p>
+<a href="/security/reports/Google_Android_Security_2017_Report_Final.pdf"
+ class="button"
+ class="gc-analytics-event"
+ data-category="AOSP"
+ data-label="YIR-2017"
+ data-action="download"
+ >Download this report</a></p>
+
+<a href="/security/reports/Google_Android_Security_2017_Report_Final.pdf"
+ class="gc-analytics-event"
+ data-category="AOSP"
+ data-label="YIR-2017"
+ ><img src="/security/images/yir-2017.png" class="screenshot"></a>
+
+<h2 id="yir-2016">Year in Review 2016</h2>
+
+<p>This covers everything that Google did for Android security in 2016.</p>
+<p><a href="/security/reports/Google_Android_Security_2016_Report_Final.pdf"
+ class="button"
+ class="gc-analytics-event"
+ data-category="AOSP"
+ data-label="YIR-2016"
+ data-action="download"
+ >Download this report</a></p>
+
+<a href="/security/reports/Google_Android_Security_2016_Report_Final.pdf"
+ class="gc-analytics-event"
+ data-category="AOSP"
+ data-label="YIR-2016"
+ ><img src="/security/images/yir-2016.png" class="screenshot"></a>
+
+
+<h2 id="yir-2015">Year in Review 2015</h2>
+
+<p>This covers everything that Google did for Android security in 2015.</p>
+<p><a href="/security/reports/Google_Android_Security_2015_Report_Final.pdf"
+ class="button"
+ class="gc-analytics-event"
+ data-category="AOSP"
+ data-label="YIR-2015"
+ data-action="download"
+ >Download this report</a></p>
+
+<a href="/security/reports/Google_Android_Security_2015_Report_Final.pdf"
+ class="gc-analytics-event"
+ data-category="AOSP"
+ data-label="YIR-2015"
+ ><img src="/security/images/yir-2015.png" class="screenshot"></a>
+
+
+<h2 id="yir-2014">Year in Review 2014</h2>
+
+<p>This covers everything that Google did for Android security in 2014.</p>
+<p><a href="/security/reports/Google_Android_Security_2014_Report_Final.pdf"
+ class="button"
+ class="gc-analytics-event"
+ data-category="AOSP"
+ data-label="YIR-2014"
+ data-action="download"
+ >Download this report</a></p>
+
+<a href="/security/reports/Google_Android_Security_2014_Report_Final.pdf"
+ class="gc-analytics-event"
+ data-category="AOSP"
+ data-label="YIR-2014"
+ ><img src="/security/images/yir-2014.png" class="screenshot"></a>
+
+
+<h2 id="PHA-classifications">Classifications for Potentially Harmful Applications</h2>
+
+<p>This covers the Android Security Team’s taxonomy for classifying apps that
+pose a potential security risk to users or their data.</p>
+<p><a href="/security/reports/Google_Android_Security_PHA_classifications.pdf"
+ class="button"
+ class="gc-analytics-event"
+ data-category="AOSP"
+ data-label="PHA-classifications"
+ data-action="download"
+ >Download this report</a></p>
+
+<a href="/security/reports/Google_Android_Security_PHA_classifications.pdf"
+ class="gc-analytics-event"
+ data-category="AOSP"
+ data-label="PHA-classifications"
+ ><img src="/security/images/PHA-classification.png" class="screenshot"></a>
+
+ </body>
+</html>
diff --git a/en/setup/build-numbers.html b/en/setup/build-numbers.html
index 16623580..dcfc5c0d 100644
--- a/en/setup/build-numbers.html
+++ b/en/setup/build-numbers.html
@@ -226,6 +226,12 @@ site:</p>
<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>
diff --git a/en/setup/devices.html b/en/setup/devices.html
index c8bbbe75..ed4d1e7e 100644
--- a/en/setup/devices.html
+++ b/en/setup/devices.html
@@ -141,9 +141,9 @@ HiKey960 user guide).</li>
(<code>arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb</code>) to the
<code>hikey-kernel</code> directory as file:
<code>hi3660-hikey960.dtb-4.9</code></li>
- <li>Copy the Image file <code>(arch/arm64/boot/Image.gz</code>) to the
+ <li>Copy the Image file <code>(arch/arm64/boot/Image.gz-dtb</code>) to the
<code>hikey-kernel</code> directory as file:
- <code>Image.gz-hikey960-4.9</code></li>
+ <code>Image.gz-dtb-hikey960-4.9</code></li>
</ul>
<li>Make the boot image:
<pre class="devsite-terminal devsite-click-to-copy">
diff --git a/ru/security/bulletin/2016.html b/ru/security/bulletin/2016.html
index b399aab9..1314b226 100644
--- a/ru/security/bulletin/2016.html
+++ b/ru/security/bulletin/2016.html
@@ -29,14 +29,19 @@
<col width="19%" />
</colgroup><tbody><tr>
<th>Бюллетень</th>
- <th>Языки</th>
+ <th>Язык</th>
<th>Дата публикации</th>
<th>Обновление системы безопасности</th>
</tr>
<tr>
<td><a href="2016-12-01.html">Декабрь 2016 г.</a></td>
<td>
- <a href="/security/bulletin/2016-12-01.html">English</a>/<a href="/security/bulletin/2016-12-01.html?hl=ja">日本語</a>/<a href="/security/bulletin/2016-12-01.html?hl=ko">한국어</a>/<a href="/security/bulletin/2016-12-01.html?hl=ru">русский</a>/<a href="/security/bulletin/2016-12-01.html?hl=zh-cn">中文 (中国)</a>/<a href="/security/bulletin/2016-12-01.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/bulletin/2016-12-01.html">English</a> /
+ <a href="/security/bulletin/2016-12-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/2016-12-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/2016-12-01.html?hl=ru">русский</a> /
+ <a href="/security/bulletin/2016-12-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/2016-12-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>5 декабря 2016 г.</td>
<td>2016-12-01<br />
@@ -45,7 +50,12 @@
<tr>
<td><a href="/security/bulletin/2016-11-01.html">Ноябрь 2016 г.</a></td>
<td>
- <a href="/security/bulletin/2016-11-01.html">English</a>/<a href="/security/bulletin/2016-11-01.html?hl=ja">日本語</a>/<a href="/security/bulletin/2016-11-01.html?hl=ko">한국어</a>/<a href="/security/bulletin/2016-11-01.html?hl=ru">русский</a>/<a href="/security/bulletin/2016-11-01.html?hl=zh-cn">中文 (中国)</a>/<a href="/security/bulletin/2016-11-01.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/bulletin/2016-11-01.html">English</a> /
+ <a href="/security/bulletin/2016-11-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/2016-11-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/2016-11-01.html?hl=ru">русский</a> /
+ <a href="/security/bulletin/2016-11-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/2016-11-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>7 ноября 2016 г.</td>
<td>2016-11-01<br />
@@ -55,7 +65,12 @@
<tr>
<td><a href="/security/bulletin/2016-10-01.html">Октябрь 2016 г.</a></td>
<td>
- <a href="/security/bulletin/2016-10-01.html">English</a>/<a href="/security/bulletin/2016-10-01.html?hl=ja">日本語</a>/<a href="/security/bulletin/2016-10-01.html?hl=ko">한국어</a>/<a href="/security/bulletin/2016-10-01.html?hl=ru">русский</a>/<a href="/security/bulletin/2016-10-01.html?hl=zh-cn">中文 (中国)</a>/<a href="/security/bulletin/2016-10-01.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/bulletin/2016-10-01.html">English</a> /
+ <a href="/security/bulletin/2016-10-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/2016-10-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/2016-10-01.html?hl=ru">русский</a> /
+ <a href="/security/bulletin/2016-10-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/2016-10-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>3 октября 2016 г.</td>
<td>2016-10-01<br />
@@ -64,7 +79,12 @@
<tr>
<td><a href="/security/bulletin/2016-09-01.html">Сентябрь 2016 г.</a></td>
<td>
- <a href="/security/bulletin/2016-09-01.html">English</a>/<a href="/security/bulletin/2016-09-01.html?hl=ja">日本語</a>/<a href="/security/bulletin/2016-09-01.html?hl=ko">한국어</a>/<a href="/security/bulletin/2016-09-01.html?hl=ru">русский</a>/<a href="/security/bulletin/2016-09-01.html?hl=zh-cn">中文 (中国)</a>/<a href="/security/bulletin/2016-09-01.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/bulletin/2016-09-01.html">English</a> /
+ <a href="/security/bulletin/2016-09-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/2016-09-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/2016-09-01.html?hl=ru">русский</a> /
+ <a href="/security/bulletin/2016-09-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/2016-09-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>6 сентября 2016 г.</td>
<td>2016-09-01<br />
@@ -74,7 +94,12 @@
<tr>
<td><a href="/security/bulletin/2016-08-01.html">Август 2016 г.</a></td>
<td>
- <a href="/security/bulletin/2016-08-01.html">English</a>/<a href="/security/bulletin/2016-08-01.html?hl=ja">日本語</a>/<a href="/security/bulletin/2016-08-01.html?hl=ko">한국어</a>/<a href="/security/bulletin/2016-08-01.html?hl=ru">русский</a>/<a href="/security/bulletin/2016-08-01.html?hl=zh-cn">中文 (中国)</a>/<a href="/security/bulletin/2016-08-01.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/bulletin/2016-08-01.html">English</a> /
+ <a href="/security/bulletin/2016-08-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/2016-08-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/2016-08-01.html?hl=ru">русский</a> /
+ <a href="/security/bulletin/2016-08-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/2016-08-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>1 августа 2016 г.</td>
<td>2016-08-01<br />
@@ -83,7 +108,12 @@
<tr>
<td><a href="/security/bulletin/2016-07-01.html">Июль 2016 г.</a></td>
<td>
- <a href="/security/bulletin/2016-07-01.html">English</a>/<a href="/security/bulletin/2016-07-01.html?hl=ja">日本語</a>/<a href="/security/bulletin/2016-07-01.html?hl=ko">한국어</a>/<a href="/security/bulletin/2016-07-01.html?hl=ru">русский</a>/<a href="/security/bulletin/2016-07-01.html?hl=zh-cn">中文 (中国)</a>/<a href="/security/bulletin/2016-07-01.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/bulletin/2016-07-01.html">English</a> /
+ <a href="/security/bulletin/2016-07-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/2016-07-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/2016-07-01.html?hl=ru">русский</a> /
+ <a href="/security/bulletin/2016-07-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/2016-07-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>6 июля 2016 г.</td>
<td>2016-07-01<br />
@@ -92,7 +122,12 @@
<tr>
<td><a href="/security/bulletin/2016-06-01.html">Июнь 2016 г.</a></td>
<td>
- <a href="/security/bulletin/2016-06-01.html">English</a>/<a href="/security/bulletin/2016-06-01.html?hl=ja">日本語</a>/<a href="/security/bulletin/2016-06-01.html?hl=ko">한국어</a>/<a href="/security/bulletin/2016-06-01.html?hl=ru">русский</a>/<a href="/security/bulletin/2016-06-01.html?hl=zh-cn">中文 (中国)</a>/<a href="/security/bulletin/2016-06-01.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/bulletin/2016-06-01.html">English</a> /
+ <a href="/security/bulletin/2016-06-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/2016-06-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/2016-06-01.html?hl=ru">русский</a> /
+ <a href="/security/bulletin/2016-06-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/2016-06-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>6 июня 2016 г.</td>
<td>2016-06-01</td>
@@ -100,7 +135,12 @@
<tr>
<td><a href="/security/bulletin/2016-05-01.html">Май 2016 г.</a></td>
<td>
- <a href="/security/bulletin/2016-05-01.html">English</a>/<a href="/security/bulletin/2016-05-01.html?hl=ja">日本語</a>/<a href="/security/bulletin/2016-05-01.html?hl=ko">한국어</a>/<a href="/security/bulletin/2016-05-01.html?hl=ru">русский</a>/<a href="/security/bulletin/2016-05-01.html?hl=zh-cn">中文 (中国)</a>/<a href="/security/bulletin/2016-05-01.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/bulletin/2016-05-01.html">English</a> /
+ <a href="/security/bulletin/2016-05-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/2016-05-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/2016-05-01.html?hl=ru">русский</a> /
+ <a href="/security/bulletin/2016-05-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/2016-05-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>2 мая 2016 г.</td>
<td>2016-05-01</td>
@@ -108,7 +148,12 @@
<tr>
<td><a href="/security/bulletin/2016-04-02.html">Апрель 2016 г.</a></td>
<td>
- <a href="/security/bulletin/2016-04-02.html">English</a>/<a href="/security/bulletin/2016-04-01.html?hl=ja">日本語</a>/<a href="/security/bulletin/2016-04-01.html?hl=ko">한국어</a>/<a href="/security/bulletin/2016-04-01.html?hl=ru">русский</a>/<a href="/security/bulletin/2016-04-01.html?hl=zh-cn">中文 (中国)</a>/<a href="/security/bulletin/2016-04-01.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/bulletin/2016-04-02.html">English</a> /
+ <a href="/security/bulletin/2016-04-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/2016-04-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/2016-04-01.html?hl=ru">русский</a> /
+ <a href="/security/bulletin/2016-04-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/2016-04-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>4 апреля 2016 г.</td>
<td>2016-04-02</td>
@@ -116,7 +161,12 @@
<tr>
<td><a href="/security/bulletin/2016-03-01.html">Март 2016 г.</a></td>
<td>
- <a href="/security/bulletin/2016-03-01.html">English</a>/<a href="/security/bulletin/2016-03-01.html?hl=ja">日本語</a>/<a href="/security/bulletin/2016-03-01.html?hl=ko">한국어</a>/<a href="/security/bulletin/2016-03-01.html?hl=ru">русский</a>/<a href="/security/bulletin/2016-03-01.html?hl=zh-cn">中文 (中国)</a>/<a href="/security/bulletin/2016-03-01.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/bulletin/2016-03-01.html">English</a> /
+ <a href="/security/bulletin/2016-03-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/2016-03-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/2016-03-01.html?hl=ru">русский</a> /
+ <a href="/security/bulletin/2016-03-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/2016-03-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>7 марта 2016 г.</td>
<td>2016-03-01</td>
@@ -124,7 +174,12 @@
<tr>
<td><a href="/security/bulletin/2016-02-01.html">Февраль 2016 г.</a></td>
<td>
- <a href="/security/bulletin/2016-02-01.html">English</a>/<a href="/security/bulletin/2016-02-01.html?hl=ja">日本語</a>/<a href="/security/bulletin/2016-02-01.html?hl=ko">한국어</a>/<a href="/security/bulletin/2016-02-01.html?hl=ru">русский</a>/<a href="/security/bulletin/2016-02-01.html?hl=zh-cn">中文 (中国)</a>/<a href="/security/bulletin/2016-02-01.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/bulletin/2016-02-01.html">English</a> /
+ <a href="/security/bulletin/2016-02-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/2016-02-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/2016-02-01.html?hl=ru">русский</a> /
+ <a href="/security/bulletin/2016-02-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/2016-02-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>1 февраля 2016 г.</td>
<td>2016-02-01</td>
@@ -132,7 +187,12 @@
<tr>
<td><a href="/security/bulletin/2016-01-01.html">Январь 2016 г.</a></td>
<td>
- <a href="/security/bulletin/2016-01-01.html">English</a>/<a href="/security/bulletin/2016-01-01.html?hl=ja">日本語</a>/<a href="/security/bulletin/2016-01-01.html?hl=ko">한국어</a>/<a href="/security/bulletin/2016-01-01.html?hl=ru">русский</a>/<a href="/security/bulletin/2016-01-01.html?hl=zh-cn">中文 (中国)</a>/<a href="/security/bulletin/2016-01-01.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/bulletin/2016-01-01.html">English</a> /
+ <a href="/security/bulletin/2016-01-01.html?hl=ja">日本語</a> /
+ <a href="/security/bulletin/2016-01-01.html?hl=ko">한국어</a> /
+ <a href="/security/bulletin/2016-01-01.html?hl=ru">русский</a> /
+ <a href="/security/bulletin/2016-01-01.html?hl=zh-cn">中文 (中国)</a> /
+ <a href="/security/bulletin/2016-01-01.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>4 января 2016 г.</td>
<td>2016-01-01</td>
diff --git a/zh-cn/_book.yaml b/zh-cn/_book.yaml
index 506168e7..3a319893 100644
--- a/zh-cn/_book.yaml
+++ b/zh-cn/_book.yaml
@@ -118,6 +118,8 @@ upper_tabs:
title: 公告
- section:
- section:
+ - path: /security/bulletin/2018-03-01
+ title: 3 月
- path: /security/bulletin/2018-02-01
title: 2 月
- path: /security/bulletin/2018-01-01
@@ -200,6 +202,8 @@ upper_tabs:
- path: /security/bulletin/pixel/index
title: 概览
- section:
+ - path: /security/bulletin/pixel/2018-03-01
+ title: 3 月
- path: /security/bulletin/pixel/2018-02-01
title: 2 月
- path: /security/bulletin/pixel/2018-01-01
@@ -819,12 +823,12 @@ upper_tabs:
- path: /devices/tech/debug/asan
title: AddressSanitizer
- path: /devices/tech/debug/sanitizers
- title: LLVM 清理程序
+ title: LLVM 排错程序
- path: /devices/tech/debug/kasan-kcov
title: 使用 KASAN + KCOV 编译内核
- path: /devices/tech/debug/libfuzzer
title: 通过 libFuzzer 进行模糊测试
- title: 模糊测试和清理
+ title: 模糊测试和排错
- path: /devices/tech/debug/gdb
title: 使用 GDB
- path: /devices/tech/debug/native-memory
diff --git a/zh-cn/compatibility/cts/interpret.html b/zh-cn/compatibility/cts/interpret.html
index 1141056d..42af04b1 100644
--- a/zh-cn/compatibility/cts/interpret.html
+++ b/zh-cn/compatibility/cts/interpret.html
@@ -85,7 +85,7 @@ $CTS_ROOT/android-cts/repository/results/&lt;start_time&gt;.zip
<h3 id="incomplete-test-modules">查看 test_result.xml 以了解未完成的测试模块</h3>
-<p>要确定某个测试会话中的未完成模块数量,请运行命令“list results”。系统会列出之前每个会话的“已完成模块数量”和“模块总数量”。要确定哪些模块已完成,哪些模块未完成,请打开 test_result.xml 文件,并读取结果报告中每个模块的“done”属性的值。“done”值为 false 表示模块尚未完成运行。
+<p>要确定某个测试会话中的未完成模块数量,请运行命令“list results”。系统会列出之前每个会话的“已完成模块数量”和“模块总数量”。要确定哪些模块已完成,哪些模块未完成,请打开 test_result.xml 文件,并读取结果报告中每个模块的“done”属性的值。“done”值为“false”表示模块尚未完成运行。
</p>
</body></html> \ No newline at end of file
diff --git a/zh-cn/compatibility/cts/run.html b/zh-cn/compatibility/cts/run.html
index 5d4cb6e3..3d80c31f 100644
--- a/zh-cn/compatibility/cts/run.html
+++ b/zh-cn/compatibility/cts/run.html
@@ -28,7 +28,7 @@
<li>至少连接一个设备。
</li><li>在开始运行 CTS 时,按<strong>主屏幕</strong>按钮将设备设置为显示主屏幕。</li><li>当设备在运行测试时,它不能用于执行任何其他任务,并且必须保持静止状态(以免触发传感器活动),同时要让相机指向某个可以聚焦的对象。
</li><li>在运行 CTS 时,不要按设备上的任何键。按测试设备上的键或触摸其屏幕会干扰正在运行的测试,并且可能导致测试失败。
- </li><li>通过运行解压缩 CTS 包所得的文件夹中的 cts-tradefed 脚本(例如 <code>$ ./android-cts/tools/cts-tradefed</code>)来启动 CTS 控制台。<em></em>
+ </li><li><em></em>通过运行解压缩 CTS 包所得的文件夹中的 cts-tradefed 脚本(例如 <code>$ ./android-cts/tools/cts-tradefed</code>)来启动 CTS 控制台。
</li><li>通过附加以下命令启动默认测试计划(包含所有测试包):<code>run
cts --plan CTS</code>。这将启动测试兼容性所需的所有 CTS 测试。
<ul>
diff --git a/zh-cn/compatibility/cts/setup.html b/zh-cn/compatibility/cts/setup.html
index a11201c9..3e070469 100644
--- a/zh-cn/compatibility/cts/setup.html
+++ b/zh-cn/compatibility/cts/setup.html
@@ -169,8 +169,7 @@ ro.product.first_api_level=21
<ul>
<li>要复制分辨率不超过 720x480 的剪辑,请运行:<code>./copy_media.sh 720x480</code>
</li><li>如果您不确定最大分辨率,请尝试运行 <code>./copy_media.sh all</code>,以便复制所有文件。
- </li><li>如果 adb 下有多个设备,请将 -s(序列号)选项添加到末尾。
-例如,要将分辨率不超过 720x480 的文件复制到序列号为 1234567 的设备,请运行:<code>./copy_media.sh 720x480 -s 1234567</code>
+ </li><li>如果 adb 下有多个设备,请将 -s(序列号)选项添加到末尾。例如,要将分辨率不超过 720x480 的文件复制到序列号为 1234567 的设备,请运行:<code>./copy_media.sh 720x480 -s 1234567</code>
</li></ul>
</li></ul>
</li></ol>
diff --git a/zh-cn/compatibility/index.html b/zh-cn/compatibility/index.html
index 22a0a7fa..ca6f410e 100644
--- a/zh-cn/compatibility/index.html
+++ b/zh-cn/compatibility/index.html
@@ -55,7 +55,6 @@
<p>在符合 CDD 要求且通过 CTS 测试后,您的设备即是与 Android 兼容的设备,这意味着生态系统中的 Android 应用在您的设备上运行时可提供一致的体验。有关 Android 兼容性计划的详细信息,请参阅<a href="overview.html">计划概述</a>。</p>
<h2 id="licensing-gms">申请 Google 移动服务 (GMS) 许可</h2>
-<p>打造 Android 兼容设备后,请考虑申请 Android 上的 Google 移动服务(简称 GMS,由 Google Play、YouTube、Google 地图、Gmail 等 Google 拥有的一系列应用组成)许可。GMS 不是 Android 开放源代码项目的一部分,仅通过 Google 授予许可的方式提供。
-有关如何申请 GMS 许可的信息,请参阅<a href="contact-us.html">与我们联系</a>。</p>
+<p>打造 Android 兼容设备后,请考虑申请 Android 上的 Google 移动服务(简称 GMS,由 Google Play、YouTube、Google 地图、Gmail 等 Google 拥有的一系列应用组成)许可。GMS 不是 Android 开放源代码项目的一部分,仅通过 Google 授予许可的方式提供。有关如何申请 GMS 许可的信息,请参阅<a href="contact-us.html">与我们联系</a>一文。</p>
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/accessories/headset/usb-adapter.html b/zh-cn/devices/accessories/headset/usb-adapter.html
index e0221345..3fab734d 100644
--- a/zh-cn/devices/accessories/headset/usb-adapter.html
+++ b/zh-cn/devices/accessories/headset/usb-adapter.html
@@ -21,7 +21,7 @@
-->
<p>
-尽管一些新的 Android 手机在出厂时并未配备 3.5 毫米耳机插孔,但如果用户需要的话,他们仍然可以针对这类设备使用 3.5 毫米耳机。为此,本文详细介绍了 USB-C 型转模拟音频适配器规范,以协助您将 <a href="plug-headset-spec.html">/devices/accessories/headset/3.5 毫米耳机</a>插入只提供 <a href="/devices/accessories/headset/usb-device">USB-C 型端口</a>的设备。</p>
+尽管一些新的 Android 手机在出厂时并未配备 3.5 毫米耳机插孔,但如果用户需要的话,他们仍然可以针对这类设备使用 3.5 毫米耳机。为此,本文详细介绍了 USB-C 型转模拟音频适配器规范,以协助用户将 <a href="/devices/accessories/headset/plug-headset-spec.html">3.5 毫米耳机</a>插入只提供 <a href="/devices/accessories/headset/usb-device">USB-C 型端口</a>的设备。</p>
<p>
本文档给出的是最低要求,我们鼓励配件制造商在满足这些要求的基础上添加新的功能。
</p>
diff --git a/zh-cn/devices/accessories/headset/usb-headset-spec.html b/zh-cn/devices/accessories/headset/usb-headset-spec.html
index 00c6183e..b53e2df0 100644
--- a/zh-cn/devices/accessories/headset/usb-headset-spec.html
+++ b/zh-cn/devices/accessories/headset/usb-headset-spec.html
@@ -21,14 +21,23 @@
-->
<p>
-本文档详细说明了 USB 耳机上各个按钮的行为,以使其在整个 Android 生态系统中保持一致。设备制造商还应参考 <a href="/devices/audio/usb.html">USB 数字音频</a>页面,以了解有关在 Android 设备上实现 USB 的更多信息;以及参考 <a href="/compatibility/android-cdd.html">Android 兼容性定义文档 (CDD)</a>,以了解与 Android 设备相关的要求。
-</p>
-<p>此外,本文档还介绍了 <a href="plug-headset-spec.html">3.5 毫米耳机</a>规范(适用于配件制造商)和 <a href="jack-headset-spec.html">3.5 毫米耳机插孔</a>规范(适用于设备制造商)。
+本文档详细说明了 USB 耳机的一些特性,以使其在整个 Android 生态系统中保持一致。只允许制造带数字 USB 音频接口的耳机。根据 USB C 型规范,不允许制造带 USB C 型转接头的纯模拟耳机。
</p>
<p>
本文档给出的是最低要求,我们鼓励配件制造商在满足这些要求的基础上添加新的功能。
</p>
-<h2 id="control-function-mapping">控件-功能映射</h2>
+
+<h2 id="functional-overview">功能概览</h2>
+<p>
+USB 耳机可以实现多种基本功能和高级功能。本规范只涵盖必要的基本功能:</p>
+<ul>
+ <li>立体声输出</li>
+ <li>麦克风(可选,但建议支持)</li>
+ <li>用于控制音量、播放和通话的功能按钮</li>
+</ul>
+
+<h2 id="control-function">控制功能</h2>
+<p>耳机可以带有不同数量的按钮以控制特定功能(例如音量和播放/暂停)。</p><p>
<table>
<tbody><tr>
<th>控制功能</th>
@@ -56,7 +65,7 @@
<td>启动语音命令</td>
</tr>
</tbody></table>
-<p>
+</p><p>
<strong>按钮功能分配如下:</strong>
</p>
<ul>
@@ -74,89 +83,41 @@
</p>
<h2 id="software-mapping">软件映射</h2>
<p>
-兼容的 USB 耳机需要支持耳机按钮的以下软件映射。以下软件映射需要设备支持。
+兼容的 USB 耳机需要支持耳机按钮的以下软件映射。设备会将这些 HID 映射与相应的 Android 键码相匹配。
</p>
<table>
<tbody><tr>
<th>功能</th>
<th>映射</th>
- <th>环境</th>
- <th>行为</th>
- </tr>
- <tr>
- <td rowspan="6">A</td>
- <td rowspan="6"><strong>HID 用途页</strong>:0x0C<br />
- <strong>HID 用途</strong>:0x0CD<br />
- <strong>内核按键</strong>:<code>KEY_PLAYPAUSE</code><br />
- <strong>Android 按键</strong>:<code>KEYCODE_MEDIA_PLAY_PAUSE</code></td>
- <td rowspan="2">媒体播放</td>
- <td><strong>输入</strong>:短按<br />
- <strong>输出</strong>:播放或暂停</td>
- </tr>
- <tr>
- <td><strong>输入</strong>:长按<br />
- <strong>输出</strong>:启动语音命令<br />
- <strong>发送</strong>:如果设备已被锁定或其屏幕已关闭,则发送 <code>android.speech.action.VOICE_SEARCH_HANDS_FREE</code>,否则发送 <code>android.speech.RecognizerIntent.ACTION_WEB_SEARCH</code></td>
</tr>
<tr>
- <td rowspan="2">来电</td>
- <td><strong>输入</strong>:短按<br />
- <strong>输出</strong>:接听来电</td>
- </tr>
- <tr>
- <td><strong>输入</strong>:长按<br />
- <strong>输出</strong>:拒接来电</td>
- </tr>
- <tr>
- <td rowspan="2">当前通话</td>
- <td><strong>输入</strong>:短按<br />
- <strong>输出</strong>:结束通话</td>
- </tr>
- <tr>
- <td><strong>输入</strong>:长按<br />
- <strong>输出</strong>:将麦克风设为静音或取消静音</td>
+ <td>A</td>
+ <td>HID 用途页:0x0C<br />HID 用途:0x0CD</td>
</tr>
<tr>
<td>B</td>
- <td><strong>HID 用途页</strong>:0x0C<br />
- <strong>HID 用途</strong>:0x0E9<br />
- <strong>内核按键</strong>:<code>KEY_VOLUMEUP</code><br />
- <strong>Android 按键</strong>:<code>VOLUME_UP</code></td>
- <td>媒体播放、当前通话</td>
- <td><strong>输入</strong>:短按或长按<br />
- <strong>输出</strong>:调高系统或耳机的音量</td>
+ <td>HID 用途页:0x0C<br />HID 用途:0x0E9</td>
</tr>
<tr>
<td>C</td>
- <td><strong>HID 用途页</strong>:0x0C<br />
- <strong>HID 用途</strong>:0x0EA<br />
- <strong>内核按键</strong>:<code>KEY_VOLUMEDOWN</code><br />
- <strong>Android 按键</strong>:<code>VOLUME_DOWN</code></td>
- <td>媒体播放、当前通话</td>
- <td><strong>输入</strong>:短按或长按<br />
- <strong>输出</strong>:调低系统或耳机的音量</td>
+ <td>HID 用途页:0x0C<br />HID 用途:0x0EA</td>
</tr>
<tr>
<td>D</td>
- <td><strong>HID 用途页</strong>:0x0C<br />
- <strong>HID 用途</strong>:0x0CF<br />
- <strong>内核按键</strong>:<code>KEY_VOICECOMMAND</code><br />
- <strong>Android 按键</strong>:<code>KEYCODE_VOICE_ASSIST</code></td>
- <td>所有。可在任何情况下触发。</td>
- <td><strong>输入</strong>:短按或长按<br />
- <strong>输出</strong>:启动语音命令</td>
+ <td>HID 用途页:0x0C<br />HID 用途:0x0CF</td>
</tr>
</tbody></table>
<p class="note">按键映射应在 HID 应用集合中声明。对于不带麦克风的配件,请使用耳机(用途页:消费者 (0x0C),用途:耳机 (0x05))。对于带有麦克风的配件,请使用耳麦(用途页:电话 (0x0B),用途:耳麦 (0x05))。</p>
+<h2 id="output-level">输出级别</h2>
+<p>声压级上限应符合目标国家/地区的所有监管要求。
+</p>
+
<h2 id="mechanical">机械</h2>
<p>
配件制造商必须遵循 <a href="http://www.usb.org/">USB.org</a> 的规定中对 USB 连接器的要求。
</p>
-<p>
-设备制造商必须遵循 Android CDD 的 <a href="/compatibility/android-cdd.html#7_7_usb">USB 部分</a>中的要求。
-</p>
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/architecture/dto/optimize.html b/zh-cn/devices/architecture/dto/optimize.html
index 9db8cb5f..027e39c6 100644
--- a/zh-cn/devices/architecture/dto/optimize.html
+++ b/zh-cn/devices/architecture/dto/optimize.html
@@ -70,7 +70,7 @@
</tbody></table>
<h2 id="libufdt">libufdt</h2>
-<p>虽然最新的 <code><a href="https://github.com/dgibson/dtc/tree/master/libfdt" class="external">libfdt</a></code> 支持 DTO,但是我们建议您使用 <code>libufdt</code> 来实现 DTO(源文件位于 AOSP 中的 <code><a href="https://android.googlesource.com/platform/system/libufdt/+/refs/heads/master" class="external">platform/system/libufdt</a></code> 下)。<code>libufdt</code> 会从扁平化设备树 (FDT) 编译真实的树结构(非扁平化设备树,简称为 ufdt<em></em>),从而改善两个 <code>.dtb</code> 文件(从 O(N2) 到 O(N),其中 N 是树中的节点数)的合并效果。</p>
+<p>虽然最新的 <code><a href="https://github.com/dgibson/dtc/tree/master/libfdt" class="external">libfdt</a></code> 支持 DTO,但是我们仍建议您使用 <code>libufdt</code> 来实现 DTP(源文件位于 AOSP 中的 <code><a href="https://android.googlesource.com/platform/system/libufdt/+/refs/heads/master" class="external">platform/system/libufdt</a></code> 下)。<code>libufdt</code> 会从扁平化设备树 (FDT) 编译真实的树结构(非扁平化设备树,简称为“ufdt”<em></em>),从而改善两个 <code>.dtb</code> 文件(从 O(N2) 到 O(N),其中 N 是树中的节点数)的合并效果。</p>
<h3 id="performance">性能测试</h3>
<p>在 Google 的内部测试中,进行编译后,在 2405 个 <code>.dtb</code> 和 283 个 <code>.dtbo</code> DT 节点上使用 <code>libufdt</code> 生成了 70618 字节和 8566 字节的文件。与从 FreeBSD 移植的 <a href="http://fxr.watson.org/fxr/source/boot/fdt/" class="external">DTO 实现</a>(运行时为 124 毫秒)相比,<code>libufdt</code> DTO 运行时为 10 毫秒。</p>
diff --git a/zh-cn/devices/architecture/hidl-java/interfaces.html b/zh-cn/devices/architecture/hidl-java/interfaces.html
index 0293fff9..d813dd03 100644
--- a/zh-cn/devices/architecture/hidl-java/interfaces.html
+++ b/zh-cn/devices/architecture/hidl-java/interfaces.html
@@ -108,7 +108,7 @@ class MyCallback implements oneProducesTwoThingsCallback {
foo.linkToDeath(recipient, 1481 /* cookie */);
</pre>
-<p><code>recipient</code> 参数必须是由 HIDL 提供的 <code>HwBinder.DeathRecipient</code> 接口的实现。该接口包含单个方法 <code>serviceDied()</code>,该方法在托管该接口的进程终止时调用。</p>
+<p><code>recipient</code> 参数必须是由 HIDL 提供的 <code>HwBinder.DeathRecipient</code> 接口的实现。该接口包含单个方法 <code>serviceDied()</code>,该方法在托管该接口的进程终止时被调用。</p>
<pre class="prettyprint">
final class DeathRecipient implements HwBinder.DeathRecipient {
diff --git a/zh-cn/devices/automotive/camera-hal.html b/zh-cn/devices/automotive/camera-hal.html
index 56801927..a6b76b93 100644
--- a/zh-cn/devices/automotive/camera-hal.html
+++ b/zh-cn/devices/automotive/camera-hal.html
@@ -63,7 +63,7 @@ EVS 和汽车服务可供使用后,它便立即由 init 启动(设置目标
getCameraList() generates (vec&lt;CameraDesc&gt; cameras);
</pre>
-<p>返回包含系统中所有相机的说明的矢量。假设相机组是固定的且在启动时是可知的。要了解相机说明详细信息,请参阅 <code><a href="#cameradesc">CameraDesc</a></code>。</p>
+<p>返回包含系统中所有相机的说明的矢量。假设相机组是固定的且在启动时是可知的。要详细了解相机说明,请参阅 <code><a href="#cameradesc">CameraDesc</a></code>。</p>
<pre class="prettyprint">
openCamera(string camera_id) generates (IEvsCamera camera);
@@ -200,7 +200,7 @@ deliverFrame(BufferDesc buffer);
<p>尽管专用缓冲区格式在技术上是可行的,但兼容性测试要求缓冲区采用以下四种受支持的格式之一:NV21 (YCrCb 4:2:0 Semi-Planar)、YV12 (YCrCb 4:2:0 Planar)、YUYV (YCrCb 4:2:2 Interleaved)、RGBA(32 位 R:G:B:x)。所选格式必须是平台的 GLES 实现上的有效 GL 纹理源。</p>
-<p>应用<strong>不</strong>得依赖 <code>bufferId</code> 字段与 <code>BufferDesc</code> 结构中的 <code>memHandle</code> 之间的对应关系。一般来说,<code>bufferId</code> 值对于 HAL 驱动程序实现是私有的,该实现可以在适当的情况下使用(和重新使用)这些值。</p>
+<p>应用<strong>不得</strong>依赖 <code>bufferId</code> 字段和 <code>BufferDesc</code> 结构中的 <code>memHandle</code> 之间的任何对应关系。一般来说,<code>bufferId</code> 值对于 HAL 驱动程序实现是私有的,该实现可以在适当的情况下使用(和重新使用)这些值。</p>
<h3 id="ievsdisplay">IEvsDisplay</h3>
@@ -352,7 +352,7 @@ setExtendedInfo(int32 opaqueIdentifier, int32 opaqueValue) generates (EvsResult
<ul>
<li><strong>环绕视图</strong>。为了解决车辆的车身周围有多个相机时的用例,Google 正在考虑增强 EVS 应用,将来自多个并发相机的视频转换成适合狭小空间操作(例如在狭窄的空间中停车)的 3D 演示。</li>
-<li><strong>用户输入</strong>。在 Android 8.0 中,应用负责从内核设备获取和解析输入事件。通过与 dev/event# 内核设备进行互动,可以在启动周期早期读取用户输入,并且从这些流读取事件不会影响 Android InputFlinger 监测这些相同输入流的能力。为了解决输入事件的用例,Google 正在考虑采用支持单触摸事件的简单 EVS 接口。</li>
+<li><strong>用户输入</strong>。在 Android 8.0 中,应用负责从内核设备获取和解析输入事件。通过与 dev/event# 内核设备进行互动,可以在启动周期早期读取用户输入,并且从这些流读取事件不会影响 Android InputFlinger 监测这些相同输入流的能力。为了解决输入事件用例的相关问题,Google 正在考虑采用支持单触摸事件的简单 EVS 接口。</li>
</ul>
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/camera/versioning.html b/zh-cn/devices/camera/versioning.html
index c853230a..7e2a92c9 100644
--- a/zh-cn/devices/camera/versioning.html
+++ b/zh-cn/devices/camera/versioning.html
@@ -20,7 +20,7 @@
limitations under the License.
-->
-<p>本页详细介绍了 Camera HAL、API 和相关的 Android 兼容性测试套件 (CTS) 测试中的版本差异。还介绍了在 Android 7.0 中为增强和提高相机框架安全性而进行的几项架构更改,以及供应商在其相机实现中为支持这些更改所必须进行的更新。</p>
+<p>本页详细介绍了 Camera HAL、API 和相关的 Android 兼容性测试套件 (CTS) 测试中的版本差异,还介绍了在 Android 7.0 中为增强和提高相机框架安全性而进行的几项架构更改,以及供应商在其相机实现中为支持这些更改所必须进行的更新。</p>
<h2 id="glossary">术语</h2>
@@ -56,30 +56,30 @@
<h3 id="camera_api1">Camera API1</h3>
-<p>Android 5.0 已弃用 Camera API1,而且随着新平台开发的重点放在 Camera API2 上,Camera API1 会逐渐被淘汰。但是,该淘汰期限将会很长,而且 Android 版本将会在一段时间内继续支持 Camera API1 应用。具体来说,将继续为以下内容提供支持:</p>
+<p>Android 5.0 已弃用 Camera API1,而且随着新平台开发的重点放在 Camera API2 上,Camera API1 会逐渐被淘汰。但是,淘汰期限将会很长,而且在一段时间内新 Android 版本会继续支持 Camera API1 应用。具体来说,将继续为以下内容提供支持:</p>
<ul>
-<li><em></em>应用的 Camera API1 接口。在 Camera API1 之上构建的相机应用应该与运行早期 Android 版本的设备一样工作。
+<li>供应用使用的 Camera API1 接口。<em></em>在 Camera API1 之上构建的相机应用应该像在运行早期 Android 版本的设备上一样工作。
</li>
<li>Camera HAL 版本。<em></em>包括对 Camera HAL1.0 的支持。</li>
</ul>
<h3 id="camera_api2">Camera API2</h3>
-<p>Camera API2 框架为应用提供较低级别的相机控件,包括高效的零复制连拍/视频流以及曝光、增益、白平衡增益、颜色转换、去噪、锐化等方面的每帧控件。有关详细信息,请观看 <a href="https://www.youtube.com/watch?v=92fgcUNCHic&feature=youtu.be&t=29m50s">Google I/O 视频概览</a>。</p>
+<p>Camera API2 框架为应用提供更接近底层的相机控件,包括高效的零复制连拍/视频流以及曝光、增益、白平衡增益、颜色转换、去噪、锐化等方面的每帧控件。有关详细信息,请观看 <a href="https://www.youtube.com/watch?v=92fgcUNCHic&feature=youtu.be&t=29m50s">Google I/O 视频概览</a>。</p>
-<p>Android 5.0 及更高版本包括 Camera API2;但是,运行 Android 5.0 及更高版本的设备可能并非支持所有 Camera API2 功能。应用可以通过 Camera API2 接口查询的 <code>android.info.supportedHardwareLevel</code> 属性会报告以下支持级别之一:</p>
+<p>Android 5.0 及更高版本提供 Camera API2;但是,运行 Android 5.0 及更高版本的设备可能并不支持所有 Camera API2 功能。应用可通过 Camera API2 接口查询 <code>android.info.supportedHardwareLevel</code> 属性。该属性会报告以下支持级别之一:</p>
<ul>
-<li><code>LEGACY</code>。这些设备通过 Camera API2 接口为应用提供功能,而且这些功能与通过 Camera API1 接口提供给应用的功能大致相同。旧版框架代码在概念上将 Camera API2 调用转换为 Camera API1 调用;旧版设备不支持 Camera API2 功能,例如每帧控件。</li>
-<li><code>FULL</code>。这些设备支持 Camera API2 的所有主要功能,并且必须使用 Camera HAL 3.2 或更高版本以及 Android 5.0 或更高版本。</li>
-<li><code>LIMITED</code>。这些设备支持部分(但不是全部)Camera API2 功能,并且必须使用 Camera HAL 3.2 或更高版本。</li>
+<li><code>LEGACY</code>(旧版)。这些设备通过 Camera API2 接口为应用提供功能,而且这些功能与通过 Camera API1 接口提供给应用的功能大致相同。旧版框架代码在概念上将 Camera API2 调用转换为 Camera API1 调用;旧版设备不支持 Camera API2 功能,例如每帧控件。</li>
+<li><code>FULL</code>(全面)。这些设备支持 Camera API2 的所有主要功能,并且必须使用 Camera HAL 3.2 或更高版本以及 Android 5.0 或更高版本。</li>
+<li><code>LIMITED</code>(有限)。这些设备支持部分(但不是全部)Camera API2 功能,并且必须使用 Camera HAL 3.2 或更高版本。</li>
</ul>
-<p>各项功能通过 Camera API2 接口中的 <code>android.request.availableCapabilities</code> 属性提供。<code>FULL</code> 设备需要 <code>MANUAL_SENSOR</code> 和 <code>MANUAL_POST_PROCESSING</code> 等功能。即使对于 <code>FULL</code> 设备,<code>RAW</code> 功能也是可选的。
-<code>LIMITED</code> 设备可以播发这些功能的任何子集,包括空子集。但是,必须始终定义 <code>BACKWARD_COMPATIBLE</code> 功能。</p>
+<p>各项功能通过 Camera API2 接口中的 <code>android.request.availableCapabilities</code> 属性提供。<code>FULL</code> 设备需要具备 <code>MANUAL_SENSOR</code> 和 <code>MANUAL_POST_PROCESSING</code> 等功能。但即使是 <code>FULL</code> 设备,也并非必须实现 <code>RAW</code> 功能。
+<code>LIMITED</code> 设备可以提供这些功能的任何子集,甚至可以不提供其中任何功能。但是,必须始终定义 <code>BACKWARD_COMPATIBLE</code> 功能。</p>
-<p>设备支持的硬件级别及其支持的特定 Camera API2 功能采用以下功能标记的形式提供,以允许 Google Play 过滤 Camera API2 相机应用。</p>
+<p>设备支持的硬件级别及其支持的特定 Camera API2 功能采用以下功能标记的形式指明,以允许 Google Play 过滤 Camera API2 相机应用。</p>
<ul>
<li><code>android.hardware.camera.hardware_level.full</code>
@@ -92,7 +92,7 @@
<p>运行 Android 5.0 及更高版本的设备必须通过 Camera API1 CTS、Camera API2 CTS 和 CTS 验证程序相机测试。</p>
-<p>不具备 Camera HAL3.2 实现且不能支持完整的 Camera API2 接口的设备仍必须通过 Camera API2 CTS 测试。但是,该设备将在 Camera API2 <code>LEGACY</code> 模式下运行(在该模式下,Camera API2 调用在概念上映射到 Camera API1 调用),因此与 Camera API1 之外的特征或功能相关的任何 Camera API2 CTS 测试都将自动跳过。</p>
+<p>不具备 Camera HAL3.2 实现且不能支持完整的 Camera API2 接口的设备仍必须通过 Camera API2 CTS 测试。但是,该设备将在 Camera API2 <code>LEGACY</code> 模式下运行(在该模式下,Camera API2 调用在概念上映射到 Camera API1 调用),因此与 Camera API1 之上的特征或功能相关的任何 Camera API2 CTS 测试都将自动跳过。</p>
<p>在旧版设备上,未跳过的 Camera API2 CTS 测试使用现有的公共 Camera API1 接口和功能,没有新的要求。显示的错误(并导致 Camera API2 CTS 失败)是设备现有 Camera HAL 中已经存在的错误,因此可由现有 Camera API1 应用找到。我们预计不会出现太多此类错误(但是,任何此类错误均必须修复,才能通过 Camera API2 CTS 测试)。</p>
@@ -108,18 +108,19 @@
<p><img src="images/ape_camera_n_api1_hal3.png" alt="HAL3 上 API1 中的 Android 7.0 相机和媒体堆栈" id="figure1"/></p>
<p class="img-caption"><strong>图 1. </strong>HAL3 上 API1 中的 Android 7.0 相机和媒体堆栈。</p>
</li>
-<li>HAL1,支持在视频缓冲区中传递元数据,<strong>供应商必须更新 HAL 才能使用 kMetadataBufferTypeNativeHandleSource</strong>(Android 7.0 中不再支持 <code>kMetadataBufferTypeCameraSource</code>)。
+<li>HAL1(支持在视频缓冲区中传递元数据),<strong>供应商必须更新 HAL 才能使用 kMetadataBufferTypeNativeHandleSource</strong>(Android 7.0 中不再支持 <code>kMetadataBufferTypeCameraSource</code>)。
<p><img src="images/ape_camera_n_api1_hal1.png" alt="HAL1 上 API1 中的 Android 7.0 相机和媒体堆栈" id="figure1"/></p>
-<p class="img-caption"><strong>图 2. </strong>HAL1 上 API1 中的 Android 7.0 相机和媒体。</p>
+<p class="img-caption"><strong>图 2. </strong>HAL1 上 API1 中的 Android 7.0 相机和媒体堆栈。</p>
</li>
</ul>
<h3 id="hardening_api2">API2 的架构更改</h3>
-<p>对于 HAL1 或 HAL3 上的 API2,BufferQueue 会传递缓冲区,以便这些路径继续工作。以下对象上用于 API2 的 Android 7.0 架构:</p>
+<p>对于 HAL1 或 HAL3 上的 API2,BufferQueue 会传递缓冲区,以便这些路径能继续工作。Android 7.0 的 API2 架构:</p>
<ul>
-<li>HAL1 不受 cameraservice 移动的影响,并且<strong>不需要供应商更新</strong>。</li>
-<li>HAL3 会受到影响,但<strong>不需要供应商更新</strong>:<em></em><p><img src="images/ape_camera_n_api2_hal3.png" alt="HAL2 上 API2 中的 Android 7.0 相机和媒体堆栈" id="figure1"/></p>
+<li>若在 HAL1 上,则不受 cameraservice 移动的影响,并且<strong>不需要供应商更新</strong>。</li>
+<li>若在 HAL3 上,则受到 cameraservice 移动的影响,但<strong>不需要供应商更新</strong>:<em></em>
+<p><img src="images/ape_camera_n_api2_hal3.png" alt="HAL2 上 API2 中的 Android 7.0 相机和媒体堆栈" id="figure1"/></p>
<p class="img-caption"><strong>图 3. </strong>HAL3 上 API2 中的 Android 7.0 相机和媒体堆栈。</p>
</li>
</ul>
@@ -131,22 +132,22 @@
<li><strong>常规</strong>。由于 IPC,设备需要额外带宽,这可能会影响对时间敏感的相机使用情况,例如高速视频录制。供应商可以通过运行 <code>android.hardware.camera2.cts.PerformanceTest</code> 和 Google 相机应用进行 120/240 FPS 高速视频录制,以衡量实际影响。设备还需要少量额外的 RAM 来创建新进程。</li>
<li><strong>在视频缓冲区中传递元数据</strong>(仅限 HAL1)。<em></em>如果 HAL1 在视频缓冲区中存储元数据而非实际的 YUV 帧数据,则 HAL 必须使用 <code>kMetadataBufferTypeNativeHandleSource</code> 作为元数据缓冲区类型,并在视频缓冲区中传递 <code>VideoNativeHandleMetadata</code>(<code>kMetadataBufferTypeCameraSource</code> 在 Android 7.0 中不再受支持)。通过 <code>VideoNativeHandleMetadata</code>,相机和媒体框架能够正确地对原生句柄进行序列化和反序列化,从而在进程之间传递视频缓冲区。</li>
<li><strong>缓冲区句柄地址不一定始终存储相同的缓冲区</strong>(仅限 HAL3)。<em></em>对于每个捕获请求,HAL3 会获取缓冲区句柄的地址。HAL 不能使用地址来识别缓冲区,因为地址可能会在 HAL 返回缓冲区之后存储另一个缓冲区句柄。您必须更新 HAL,以便使用缓冲区句柄来标识缓冲区。例如:HAL 接收缓冲区句柄地址 A,该地址存储缓冲区句柄 A。在 HAL 返回缓冲区句柄 A 之后,缓冲区句柄地址 A 可能在 HAL 下次接收到它时存储缓冲区句柄 B。</li>
-<li><strong>更新用于 cameraserver 的 SELinux 策略</strong>。如果设备特定的 SELinux 策略向 mediaserver 授予运行相机的权限,则您必须更新 SELinux 策略,以授予 cameraserver 正确的权限。我们建议不要为 cameraserver 复制 mediaserver 的 SELinux 策略(因为 mediaserver 和 cameraserver 通常在系统中需要不同的资源)。Cameraserver 应仅具有执行相机功能所需的权限,并且 mediaserver 中任何不必要的相机相关权限均应被删除。<p></p>
+<li><strong>更新用于 cameraserver 的 SELinux 策略</strong>。如果设备特定的 SELinux 策略向 mediaserver 授予运行相机的权限,则您必须更新 SELinux 策略,以授予 cameraserver 正确的权限。我们建议不要为 cameraserver 复制 mediaserver 的 SELinux 策略(因为 mediaserver 和 cameraserver 通常需要系统中的不同资源)。Cameraserver 应仅具有执行相机功能所需的权限,并且 mediaserver 中任何不必要的相机相关权限均应被移除。<p></p>
<h3 id="hardening_validation">验证</h3>
<p>对于包含相机且运行 Android 7.0 的所有设备,请通过运行 Android 7.0 CTS 来验证相关实现。尽管 Android 7.0 不包含验证相机服务更改的新 CTS 测试,但如果您尚未进行上述更新,则现有 CTS 测试将失败。</p>
<h2 id="version-history">Camera HAL 版本历史记录</h2>
-<p>有关可用于评估 Android Camera HAL 的测试列表,请参阅 <a href="/compatibility/cts/camera-hal.html">Camera HAL 测试核对清单</a>。</p>
+<p>要获取可用于评估 Android Camera HAL 的测试列表,请参阅 <a href="/compatibility/cts/camera-hal.html">Camera HAL 测试核对清单</a>。</p>
<h3 id="80">Android 8.0</h3>
<p>
-Android 8.0 版本中包含针对相机服务的以下主要增强功能:
+Android 8.0 版本中包含以下针对相机服务的主要增强功能:
</p>
<ul>
- <li>共享表面 - 可让多个表面共享同一个 <code>OutputConfiguration</code></li>
+ <li>共享 surface - 可让多个 surface 共享同一个 <code>OutputConfiguration</code></li>
<li>适用于自定义相机模式的系统 API</li>
<li><code>onCaptureQueueEmpty</code></li>
</ul>
@@ -155,7 +156,7 @@ Android 8.0 版本中包含针对相机服务的以下主要增强功能:
有关这些功能的详细信息,请参阅以下部分。
</p>
-<h4 id="shared-surfaces">共享表面</h4>
+<h4 id="shared-surfaces">共享 surface</h4>
<p>
借助此功能,只需一组缓冲区就可以驱动两个输出(例如预览和视频编码),从而降低功耗和内存消耗。要支持此功能,设备制造商需要确保其相机 HAL 和 gralloc HAL 实现可以创建将由多个不同消耗方(而不是仅一个消耗方;例如 Hardware Composer/GPU 和视频编码器)使用的 gralloc 缓冲区。相机服务会将消耗方使用情况标记传递到相机 HAL 和 gralloc HAL;它们需要分配正确的缓冲区类型,或者相机 HAL 需要返回一个表明该消耗方组合不受支持的错误。
@@ -175,7 +176,7 @@ Android 8.0 版本中包含针对相机服务的以下主要增强功能:
</p>
<p>
-要支持这一功能,OEM 只需将相应的新模式添加到其 HAL 接口即可,传递至 HAL 的这一整数会在 configure_streams 上触发该模式,然后 OEM 就可以让其自定义相机应用使用系统 API 了。</p>
+要支持这一功能,OEM 只需将新模式添加到其 HAL 即可,传递至 HAL 的这一整数会在 configure_streams 上触发该模式,然后 OEM 就可以让其自定义相机应用使用系统 API。</p>
<p>
此方法的名称是 <code><a href="https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession.StateCallback.html#onCaptureQueueEmpty(android.hardware.camera2.CameraCaptureSession)">android.hardware.camera2.CameraDevice#createCustomCaptureSession</a></code>。
@@ -186,7 +187,7 @@ Android 8.0 版本中包含针对相机服务的以下主要增强功能:
<h4 id="oncapturequeueempty">onCaptureQueueEmpty</h4>
<p>
-此 API 的目的是通过尽可能让请求队列为空,来缩短控制更改(如缩放)的延迟时间。<code>onCaptureQueueEmpty</code> 不需要 HAL 发挥作用;它只是一种框架端补充。想要利用此 API 的应用需要向回调添加监听器,并相应地发出响应。通常情况下,响应方式是向相机设备发送另一个捕获请求。
+此 API 的目的是通过尽可能让请求队列为空,来缩短控制更改(如缩放)的延迟时间。<code>onCaptureQueueEmpty</code> 不需要 HAL 发挥作用;它只是一种框架端补充。想要利用此 API 的应用需要向该回调添加监听器,并相应地做出响应。通常,响应方式是向相机设备发送另一个捕获请求。
</p>
<h3 id="34">3.4</h3>
@@ -197,7 +198,8 @@ Android 8.0 版本中包含针对相机服务的以下主要增强功能:
<li>如果支持 <code>RAW_OPAQUE</code> 格式,则必须强制添加 <code>ANDROID_SENSOR_OPAQUE_RAW_SIZE</code> 静态元数据。</li>
<li>如果支持任何 RAW 格式,则必须强制添加 <code>ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE</code> 静态元数据。</li>
<li>使用数据空间编码的版本 0 定义,将 <code>camera3_stream_t data_space</code> 字段切换为更灵活的定义。</li>
-<li>可用于 HALv3.2 或更高版本的常规元数据添加项:<ul>
+<li>可用于 HALv3.2 或更高版本的常规元数据添加项:
+ <ul>
<li>
<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#INFO_SUPPORTED_HARDWARE_LEVEL_3"><code>ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_3</code>
</a>
@@ -279,14 +281,14 @@ Android 8.0 版本中包含针对相机服务的以下主要增强功能:
<h2 id="module_version">相机模块版本历史记录</h2>
-<p>本部分基于 <code>camera_module_t.common.module_api_version</code> 提供了相机硬件模块的模块版本控制信息。两个最重要的十六进制数字表示主要版本,而两个最不重要的数字表示次要版本。</p>
+<p>本部分包含相机硬件模块的模块版本控制信息(基于 <code>camera_module_t.common.module_api_version</code>)。两个最重要的十六进制数字表示 Major 版本,而两个最不重要的数字表示 Minor 版本。</p>
<h3 id="24">2_4</h3>
<p>此相机模块版本添加了以下 API 更改:</p>
<ol>
- <li>手电筒模式支持。<em></em>框架可以为具有闪光灯元件的任何相机设备打开手电筒模式,而无需打开相机设备。相机设备对闪光灯单元的访问优先级高于相机模块;如果已通过模块接口启用手电筒,则打开相机设备会关闭手电筒。当出现任何资源冲突时(例如调用 <code>open()</code> 以打开相机设备),Camera HAL 模块必须通过手电筒模式状态回调通知框架,指明手电筒模式已关闭。</li>
+ <li>手电筒模式支持。<em></em>框架可以为具有闪光灯元件的任何相机设备打开手电筒模式,而无需打开相机设备。相机设备对闪光灯元件的访问优先级高于相机模块;如果已通过模块接口启用手电筒,则打开相机设备会关闭手电筒。当出现任何资源冲突时(例如调用 <code>open()</code> 以打开相机设备),Camera HAL 模块必须通过手电筒模式状态回调告知框架手电筒模式已关闭。</li>
<li>外部相机(如 USB 热插拔相机)支持。<em></em>仅当相机已连接且准备好用于外部热插拔相机时,API 更新才会指明相机静态信息可用。当相机状态不是 <code>CAMERA_DEVICE_STATUS_PRESENT</code> 时,获取静态信息的调用将为无效调用。框架仅依赖设备状态更改回调来管理可用的外部相机列表。
</li>
diff --git a/zh-cn/devices/graphics/index.html b/zh-cn/devices/graphics/index.html
index b61b571b..067d2c2a 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 或 <a href="https://developer.android.com/tools/sdk/ndk/index.html">Android NDK</a> 中提供的原生 API 调用其 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>
@@ -52,7 +52,7 @@
<h3 id="image_stream_consumers">图像流消耗方</h3>
-<p>图像流的最常见消耗方是 SurfaceFlinger,该系统服务会消耗当前可见的 Surface,并使用窗口管理器中提供的信息将它们合成到显示部分。SurfaceFlinger 是可以修改显示部分内容的唯一服务。SurfaceFlinger 使用 OpenGL 和 Hardware Composer 来合成一组 Surface。</p>
+<p>图像流的最常见消耗方是 SurfaceFlinger,该系统服务会消耗当前可见的 Surface,并使用窗口管理器中提供的信息将它们合成到显示部分。SurfaceFlinger 是可以修改所显示部分内容的唯一服务。SurfaceFlinger 使用 OpenGL 和 Hardware Composer 来合成一组 Surface。</p>
<p>其他 OpenGL ES 应用也可以消耗图像流,例如相机应用会消耗相机预览图像流。非 GL 应用也可以是消耗方,例如 ImageReader 类。</p>
@@ -112,6 +112,6 @@
<p>例如,应用可以将要在 GPU 中执行的工作加入队列。然后,GPU 开始绘制该图像。尽管图像尚未被绘制到内存中,但缓冲区指针仍然可以与指示 GPU 工作何时完成的栅栏一起传递到窗口合成器。然后,窗口合成器可以提前开始处理,并将工作移交给显示控制器。通过这种方式,CPU 工作可以提前完成。GPU 完成后,显示控制器就可以立即显示图像。</p>
-<p>同步框架还允许实现人员在自己的硬件组件中利用同步资源。最后,框架使实现人员能够查看图形管道,以帮助调试。</p>
+<p>同步框架还允许实现人员在自己的硬件组件中利用同步资源。最后,框架可让实现人员查看图形管道,以协助他们进行调试。</p>
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/graphics/renderer.html b/zh-cn/devices/graphics/renderer.html
index 57d60c07..cd1f4dbd 100644
--- a/zh-cn/devices/graphics/renderer.html
+++ b/zh-cn/devices/graphics/renderer.html
@@ -22,6 +22,8 @@
<p>本文档介绍了以充分利用硬件为目标的性能调校。</p>
+<p class="note"><strong>注意</strong>:在 Android 8.1 及更高版本中,只有 <code>ro.zygote.disable_gl_preload</code> 属性仍然适用。所有其他属性均已移除。</p>
+
<h2>OpenGLRenderer (libhwui) 属性</h2>
<p>本文档列出了您可以用来控制 Android 的 2D 硬件加速渲染管道的所有属性。将 <code>device.mk</code> 中的这些属性设为 <code>PRODUCT_PROPERTY_OVERRIDES</code>。</p>
@@ -67,7 +69,7 @@
<td><code>ro.hwui.patch_cache_size</code></td>
<td><code>integer</code></td>
<td><code>128</code></td>
- <td>定义每个进程中 9patch 缓存的大小(以千字节为单位)。此缓存仅保留顶点数据,因此可以保持小容量。每个顶点由 4 个浮点数或 16 个字节组成。</td>
+ <td>定义每个进程中 9-patch 缓存的大小(以千字节为单位)。此缓存仅保留顶点数据,因此可以保持小容量。每个顶点由 4 个浮点数(即 16 个字节)组成。</td>
</tr>
<tr>
@@ -131,19 +133,21 @@
<td><code>ro.zygote.disable_gl_preload</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
- <td>用于在启动时启用/停用 Zygote 中的 EGL/GL 驱动程序预加载。当此属性设为 false 时,Zygote 将通过调用 eglGetDisplay(EGL_DEFAULT_DISPLAY) 来预加载 GL 驱动程序。目标是加载 Zygote 中的动态库代码,以便与所有其他进程共享。如果驱动程序不支持共享,则将此属性设为 true。</td>
+ <td>用于在启动时启用/停用 Zygote 中的 EGL/GL 驱动程序预加载。当此属性设为 false 时,Zygote 将通过调用 eglGetDisplay(EGL_DEFAULT_DISPLAY) 来预加载 GL 驱动程序。
+目标是加载 Zygote 中的动态库代码,以便与所有其他进程共享。如果驱动程序不支持共享,则将此属性设为 true。</td>
</tr>
<tr>
<td><code>hwui.text_gamma_correction</code></td>
<td><code>string</code></td>
<td><code>lookup</code></td>
- <td>选择文字伽马校正方法。有以下四种方法可供选择:<ul>
- <li><code>lookup3</code>:基于查询表校正。伽马校正针对黑白文字的表现不同(请参见下方的阈值)。</li>
+ <td>选择文字伽马校正方法。有以下四种方法可供选择:
+ <ul>
+ <li><code>lookup3</code>:基于查询表校正。伽马校正针对黑白文字的表现并不相同(请参见下方的阈值)。</li>
<li><code>lookup</code>:基于单一查询表校正。</li>
- <li><code>shader3</code>:由 GLSL 着色器应用校正。伽马校正针对黑白文字的表现不同(请参见下方的阈值)。</li>
+ <li><code>shader3</code>:由 GLSL 着色器应用校正。伽马校正针对黑白文字的表现并不相同(请参见下方的阈值)。</li>
<li><code>shader</code>:由 GLSL 着色器应用校正。</li>
</ul>查询伽马校正在着色器数学受限的 GPU 上表现最出色。着色器伽马校正是节省内存的最佳选择。我们建议使用默认的 <code>lookup</code> 方法,它能够在质量、速度和内存使用方面提供理想的折中方案。
@@ -172,7 +176,7 @@
<td><code>hwui.use_gpu_pixel_buffers</code></td>
<td><code>boolean</code></td>
<td><code>true</code></td>
- <td>用于启用或停用 OpenGL ES 3.0 硬件上的 PBO。PBO 渲染程序会使用 PBO 来执行异步纹理上传,尤其是字体缓存。该属性应始终保持启用状态,但如果使用 PBO 导致出现损坏或性能低下的情况,则可以在启动或开发期间停用该属性。因此,该属性不是只读属性。</td>
+ <td>用于在 OpenGL ES 3.0 硬件上启用或停用 PBO。渲染器会使用 PBO 来执行异步纹理上传,尤其是字体缓存。该属性应始终保持启用状态,但如果使用 PBO 导致出现损坏或性能很低的情况,则可以在设备开发期间停用该属性。因此,该属性不是只读属性。</td>
</tr>
</tbody></table>
diff --git a/zh-cn/devices/graphics/run-tests.html b/zh-cn/devices/graphics/run-tests.html
index 0aee0e43..0cc98452 100644
--- a/zh-cn/devices/graphics/run-tests.html
+++ b/zh-cn/devices/graphics/run-tests.html
@@ -254,6 +254,6 @@ python android/scripts/debug.py \
<p class="note"><strong>注意</strong>:在 Windows 上,GDB 二进制文件需要使用 <code>libpython2.7.dll</code>。在启动 <code>debug.py</code> 前,请将 <code>&lt;path-to-ndk&gt;/prebuilt/windows/bin</code> 添加到 PATH 变量中。</p>
-<p class="note"><strong>注意</strong>:本机代码调试不适用于 Android 4.3。有关解决方法,请参考<a href="https://issuetracker.google.com/issues/36976703">此公开 Bug</a>。Android 4.4 及更高版本不包含此 Bug。</p>
+<p class="note"><strong>注意</strong>:本机代码调试不适用于原生 Android 4.3。有关解决方法,请参考<a href="https://issuetracker.google.com/issues/36976703">此公开 Bug</a>。Android 4.4 及更高版本不包含此 Bug。</p>
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/media/oem.html b/zh-cn/devices/media/oem.html
index c8923c6b..02f2d34d 100644
--- a/zh-cn/devices/media/oem.html
+++ b/zh-cn/devices/media/oem.html
@@ -49,7 +49,9 @@
<ol>
<li>首先使用 cts-tradefed 运行测试。
- </li><li>评估生成的失败消息。示例如下:<pre class="devsite-click-to-copy">
+ </li><li>评估生成的失败消息。示例如下:
+
+<pre class="devsite-click-to-copy">
There was 1 failure:
1) testGetMaxSupportedInstances(android.media.cts.MediaCodecCapabilitiesTest)
junit.framework.AssertionFailedError: In order to pass the test, please publish
@@ -95,8 +97,7 @@ following codecs' concurrent instances limit in /etc/media_codecs.xml:
<ol>
<li>首先使用 cts-tradefed 运行测试。鉴于 Android 性能的波动性,建议多次运行测试以获得更准确的最小值和最大值。
</li><li>使用提供的 <a href="https://android.googlesource.com/platform/cts/+/marshmallow-cts-dev/tools/cts-media/get_achievable_rates.py">get_achievable_rates.py</a> 脚本生成 XML 文件。
- </li><li>将 XML 文件放置在以下位置:<code>/etc/media_codecs_performance.xml</code><br />
-通常通过将 XML 文件放置在设备项目 (device/&lt;vendor&gt;&lt;product&gt;<em></em>/<em></em>) 中并将 <code>PRODUCT_COPY_FILES</code> 行添加到 <code>device.mk</code> 来完成此过程,如下所示:
+ </li><li>将 XML 文件放置在以下位置:<code>/etc/media_codecs_performance.xml</code><br />通常通过将 XML 文件放置在设备项目 (device/&lt;vendor&gt;/&lt;product&gt;) 中并将 <code>PRODUCT_COPY_FILES</code> 行添加到 <code>device.mk</code> 来完成此过程,如下所示:<em></em><em></em>
<pre class="devsite-click-to-copy">
PRODUCT_COPY_FILES += \
...
diff --git a/zh-cn/devices/sensors/batching.html b/zh-cn/devices/sensors/batching.html
index ffe3a2b5..13bee9bd 100644
--- a/zh-cn/devices/sensors/batching.html
+++ b/zh-cn/devices/sensors/batching.html
@@ -78,7 +78,7 @@
<li>应用同时注册到共用同一个 FIFO 的非唤醒计步器(采用 On-change 触发方式)和非唤醒加速度计(轮询模式)</li>
<li>应用收到一个计步器事件“step_count = 1000 步”</li>
<li>SoC 转至挂起状态</li>
- <li>用户步行 20 步,导致计步器和加速度计事件交错存储,最后的计步器事件为 “step_count = 1020 步”</li>
+ <li>用户步行 20 步,导致计步器和加速度计事件交错存储,最后的计步器事件为“step_count = 1020 步”</li>
<li>用户长时间不动,导致加速度计事件在 FIFO 中继续累积,最终覆盖共享 FIFO 中的各 step_count 事件</li>
<li>SoC 唤醒并将 FIFO 中的所有事件发送到应用</li>
<li>应用只收到了加速度计事件,并认为用户没有走步(糟糕!)</li>
diff --git a/zh-cn/devices/sensors/index.html b/zh-cn/devices/sensors/index.html
index 08e5df19..c2cde4b3 100644
--- a/zh-cn/devices/sensors/index.html
+++ b/zh-cn/devices/sensors/index.html
@@ -37,7 +37,7 @@
</ul>
<p>每个 Android 传感器都有一个“类型”,表示传感器的行为及其提供的数据。</p>
<ul>
- <li>官方 Android <a href="sensor-types.html">传感器类型</a> 在 <a href="https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h">sensors.h</a> 中的 SENSOR_TYPE_ 名称下定义:
+ <li>官方 Android <a href="sensor-types.html">传感器类型</a>在 <a href="https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/sensors.h">sensors.h</a> 中的 SENSOR_TYPE_ 名称下进行定义:
<ul>
<li>绝大多数传感器都具有官方传感器类型。</li>
<li>这些类型记录在 Android SDK 中。</li>
@@ -55,7 +55,7 @@
<ul>
<li>可以存在几个相同类型的传感器。例如,两个近程传感器或两个加速度计。</li>
<li>绝大多数应用仅会请求给定类型的单个传感器。例如,请求默认加速度计的应用将获得列表中的第一个加速度计。</li>
- <li>传感器通常由<a href="suspend-mode.html#wake-up_sensors">唤醒</a>和<a href="suspend-mode.html#non-wake-up_sensors">非唤醒</a>对定义,两个传感器共享同一类型,但其唤醒特性不同。</li>
+ <li>传感器通常由<a href="suspend-mode.html#wake-up_sensors">唤醒</a>和<a href="suspend-mode.html#non-wake-up_sensors">非唤醒</a>对定义,两种传感器共享同一类型,但其唤醒特性不同。</li>
</ul>
</li>
</ul>
@@ -73,7 +73,7 @@
<ul>
<li>概览
<ul>
- <li><a href="https://developer.android.com/guide/topics/sensors/sensors_overview.html"> https://developer.android.com/guide/topics/sensors/sensors_overview.html </a></li>
+ <li><a href="https://developer.android.com/guide/topics/sensors/sensors_overview.html">https://developer.android.com/guide/topics/sensors/sensors_overview.html</a></li>
</ul>
</li>
<li>SDK 参考
@@ -94,7 +94,7 @@
</ul>
<h3 id="targeted_at_manufacturers_public">面向制造商</h3>
<ul>
- <li> 概览
+ <li>概览
<ul>
<li>此<a href="/devices/sensors/index.html">传感器</a>页面及其子页面。</li>
</ul>
diff --git a/zh-cn/devices/sensors/sensor-stack.html b/zh-cn/devices/sensors/sensor-stack.html
index d98e89b9..14385215 100644
--- a/zh-cn/devices/sensors/sensor-stack.html
+++ b/zh-cn/devices/sensors/sensor-stack.html
@@ -57,7 +57,7 @@
<li>没有将数据从应用向下发送至传感器或其驱动程序的机制。这样可以确保某个应用无法修改传感器的行为,从而不会对其他应用造成破坏。</li>
</ul>
<h3 id="sensor_fusion">传感器融合</h3>
-<p>Android 框架为部分复合传感器提供默认实现。如果设备上有<a href="sensor-types.html#gyroscope">陀螺仪</a>、<a href="sensor-types.html#accelerometer">加速度计</a>和<a href="sensor-types.html#magnetic_field_sensor">磁力计</a>,但没有<a href="sensor-types.html#rotation_vector">旋转矢量</a>、<a href="sensor-types.html#gravity">重力</a>和<a href="sensor-types.html#linear_acceleration">线性加速度</a>传感器,则框架会实现这些传感器,以便应用仍可以使用它们。</p>
+<p>Android 框架为部分复合传感器提供默认实现。如果设备上有<a href="sensor-types.html#gyroscope">陀螺仪</a>、<a href="sensor-types.html#accelerometer">加速度计</a>和<a href="sensor-types.html#magnetic_field_sensor">磁力计</a>,但没有<a href="sensor-types.html#rotation_vector">旋转矢量</a>、<a href="sensor-types.html#gravity">重力</a>和<a href="sensor-types.html#linear_acceleration">线性加速度</a>传感器,则该框架会实现这些传感器,以便应用仍可以使用它们。</p>
<p>默认实现无法访问其他实现可以访问的所有数据,并且必须在 SoC 上运行,因此它不像其他实现那样精准和省电。设备制造商应尽可能定义自己的融合传感器(旋转矢量传感器、重力传感器和线性加速度传感器,以及<a href="sensor-types.html#game_rotation_vector">游戏旋转矢量</a>传感器等较新的复合传感器),而非依赖该默认实现。此外,设备制造商也可以要求传感器芯片供应商为其提供实现。</p>
<p>默认的传感器融合实现没有相关的维护,且可能导致依赖它的设备无法通过 CTS 验证。</p>
<h3 id="under_the_hood">深入了解</h3>
diff --git a/zh-cn/devices/storage/index.html b/zh-cn/devices/storage/index.html
index c6f954c2..80d29b33 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/multiuser-apps.html b/zh-cn/devices/tech/admin/multiuser-apps.html
index 81e95cd1..9f38e943 100644
--- a/zh-cn/devices/tech/admin/multiuser-apps.html
+++ b/zh-cn/devices/tech/admin/multiuser-apps.html
@@ -20,19 +20,22 @@
limitations under the License.
-->
-<p>对于支持<a href="multi-user.html">多用户</a>的设备,设备上的应用应能够感知不同的用户。</p>
+<p>对于支持<a href="multi-user.html">多用户</a>的设备,设备上的应用必须能够感知不同的用户。</p>
<p>某些应用需要将一些组件作为单例运行,并且可接受来自任意用户的请求。目前只有系统应用可以使用此功能。</p>
<p>这类设备具有以下优势:</p>
<ul>
- <li>节约资源</li><li>判定各个用户之间的一个或多个共享资源</li><li>通过使用单个服务器连接减少网络开销</li></ul>
+ <li>节约资源
+ </li><li>判定各个用户之间的一个或多个共享资源
+ </li><li>通过使用单个服务器连接减少网络开销
+</li></ul>
<p>有关多用户权限流程的描述,请参见下图。</p>
-<p><img src="images/multi-user-perms.png" alt="Multiple users permissions flow"/>
-</p><p class="img-caption"><strong>图 1</strong> 多用户权限</p>
+<p><img src="/devices/tech/admin/images/multi-user-perms.png" alt="多用户权限流程"/>
+</p><p class="img-caption"><strong>图 1.</strong> 多用户权限</p>
<h2 id="enabling_a_singleton_component">启用单例组件</h2>
@@ -48,7 +51,7 @@
<p>需要下列权限:</p>
-<pre>
+<pre class="devsite-click-to-copy">
INTERACT_ACROSS_USERS (signature|system)
INTERACT_ACROSS_USERS_FULL (signature)
</pre>
@@ -58,22 +61,25 @@ INTERACT_ACROSS_USERS_FULL (signature)
<p>使用下列 API,确保应用能够感知多个用户。</p>
<ol>
- <li>从传入的 Binder 调用中提取用户句柄:<ul>
+ <li>从传入的 Binder 调用中提取用户句柄:
+ <ul>
<li> <code>int userHandle = UserHandle.getCallingUserId()</code>
</li></ul>
- </li><li>使用受保护的全新 API 启动特定用户的服务、活动和广播:<ul>
+ </li><li>使用受保护的全新 API 启动特定用户的服务、Activity 和广播:
+ <ul>
<li><code>Context.startActivityAsUser(Intent, UserHandle)</code>
</li><li><code>Context.bindServiceAsUser(Intent, …, UserHandle)</code>
</li><li><code>Context.sendBroadcastAsUser(Intent, … , UserHandle)</code>
</li><li><code>Context.startServiceAsUser(Intent, …, UserHandle)
-UserHandle</code> 可能是显式用户或是特殊句柄之一:<code>UserHandle.CURRENT</code> 或 <code>UserHandle.ALL</code>。<code>CURRENT</code> 表示当前处于前台的用户。如果您想向所有用户发送广播,则可以使用 <code>ALL</code>。
+UserHandle</code> 可能是显式用户或特殊句柄之一:<code>UserHandle.CURRENT</code> 或 <code>UserHandle.ALL</code>。<code>CURRENT</code> 表示当前处于前台的用户。如果您想向所有用户发送广播,则可以使用 <code>ALL</code>。
</li></ul>
</li><li>要与您自己应用中的组件通信,请使用:
<code>(INTERACT_ACROSS_USERS)</code>
要与其他应用中的组件通信,请使用:
<code>(INTERACT_ACROSS_USERS_FULL)</code>
</li><li>您可能需要创建代理组件,这些代理组件在用户进程中运行,之后会访问用户 0 中的 <code>singleUser</code> 组件。
- </li><li>采用新的 <code>UserManager</code> 系统服务查询用户及其句柄:<ul>
+ </li><li>使用新的 <code>UserManager</code> 系统服务查询用户及其句柄:
+ <ul>
<li><code>UserManager.getUsers()</code>
</li><li><code>UserManager.getUserInfo()</code>
</li><li><code>UserManager.supportsMultipleUsers()</code>
@@ -81,7 +87,23 @@ UserHandle</code> 可能是显式用户或是特殊句柄之一:<code>UserHand
</li><li><code>UserManager.getUserHandle(int serialNumber)</code>
</li><li><code>UserManager.getUserProfiles() </code>- 返回用户本人个人资料和托管个人资料的集合(如有)。
</li></ul>
- </li><li>注册即可借助 ContentObserver、PackageMonitor 和 BroadcastReceiver 上的新 API 侦听特定或所有用户以及回调(可提供与回调发起用户相关的其他信息)。
+ </li><li>注册即可借助 ContentObserver、PackageMonitor 和 BroadcastReceiver 上的新 API 监听特定或所有用户以及回调(可提供与回调发起用户相关的其他信息)。
</li></ol>
+<h3 id="work-profiles">多个用户或资料中的服务</h3>
+
+<p>并非所有服务都需要在其他用户或工作资料中运行实例。如果您的系统服务只需要以用户 0 的身份运行,则在以其他用户的身份运行时停用该服务的组件,以帮助保留资源。以下示例显示了如何在服务的入口点执行此操作:</p>
+
+<pre class="devsite-click-to-copy">
+// Add on all entry points such as boot_completed or other manifest-listed receivers and providers
+if (!UserManager.isSystemUser()) {
+ // Disable the service
+ ComponentName targetServiceName = new ComponentName(this, TargetService.class);
+ context.getPackageManager().setComponentEnabledSetting(
+ targetServiceName, COMPONENT_ENABLED_STATE_DISABLED, 0);
+}
+</pre>
+
+<p>该示例还可以使用 <code>PackageManager.setApplicationEnabledSetting()</code> 来停用整个应用。</p>
+
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/tech/admin/provision.html b/zh-cn/devices/tech/admin/provision.html
index f7c0e419..46b73ed1 100644
--- a/zh-cn/devices/tech/admin/provision.html
+++ b/zh-cn/devices/tech/admin/provision.html
@@ -30,7 +30,7 @@
<p>托管配置是一个框架式界面流程,用于确保用户充分了解设置设备所有者或受管理资料的含义。它旨在充当受管理资料的设置向导。</p>
-<p class="note"><strong>注意</strong>:只能为未配置的设备设置设备所有者。如果已设置 <code>Settings.Secure.USER_SETUP_COMPLETE</code>,则设备被视为已配置,不能再设置设备所有者。</p>
+<p class="note"><strong>注意</strong>:只能为未配置的设备设置设备所有者。如果 <code>Settings.Secure.USER_SETUP_COMPLETE</code> 已设置,则设备会被视为已配置,不能再设置设备所有者。</p>
<p>如果启用设备的默认加密功能,则设备的管理配置流程会相当简单和快速。受管理配置组件会:</p>
@@ -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/admin/testing-provision.html b/zh-cn/devices/tech/admin/testing-provision.html
index af8cd38d..4ca77664 100644
--- a/zh-cn/devices/tech/admin/testing-provision.html
+++ b/zh-cn/devices/tech/admin/testing-provision.html
@@ -20,15 +20,15 @@
limitations under the License.
-->
-<p>Android for Work (AfW) 自动化测试框架是一个用于验证 Android 设备的 AfW 兼容性的测试套件。该套件包括支持应用、测试用例、配置文件和一个基于 <code>cts-tradefed</code> 的测试运行程序 (<code>afw-test-tradefed</code>)。您应在完成<a href="/devices/tech/admin/provision.html">设备管理配置</a>后再设置并运行 AfW 自动化测试框架。</p>
+<p>Android for Work (AfW) 自动化测试框架是一个用于验证 Android 设备的 AfW 兼容性的测试套件。该套件包括配套应用、测试用例、配置文件和一个基于 <code>cts-tradefed</code> 的测试运行程序 (<code>afw-test-tradefed</code>)。您应在完成<a href="/devices/tech/admin/provision.html">设备管理配置</a>后再设置并运行 AfW 自动化测试框架。</p>
-<p class="note"><strong>注意</strong>:AfW 自动化测试框架的编译和运行类似于 Android <a href="http://source.android.com/compatibility/cts/index.html">兼容性测试套件 (CTS)</a> 的编译和运行。</p>
+<p class="note"><strong>注意</strong>:AfW 自动化测试框架的编译和运行步骤与 Android <a href="/compatibility/cts/index.html">兼容性测试套件 (CTS)</a> 类似。</p>
<h2 id="setup_env">设置开发环境</h2>
-<p>AfW 自动化测试框架的开发环境类似于 Android 操作系统的开发环境。请按照<a href="/source/requirements.html">要求</a>中的步骤设置开发设备。</p>
+<p>AfW 自动化测试框架的开发环境类似于 Android 操作系统的开发环境。请按照相关<a href="/setup/requirements.html">要求</a>中的步骤设置开发设备。</p>
<h2 id="download_source">下载源代码</h2>
-<p>按照<a href="/source/downloading.html">下载源代码</a>中的步骤下载 AfW 自动化测试框架源代码。AfW 自动化测试框架源代码位于 <code>./test/AfwTestHarness</code> 项目中。要下载的 AfW 自动化测试框架版本取决于分支名称(每个 Android 平台都有其单独的 AfW 自动化测试框架版本)。Android 7.0 的分支名称为 <code>afw-test-harness-nougat-dev</code>。要初始化该分支的 Repo 并下载源代码,请使用:</p>
+<p>按照<a href="/setup/downloading.html">下载源代码</a>中的步骤下载 AfW 自动化测试框架源代码。AfW 自动化测试框架源代码位于 <code>./test/AfwTestHarness</code> 项目中。要下载的 AfW 自动化测试框架版本取决于分支名称(每个 Android 平台都具有单独的 AfW 自动化测试框架版本)。Android 7.0 的分支名称为 <code>afw-test-harness-nougat-dev</code>。要初始化该分支的 Repo 并下载源代码,请使用:</p>
<pre class="devsite-click-to-copy">
<code class="devsite-terminal">mkdir WORKING_DIRECTORY</code>
@@ -88,7 +88,8 @@ wifi_password (optional)
wifi_security_type (optional, available options are: NONE, WEP or WPA)
</pre>
</li>
-<li>从与 Test DPC(充当设备策略控制器)绑定的一个域中获取至少一个帐号。使用以下属性在 <code>afw-test.props</code> 中指定详细信息:<pre class="devsite-click-to-copy">
+<li>从与 Test DPC(充当设备策略控制器)绑定的网域获取至少一个帐号。使用以下属性在 <code>afw-test.props</code> 中指定详细信息:
+<pre class="devsite-click-to-copy">
work_account_username
work_account_password
</pre>
@@ -109,34 +110,40 @@ work_account_password
<pre class="devsite-terminal devsite-click-to-copy">
make afw-test-harness -j32
</pre>
-<p>该操作将创建一个目录 (<code>out/host/linux-x86/afw-th/android-cts</code>),该目录包含运行自动化测试框架所需的全部二进制文件、配置文件和工具。该目录还会被压缩在一个文件 (<code>out/host/linux-x86/afw-th/android-afw-test-harness.zip</code>) 中以供分发。</p>
+<p>该操作将创建一个目录 (<code>out/host/linux-x86/afw-th/android-cts</code>),该目录包含运行自动化测试框架所需的全部二进制文件、配置文件和工具。该目录还会被压缩成一个文件 (<code>out/host/linux-x86/afw-th/android-afw-test-harness.zip</code>) 以供分发。</p>
<h2 id="run_harness">运行 AfW 自动化测试框架</h2>
<p>请按照以下步骤运行 AfW 自动化测试框架:</p>
<ol>
-<li>使用以下命令,在您的编译环境中启动测试运行程序:<pre class="devsite-terminal devsite-click-to-copy">
+<li>在您的编译环境中使用以下命令启动测试运行程序:
+<pre class="devsite-terminal devsite-click-to-copy">
afw-test-tradefed
</pre>
-该操作将启动 <code>cts-tf</code> 控制台,并从 <code>out/host/linux-x86/afw-th/android-cts</code> 中加载测试计划、测试用例和 <code>afw-test.props</code>。</li>
-<li>使用以下命令,从 <code>android-afw-test-harness.zip</code> 的解压缩文件夹中启动测试运行程序:<pre class="devsite-click-to-copy">
+该操作将启动 <code>cts-tf</code> 控制台,并从 <code>out/host/linux-x86/afw-th/android-cts</code> 中加载测试方案、测试用例和 <code>afw-test.props</code>。</li>
+<li>使用以下命令,从解压缩 <code>android-afw-test-harness.zip</code> 后得到的文件夹中启动测试运行程序:
+<pre class="devsite-click-to-copy">
cts-tf&gt; ./android‐cts/tools/afw-test‐tradefed
</pre>
-该操作将从 <code>android-cts</code> 目录中加载测试计划、测试用例和 <code>afw-test.props</code>。
-请确保 <code>./android‐cts/repository/testcases/afw-test.props</code> 拥有工作帐号和 WLAN 配置。</li>
+该操作将从 <code>android-cts</code> 目录中加载测试方案、测试用例和 <code>afw-test.props</code>。请确保 <code>./android‐cts/repository/testcases/afw-test.props</code> 包含工作帐号和 WLAN 配置信息。</li>
+
+<li>运行测试方案。每个测试方案都是一个 XML 文件,其中包含从 <code>AfwTestHarness/tests</code> 测试包目录中获取的一组测试包。常见方案包括:
-<li>运行测试计划。每个测试计划都是一个 XML 文件,其中包含从 <code>AfwTestHarness/tests</code> 测试包目录中获取的一组测试包。常见计划包括:<ul>
+<ul>
<li><code><strong>afw-userdebug-build</strong></code>。它包含需要使用 userdebug 版本的所有测试包。</li>
-<li><code><strong>afw-user-build</strong></code>。该计划在 user 版本中运行,但要求对测试设备进行正确设置,其中包括完成初始设置以及启用 USB 调试。</li>
+<li><code><strong>afw-user-build</strong></code>。该方案在 user 版本中运行,但要求对测试设备进行正确设置,其中包括完成初始设置以及启用 USB 调试。</li>
</ul>
-<br />要运行测试计划 <code>afw-userdebug-build</code>,请使用:<pre class="devsite-click-to-copy">
+<br />要运行测试方案 <code>afw-userdebug-build</code>,请使用:<pre class="devsite-click-to-copy">
cts-tf&gt; run cts --plan afw-userdebug-build
-</pre>要查看所有测试计划,请使用命令 <code>list plans</code>。要查看计划定义,请参阅 <code>out/host/linux-x86/afw-th/android-cts/repository/plans</code>。
+</pre>
+要查看所有测试方案,请使用命令 <code>list plans</code>。要查看方案定义,请参阅 <code>out/host/linux-x86/afw-th/android-cts/repository/plans</code>。
<br />
</li>
-<li>运行测试包。要运行单个测试包,请使用:<pre class="devsite-click-to-copy">
+<li>运行测试包。要运行单个测试包,请使用:
+<pre class="devsite-click-to-copy">
cts-tf&gt; run cts --package com.android.afwtest.NfcProvisioning
-</pre>要查看所有测试包,请使用命令 <code>list packages</code>。要查看更多选项,请使用命令 <code>run cts --help</code>。</li>
+</pre>
+要查看所有测试包,请使用命令 <code>list packages</code>。要查看更多选项,请使用命令 <code>run cts --help</code>。</li>
</ol>
<h2 id="debug_harness">调试 AfW 自动化测试框架</h2>
@@ -144,17 +151,20 @@ cts-tf&gt; run cts --package com.android.afwtest.NfcProvisioning
<ul>
<li>使用 <code>-l INFO</code> 或 <code>-l
-DEBUG</code> 标记显示更多信息。示例:<pre class="devsite-click-to-copy">
+DEBUG</code> 标记显示更多信息。例如:
+<pre class="devsite-click-to-copy">
cts-tf&gt; run cts ‐‐plan afw-userdebug-build -l DEBUG
</pre>
</li>
-<li>在具有 <code>-s</code> 标记的设备上运行自动化测试框架。示例:<pre class="devsite-click-to-copy">
+<li>使用 <code>-s</code> 标记在特定设备上运行自动化测试框架。例如:
+<pre class="devsite-click-to-copy">
cts-tf&gt; run cts ‐‐plan afw-userdebug-build -l DEBUG -s device_sn
</pre>
</li>
-<li>在具有 <code>--all-devices</code> 标记的所有连接设备上运行自动化测试框架。示例:<pre class="devsite-click-to-copy">
+<li>使用 <code>--all-devices</code> 标记在所有连接设备上运行自动化测试框架。例如:
+<pre class="devsite-click-to-copy">
cts-tf&gt; run cts ‐‐plan afw-userdebug-build -l DEBUG --all-devices
</pre>
</li>
@@ -165,10 +175,11 @@ cts-tf&gt; run cts ‐‐plan afw-userdebug-build -l DEBUG --all-devices
<li>使用 <code>help list</code> 查看其他 <code>list</code> 命令。</li>
-<li>使用 <code>afwtest</code>,借助过滤器监控实时 logcat,然后打开另一个终端,并使用 <code>adb logcat | grep afwtest</code> 启动 logcat。测试完成后,请执行以下操作:<ul>
+<li>使用 <code>afwtest</code>,借助过滤器监控实时 logcat,然后打开另一个终端,并使用 <code>adb logcat | grep afwtest</code> 启动 logcat。测试完成后,请执行以下操作:
+<ul>
<li>在 <code>out/host/linux-x86/afw-th/android-cts/repository/logs/<em>start-time</em></code> 中查看日志。完整的设备 logcat 和主机日志(<code>afw-test-tradefed</code> 日志)会保存在单独的 ZIP 文件中。</li>
-<li>通过搜索设备 logcat,查看与 <strong>afwtest</strong> 相关的信息。示例:<code>zless
+<li>通过搜索设备 logcat,查看与 <strong>afwtest</strong> 相关的信息。例如:<code>zless
out/host/linux-x86/afw-th/android-cts/repository/logs/<em>start-time</em>/device_logcat_<em>random-number</em>.zip
| grep afwtest</code></li>
@@ -177,8 +188,7 @@ out/host/linux-x86/afw-th/android-cts/repository/logs/<em>start-time</em>/host_l
</li>
</ul>
</li>
-<li>测试包通过以下方式将 AfW 的配置流程自动化:访问界面页面,并将导航日志记录在每个页面的设备 logcat 文件中。
-示例:<code>afwtest.AutomationDriver:
+<li>测试包通过以下方式将 AfW 的配置流程自动化:访问界面页面,并将导航日志记录在每个页面的设备 logcat 文件中。例如:<code>afwtest.AutomationDriver:
Navigating:com.android.afwtest.uiautomator.pages.gms.AddAccountPage</code>
<br />用于测试包 <code>com.android.afwtest.NfcProvisioning</code> 的界面页面包括:<ul>
<li>
@@ -190,44 +200,42 @@ Navigating:com.android.afwtest.uiautomator.pages.gms.AddAccountPage</code>
</li>
<li>如果测试在配置过程中失败,logcat 将包含类似于以下内容的错误消息:<pre class="devsite-click-to-copy">
TestRunner: java.lang.RuntimeException: Failed to load page: com.android.afwtest.uiautomator.pages.packageinstaller.DeviceAccessPage
-</pre>这类错误通常是由之前的界面网页或加载失败的网页中的错误所导致,因此,请尝试在 logcat 中找到出现该错误之前的其他错误消息,然后按照配置流程手动重现该错误。</li>
-<li>如果测试包运行失败:<ul>
-<li>系统会使用以下语法将屏幕截图保存到 <code>out/host/linux-x86/afw-th/android-cts/repository/logs/<em>start-time</em></code>:
-<code>screenshot-test_<em>test_class_full_name</em>_<em>test_case_name</em>-<em>random_number</em>.png</code>。
-该信息也会记录在主机日志中。</li>
-<li>错误报告会以下列形式保存到 <code>out/host/linux-x86/afw-th/android-cts/repository/logs/<em>start-time</em></code>:
-<code>bug-<em>test_class_full_name</em>_<em>test_case_name</em>-<em>random_number</em>.zip</code>。
+</pre>
+这类错误通常是由之前的界面网页或加载失败的网页中的错误所导致,因此,请尝试在 logcat 中找到出现该错误之前的其他错误消息,然后按照配置流程手动重现该错误。</li>
+<li>如果测试包运行失败:
+<ul>
+<li>系统会使用以下语法将屏幕截图保存到 <code>out/host/linux-x86/afw-th/android-cts/repository/logs/<em>start-time</em></code>:<code>screenshot-test_<em>test_class_full_name</em>_<em>test_case_name</em>-<em>random_number</em>.png</code>。该信息也会记录在主机日志中。</li>
+<li>错误报告会以下列形式保存到 <code>out/host/linux-x86/afw-th/android-cts/repository/logs/<em>start-time</em></code>:<code>bug-<em>test_class_full_name</em>_<em>test_case_name</em>-<em>random_number</em>.zip</code>。
</li>
</ul>
</li>
-<li>所有测试包均执行完毕后,屏幕截图会以 <code>screenshot-<em>random_number</em>.png</code> 的形式保存到 <code>out/host/linux-x86/afw-th/android-cts/repository/logs/<em>start-time</em></code>。
-该信息也会记录在主机日志中。</li>
+<li>所有测试包均执行完毕后,屏幕截图会以 <code>screenshot-<em>random_number</em>.png</code> 的形式保存到 <code>out/host/linux-x86/afw-th/android-cts/repository/logs/<em>start-time</em></code>。该信息也会记录在主机日志中。</li>
</ul>
<h2 id="faq">常见问题解答</h2>
-<p>要针对未在下面解答的问题获取帮助,请通过 <a href="mailto:afw-testharness-support@google.com">afw-testharness-support@google.com</a> 联系我们。
+<p>如果下方未列出您的问题,请通过 <a href="mailto:afw-testharness-support@google.com">afw-testharness-support@google.com</a> 与我们联系。
</p>
-<p><strong>我是否可以在使用 user 版本刷机的设备上运行测试计划 <code>afw-userdebug-build</code>?</strong></p>
-<p><em>不可以。在运行实际测试流程前,<code>afw-userdebug-build</code> 计划工厂中的测试包会重置测试设备,并要求自动启用 <code>adb</code> 调试。在 user 版本中,用户只能通过手动更改开发者选项中的设置来启用 <code>adb</code> 调试。</em></p>
+<p><strong>我可以在刷入了 user 版本的设备上运行测试方案 <code>afw-userdebug-build</code> 吗?</strong></p>
+<p><em>不可以。在运行实际测试流程前,<code>afw-userdebug-build</code> 方案中的测试包会使测试设备恢复出厂设置,并要求自动启用 <code>adb</code> 调试。在 user 版本中,只能通过手动更改开发者选项中的设置来启用 <code>adb</code> 调试。</em></p>
-<p><strong>我是否可以在使用 userdebug 版本刷机的设备上运行测试计划 <code>afw-user-build</code>?</strong></p>
-<p><em>可以,但我们建议您在 user 版本中运行该测试计划。</em></p>
+<p><strong>我可以在刷入了 userdebug 版本的设备上运行测试方案 <code>afw-user-build</code> 吗?</strong></p>
+<p><em>可以,但我们建议您在 user 版本中运行该测试方案。</em></p>
<p><strong>有时候我的测试会因为界面加载时间过长而失败。该怎么解决这个问题?</strong></p>
<p><em>在 <code>./android-cts/repository/testcases/afw-test.props</code> 中配置 <code>timeout_size</code> 设置。有效设置为:S、M、L、XL 和 XXL。</em></p>
<p><strong>测试包 <code>com.android.afwtest.NfcProvisioning</code>(或 <code>SuwDoProvisioning</code>)无法在我的设备上成功运行,因为安装的初始设置(即设置向导)会在配置完成后显示自定义界面(例如“条款及条件”)。如何才能跳过该自定义界面?</strong></p>
-<p><em>在配置过程结束后,系统应显示最小化界面。如果界面所包含的按钮包含有意义的文本或内容描述,且文本或内容描述含有以下任何字词,则自动化测试框架将自动跳过此类界面:“跳过”、“结束”、“完成”、“接受”、“同意”、“下一步”、“继续”、“前进”。或者,您可以在 <code>afw-test.props</code> 中定义一个按钮,以便将自动化测试框架配置为跳过您的界面。示例:</em></p>
+<p><em>在配置过程结束后,步骤界面应该很少了。如果界面所包含的按钮包含有意义的文本或内容描述,且文本或内容描述含有以下任何字词,则自动化测试框架将自动跳过此类界面:“跳过”、“结束”、“完成”、“接受”、“同意”、“下一步”、“继续”、“前进”。或者,您可以在 <code>afw-test.props</code> 中定义一个按钮,以便将自动化测试框架配置为跳过您的界面。例如:</em></p>
<pre class="devsite-click-to-copy">
oem_widgets=your_btn
your_btn.text=your_customized_text
your_btn.package=your_package
your_btn.action=click
</pre>
-<p><em>要定义多个微件,请使用逗号分隔。</em></p>
+<p><em>要定义多个微件,请使用英文逗号分隔。</em></p>
-<p><strong>测试包 <code>com.android.afwtest.NfcProvisioning</code>(或 <code>SuwDoProvisioning</code>)运行失败,最后的界面屏幕显示“验证您的帐号”。为什么会发生这种情况?怎样才能恢复测试设备?
+<p><strong>测试包 <code>com.android.afwtest.NfcProvisioning</code>(或 <code>SuwDoProvisioning</code>)运行失败,最后的界面屏幕显示“验证您的帐号”。为什么会出现这种情况?怎样才能恢复测试设备?
</strong></p>
<p><em>出现该问题的原因是:之前的测试包未能在测试结束后停用恢复出厂设置保护功能。您必须手动输入帐号才能解锁设备。</em></p>
diff --git a/zh-cn/devices/tech/config/carrier.html b/zh-cn/devices/tech/config/carrier.html
index 75f04985..3ee73c0e 100644
--- a/zh-cn/devices/tech/config/carrier.html
+++ b/zh-cn/devices/tech/config/carrier.html
@@ -62,7 +62,7 @@
<h4 id="the_platform_config_app">平台配置应用</h4>
-<p>通用的平台配置应用会与系统映像捆绑在一起,而且该系统映像能够提供常规运营商应用不会提供的变量的值。平台配置应用可在 <code>packages/apps/CarrierConfig</code> 中找到(M 中)。</p>
+<p>通用的平台配置应用会与系统映像捆绑在一起,而且该系统映像能够提供常规运营商应用不会提供的变量的值。平台配置应用可在 <code>packages/apps/CarrierConfig</code> 中(M 中)找到</p>
<p>此应用的目的是在未安装运营商应用的情况下提供一些基于运营商网络的配置,运营商/OEM 应在他们自己的映像中对配置只做很小的改动。不过,运营商应该提供单独的运营商应用以实现运营商定制,从而使更新可以通过诸如应用商店之类的渠道分发给用户。</p>
@@ -109,7 +109,7 @@
<h3 id="configuration_keys">配置密钥</h3>
-<p>密钥列表被定义为 <code><a href="http://developer.android.com/reference/android/telephony/CarrierConfigManager.html">android.telephony. CarrierConfigManager</a></code> 中公共 SDK 的一部分,而且无法在相同的 API 级别中更改。有关密钥的摘要,请参见下表。</p>
+<p>密钥列表被定义为 <code><a href="http://developer.android.com/reference/android/telephony/CarrierConfigManager.html">android.telephony.CarrierConfigManager</a></code> 中公共 SDK 的一部分,而且无法在相同的 API 级别中更改。有关密钥的摘要,请参见下表。</p>
<h2 id="how_to_build_your_application">如何构建应用</h2>
@@ -117,11 +117,11 @@
<p>您的应用必须定位到 Android 6.0 API 级别 (23)。</p>
-<h3 id="declare_a_class_that_overrides_android_service_carrier_carrierservice">声明一个替换 android.service.CarrierCarrierService 的类</h3>
+<h3 id="declare_a_class_that_overrides_android_service_carrier_carrierservice">声明一个替换 android.service.carrier.CarrierService 的类</h3>
<ol>
<li>替换 <code>onLoadConfig</code> 以根据传递的 <code>service.carrier.CarrierIdentifier</code> 对象返回您希望提供的值。
- </li><li>添加逻辑以在运营商配置可能随时间发生改变的情况下调用 <code>notifyConfigChangedForSubId</code>(例如,当用户向其帐号添加额外服务时)
+ </li><li>添加逻辑以在运营商配置可能随时间发生改变的情况(例如,当用户向其帐号添加额外服务时)下调用 <code>notifyConfigChangedForSubId</code>
</li></ol>
<p>请参阅以下示例:</p>
diff --git a/zh-cn/devices/tech/config/filesystem.html b/zh-cn/devices/tech/config/filesystem.html
index 5cf8fbff..624d7ee3 100644
--- a/zh-cn/devices/tech/config/filesystem.html
+++ b/zh-cn/devices/tech/config/filesystem.html
@@ -20,7 +20,7 @@
limitations under the License.
-->
-<p>将文件系统对象和服务添加到编译环境中时,您通常需要分别为此类项目指定唯一 ID,称为 Android ID (AID)。目前,文件和服务等很多资源不需要一定使用 Android 定义的核心 AID;在很多情况下,您可以改为使用 OEM 定义的 AID。</p>
+<p>将文件系统对象和服务添加到编译环境中时,您通常需要分别为此类项目指定唯一 ID,称为 Android ID (AID)。目前,文件和服务等很多资源并非必须使用 Android 定义的核心 AID;在很多情况下,您可以改为使用 OEM 定义的 AID。</p>
<p>在早期版本的 Android 中,对 AID 机制进行扩展时,是使用设备专属的 <code>android_filesystem_config.h</code> 文件来指定文件系统权能和/或自定义 OEM AID。但是,此机制不够直观,因为它不支持 OEM AID 使用好记的名称,而是要求您为用户和群组字段指定原始数字,这样一来,便无法将好记的名称与数字 AID 关联起来。</p>
@@ -32,13 +32,12 @@
<li>将好记的名称与实际的 OEM AID 值相关联。支持为用户和群组指定非数字的字符串参数,即“foo”而不是“2901”。</li>
</ul>
-<p>其他改进包括从 <code>system/core/include/private/android_filesystem_config.h</code> 中移除了 <code>android_ids[]</code> 数组。
-该数组现在作为完全自行生成的数组存在于 Bionic 中,并具有通过 <code>getpwnam()</code> 和 <code>getgrnam()</code> 提取数据的访问器。(此改进还有另一个作用,即使核心 AID 发生更改,生成的二进制文件也可保持稳定。)如需了解这种机制以及查看包含更多详情的 README 文件,请参阅 <code>build/make/tools/fs_config</code>。</p>
+<p>其他改进包括从 <code>system/core/include/private/android_filesystem_config.h</code> 中移除了 <code>android_ids[]</code> 数组。该数组现在作为完全自行生成的数组存在于 Bionic 中,程序可通过 <code>getpwnam()</code> 和 <code>getgrnam()</code> 提取该数组中的数据。(此改进还有另一个作用,即使核心 AID 发生更改,生成的二进制文件也可保持稳定。)如需了解这种机制以及查看包含更多详情的 README 文件,请参阅 <code>build/make/tools/fs_config</code>。</p>
<aside class="note"><strong>注意</strong>:虽然您仍可以使用<a href="#older">旧版 Android 中的文件系统替换方法</a>,但不能同时再使用新的 AID 机制。建议您尽可能使用新的机制。</aside>
-<h2 id="adding-android-ids-aids">添加 Android ID (AID)</h2>
-<p>Android 8.0 从 Android 开放源代码项目 (AOSP) 中移除了 <code>android_ids[]</code> 数组。所有适合 AID 的名称都改为在生成 Bionic <code>android_ids[]</code> 数组时从 <code>system/core/include/private/android_filesystem_config.h</code> 标头文件生成。这种机制会提取与 <code>AID_*</code> 匹配的所有 <code>define</code>,且 <strong>*</strong> 会变为小写名称。</p>
+<h2 id="adding-android-ids-aids">添加 Android ID (AID)</h2>
+<p>Android 8.0 从 Android 开源项目 (AOSP) 中移除了 <code>android_ids[]</code> 数组。所有适合 AID 的名称都改为在生成 Bionic <code>android_ids[]</code> 数组时从 <code>system/core/include/private/android_filesystem_config.h</code> 标头文件生成。这种机制会提取与 <code>AID_*</code> 匹配的所有 <code>define</code>,且 <strong>*</strong> 会变为小写名称。</p>
<p>例如,在 <code>private/android_filesystem_config.h</code> 中:</p>
@@ -59,15 +58,15 @@
<aside class="caution"><strong>注意</strong>:请勿通过旧版 Android 中早期的 <code>TARGET_ANDROID_FILESYSTEM_CONFIG_H</code> 方法使用 <code>TARGET_FS_CONFIG_GEN</code>!否则,您会收到错误提示。</aside>
-<p>按照惯例,配置文件使用名称 <code>config.fs</code>,但在实践中,您可以使用任何名称。<code>config.fs</code> 文件采用 <a href="https://docs.python.org/2/library/configparser.html" class="external">Python ConfigParser ini 格式</a>,并包含大写部分(用于配置文件系统权能)和 AID 部分(用于配置 OEM 专属 AID)。
+<p>按照惯例,配置文件使用名称 <code>config.fs</code>,但在实践中,您可以使用任何名称。<code>config.fs</code> 文件采用 <a href="https://docs.python.org/2/library/configparser.html" class="external">Python ConfigParser ini 格式</a>,并包含 caps 部分(用于配置文件系统权能)和 AID 部分(用于配置 OEM 专属 AID)。
</p>
-<h3 id="configuring-the-caps-section">配置大写部分</h3>
-<p>大写部分支持在编译环境中对文件系统对象设置<a href="http://man7.org/linux/man-pages/man7/capabilities.7.html" class="external">文件系统权能</a>(文件系统本身也必须支持此功能)。</p>
+<h3 id="configuring-the-caps-section">配置 caps 部分</h3>
+<p>利用 caps 部分,您可以在编译环境中对文件系统对象设置<a href="http://man7.org/linux/man-pages/man7/capabilities.7.html" class="external">文件系统权能</a>(文件系统本身也必须支持此功能)。</p>
-<p>由于在 Android 中以 Root 身份运行稳定的服务会导致<a href="/compatibility/cts/index.html">兼容性测试套件 (CTS)</a> 失败,因此在之前有关在运行进程或服务时保留权能的要求中,您需要先设置权能,然后使用 <code>setuid</code>/<code>setgid</code> 设置适当的 AID 以运行程或服务。借助大写部分,您可以跳过这些要求,让内核为您代劳。当控制权交给 <code>main()</code> 时,您的进程就已拥有所需的权能,因此您的服务可以使用非 Root 用户和群组(这是启动特权服务的首选方式)。</p>
+<p>由于在 Android 中以 Root 身份运行稳定的服务会导致无法通过<a href="/compatibility/cts/index.html">兼容性测试套件 (CTS)</a> 测试,因此在之前有关在运行进程或服务时保留权能的要求中,您在运行进程或服务时需要先设置权能,然后使用 <code>setuid</code>/<code>setgid</code> 设置适当的 AID。借助 caps 部分,您可以跳过这些要求,让内核为您代劳。当控制权交给 <code>main()</code> 时,您的进程已拥有其所需的权能,因此您的服务可以使用非 Root 用户和群组(这是启动特权服务的首选方式)。</p>
-<p>大写部分使用以下语法:</p>
+<p>caps 部分使用以下语法:</p>
<table>
<tbody><tr>
<th>部分</th>
@@ -98,13 +97,14 @@
<tr>
<td><code>caps</code></td>
<td>cap*</td>
- <td><code>system/core/include/private/android_filesystem_capability.h</code> 中所声明的名称,不含前导 <code>CAP_</code>。允许大小写混用。大写也可以是原始值:<ul>
+ <td><code>system/core/include/private/android_filesystem_capability.h</code> 中所声明的名称,不含前导 <code>CAP_</code>。允许大小写混用。caps 条目也可以是原始值:
+ <ul>
<li>binary (0b0101)</li>
<li>octal (0455)</li>
<li>int (42)</li>
<li>hex (0xFF)</li>
</ul>
- 可以使用空格隔开多个大写字母。</td>
+ 可以使用空格分隔多个 caps 条目。</td>
</tr>
</tbody></table>
@@ -129,7 +129,8 @@
<td><code>value</code></td>
<td>&lt;number&gt;</td>
<td>有效的 C 样式的数字字符串(十六进制、八进制、二进制和十进制)。
- <br /><br />使用同一值选项指定多个部分<strong>或</strong>指定超出收录的 OEM 范围(在 <code>system/core/include/private/android_filesystem_config.h</code> 中指定)的值,属于错误的做法:<ul>
+ <br /><br />使用同一值选项指定多个部分<strong>或</strong>指定超出收录的 OEM 范围(在 <code>system/core/include/private/android_filesystem_config.h</code> 中指定)的值,属于错误的做法:
+ <ul>
<li>AID_OEM_RESERVED_START(2900) - AID_OEM_RESERVED_END(2999)</li>
<li>AID_OEM_RESERVED_2_START(5000) - AID_OEM_RESERVED_2_END(5999)</li>
</ul>
@@ -150,7 +151,7 @@
value: 2900
</pre>
-<p>创建好文件后,设置 <code>TARGET_FS_CONFIG_GEN</code> 变量并在 <code>BoardConfig.mk</code> 指向它。例如,在 <code>device/x/y/BoardConfig.mk</code> 中设置以下内容:</p>
+<p>创建好文件后,设置 <code>TARGET_FS_CONFIG_GEN</code> 变量并在 <code>BoardConfig.mk</code> 中指向它。例如,在 <code>device/x/y/BoardConfig.mk</code> 中设置以下内容:</p>
<pre class="prettyprint">TARGET_FS_CONFIG_GEN += device/x/y/config.fs</pre>
@@ -182,7 +183,7 @@ service foo /vendor/bin/foo_service
</pre>
<h3 id="using-file-system-capabilities">使用文件系统权能</h3>
-<p>要启用文件系统权能,请在 <code>config.fs</code> 文件中创建一个大写部分。例如,在 <code>device/x/y/config.fs</code> 中添加以下部分:</p>
+<p>要启用文件系统权能,请在 <code>config.fs</code> 文件中创建一个 caps 部分。例如,在 <code>device/x/y/config.fs</code> 中添加以下部分:</p>
<pre class="prettyprint">
[system/bin/foo_service]
@@ -202,7 +203,7 @@ caps: SYS_ADMIN | SYS_NICE
<h2 id="older">配置替换(Android 6.x 到 7.x 版本)</h2>
-<p>Android 6.0 将 <code>fs_config</code> 和关联的结构定义 (<code>system/core/include/private/android_filesystem_config.h</code>) 转移到了 <code>system/core/libcutils/fs_config.c</code>。在此处,可使用安装在 <code>/system/etc/fs_config_dirs</code> 和 <code>/system/etc/fs_config_files</code> 中的二进制文件来更新或替换它们。针对目录和文件分别采用单独的匹配和解析规则(可能会使用其他全局表达式),这样一来,Android 就能够在两个不同的表中处理目录和文件。<code>system/core/libcutils/fs_config.c</code> 中的结构定义不仅可让系统在运行时读取目录和文件,而且主机在编译时也可以使用相同的文件来构建文件系统映像,比方说 <code>${OUT}/system/etc/fs_config_dirs</code> 和 <code>${OUT}/system/etc/fs_config_files</code>。</p>
+<p>Android 6.0 将 <code>fs_config</code> 和关联的结构定义 (<code>system/core/include/private/android_filesystem_config.h</code>) 转移到了 <code>system/core/libcutils/fs_config.c</code>。在此处,可使用安装在 <code>/system/etc/fs_config_dirs</code> 和 <code>/system/etc/fs_config_files</code> 中的二进制文件来更新或替换它们。针对目录和文件分别采用单独的匹配和解析规则(可能会使用其他全局表达式),这样一来,Android 就能够在两个不同的表中处理目录和文件。<code>system/core/libcutils/fs_config.c</code> 中的结构定义不仅可让系统在运行时读取目录和文件,而且主机在编译时也可以使用相同的文件将文件系统映像构建为 <code>${OUT}/system/etc/fs_config_dirs</code> 和 <code>${OUT}/system/etc/fs_config_files</code>。</p>
<p>虽然扩展文件系统时采用的替换方法已被 Android 8.0 中推出的模块化配置系统所取代,但如果需要,您仍可以使用原来的方法。以下部分将详细介绍如何生成和纳入替换文件以及如何配置文件系统。</p>
@@ -304,7 +305,7 @@ index 0c71d21..235c1a7 100644
<p>当从 Android 5.x 及更低版本迁移文件系统时,请注意以下事项:</p>
<ul>
<li>Android 6.x 移除了部分头文件、结构和内嵌定义。</li>
-<li>Android 6.x 需要引用 <code>libcutils</code>,而不是直接从 <code>system/core/include/private/android_filesystem_config.h</code> 运行。依赖于 <code>system/code/include/private_filesystem_config.h</code> 的文件/目录结构或者 <code>fs_config</code> 的设备制造商私有可执行文件必须添加 <code>libcutils</code> 库依赖关系。</li>
+<li>Android 6.x 需要引用 <code>libcutils</code>,而不是直接从 <code>system/core/include/private/android_filesystem_config.h</code> 运行。依赖于 <code>system/code/include/private_filesystem_config.h</code> 的文件/目录结构或者 <code>fs_config</code> 的设备制造商私有可执行文件必须添加 <code>libcutils</code> 库依赖项。</li>
<li>Android 6.x 需要 <code>system/core/include/private/android_filesystem_config.h</code> 的设备制造商专有分支副本,该副本应包含有关现有目标的附加内容,以便移至 <code>device/<em>vendor</em>/<em>device</em>/android_filesystem_config.h</code>。
</li>
<li>由于 Android 保留将 SELinux 强制访问控制 (MAC) 应用于目标系统中配置文件的权利,因此包含使用 <code>fs_config()</code> 的自定义目标可执行文件的实现必须确保具有访问权限。
diff --git a/zh-cn/devices/tech/config/uicc.html b/zh-cn/devices/tech/config/uicc.html
index e8df1a50..3f8d4311 100644
--- a/zh-cn/devices/tech/config/uicc.html
+++ b/zh-cn/devices/tech/config/uicc.html
@@ -21,7 +21,7 @@
-->
<p>Android 5.1 引入了一种机制,即如果 API 与通用集成电路卡 (UICC) 所有者的应用相关,则可以向 API 授予特殊权限。Android 平台会加载存储在 UICC 上的证书,并向由这些证书签名的应用授予权限,允许其调用一些特殊的 API。</p>
-<p>Android 7.0 对该功能进行了扩展,以支持从其他存储源(例如访问规则文件 (ARF))读取 UICC 运营商权限规则,目的是大幅增加可以使用此类 API 的运营商数量。有关 API 参考,请参阅 <a href="#carrierconfigmanager">CarrierConfigManager</a>;有关说明,请参阅<a href="/devices/tech/config/carrier.html">运营商配置</a>。</p>
+<p>Android 7.0 对该功能进行了扩展,以支持从其他存储源(例如访问规则文件 (ARF))读取 UICC 运营商权限规则,目的是大幅增加可以使用这类 API 的运营商数量。有关 API 参考,请参阅 <a href="#carrierconfigmanager">CarrierConfigManager</a>;有关说明,请参阅<a href="/devices/tech/config/carrier.html">运营商配置</a>。</p>
<p>由于运营商拥有对 UICC 的完全控制权,该机制不仅提供了一种安全而灵活的方式来管理移动网络运营商 (MNO) 在通用应用分发渠道(如 Google Play)上托管的应用,同时运营商还保留对设备的特殊权限,无需使用针对单个设备的平台证书对应用进行签名,也无需作为系统应用进行预安装。</p>
@@ -80,7 +80,7 @@ E243 &lt;= 43 is value length in hex
<h3 id="telephonymanager">TelephonyManager</h3>
<ul>
-<li>用于允许运营商应用向 UICC 请求挑战/响应的 API:<a href="https://developer.android.com/reference/android/telephony/TelephonyManager.html#getIccAuthentication(int,%20int,%20java.lang.String)"><code>getIccAuthentication</code></a>。
+<li>用于允许运营商应用向 UICC 请求质询/响应的 API:<a href="https://developer.android.com/reference/android/telephony/TelephonyManager.html#getIccAuthentication(int,%20int,%20java.lang.String)"><code>getIccAuthentication</code></a>。
</li>
<li>用于检查发起呼叫的应用是否已获得运营商权限的 API:<a href="http://developer.android.com/reference/android/telephony/TelephonyManager.html#hasCarrierPrivileges()"><code>hasCarrierPrivileges</code></a>。
@@ -127,9 +127,9 @@ E243 &lt;= 43 is value length in hex
<h3 id="telephonyprovider">TelephonyProvider</h3>
-<p>允许对电话数据库进行修改(插入、删除、更新和查询)的内容提供程序 API。值字段在 <a href="https://developer.android.com/reference/android/provider/Telephony.Carriers.html"><code>Telephony.Carriers</code></a> 中定义;有关详情,请参阅 developer.android.com 上的 <a href="https://developer.android.com/reference/android/provider/Telephony.html">Telephony</a> API 参考。</p>
+<p>允许对电话数据库进行修改(插入、删除、更新和查询)的内容提供程序 API。值字段在 <a href="https://developer.android.com/reference/android/provider/Telephony.Carriers.html"><code>Telephony.Carriers</code></a> 中定义;有关详情,请参阅 developer.android.com 上的<a href="https://developer.android.com/reference/android/provider/Telephony.html">电话</a> API 参考。</p>
-<h2 id="android_platform">Android 平台 </h2>
+<h2 id="android_platform">Android 平台</h2>
<p>Android 平台会在检测到的 UICC 上构建内部 UICC 对象,此类对象会将运营商权限规则作为 UICC 的一部分包含在内。<a href="https://android.googlesource.com/platform/frameworks/opt/telephony/+/master/src/java/com/android/internal/telephony/uicc/UiccCarrierPrivilegeRules.java"><code>UiccCarrierPrivilegeRules.java</code></a> 会加载规则、在 UICC 卡上对规则进行解析,并将它们缓存在内存中。如果需要进行权限检查,<code>UiccCarrierPrivilegeRules</code> 会将来电者证书与其自身的规则逐一对比。如果 UICC 被移除,规则会连同 UICC 对象一起被销毁。</p>
diff --git a/zh-cn/devices/tech/connect/block-numbers.html b/zh-cn/devices/tech/connect/block-numbers.html
index 30752e9c..b61381af 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>
@@ -172,8 +172,7 @@ android.telephony.cts.SmsManagerTest#testSmsBlocking
</pre>
<p>
-在运行 <code>$ adb root</code> 之后,可以使用 <code>adb</code> 命令来操作 <code>BlockedNumberProvider</code>。例如:
-</p>
+在运行 <code>$ adb root</code> 之后,可以使用 <code>adb</code> 命令来操作 <code>BlockedNumberProvider</code>。例如:</p>
<pre class="devsite-click-to-copy">
<code class="devsite-terminal">adb root</code>
<code class="devsite-terminal">adb shell content query --uri content://com.android.blockednumber/blocked</code>
diff --git a/zh-cn/devices/tech/dalvik/gc-debug.html b/zh-cn/devices/tech/dalvik/gc-debug.html
index 8d65e6a0..d6bfef7c 100644
--- a/zh-cn/devices/tech/dalvik/gc-debug.html
+++ b/zh-cn/devices/tech/dalvik/gc-debug.html
@@ -208,7 +208,7 @@ adb shell setprop dalvik.vm.checkjni true
adb shell setprop dalvik.vm.jniopts forcecopy
</pre>
-<p>CheckJNI 应捕获错误的一个示例是超出从 <code>GetPrimitiveArrayCritical</code> 获取的数组末端的写入。该操作很可能会破坏 Java 堆。如果写入位于 CheckJNI 红色区域内,则在调用相应 <code>ReleasePrimitiveArrayCritical</code> 时,CheckJNI 将会捕获该问题。否则,写入将最终损坏 Java 堆中的一些随机对象,并可能会导致之后出现 GC 崩溃。<em></em>如果崩溃的内存是引用字段,则 GC 可能会捕获错误并输出“Tried to mark <ptr>not contained by any spaces</ptr>”这一错误消息。</p>
+<p>CheckJNI 应捕获错误的一个示例是超出从 <code>GetPrimitiveArrayCritical</code> 获取的数组末端的写入。该操作很可能会破坏 Java 堆。如果写入位于 CheckJNI 红色区域内,则在调用相应 <code>ReleasePrimitiveArrayCritical</code> 时,CheckJNI 将会捕获该问题。否则,写入将最终损坏 Java 堆中的一些随机对象,并可能会导致之后出现 GC 崩溃。<ptr></ptr>如果崩溃的内存是引用字段,则 GC 可能会捕获错误并输出“Tried to mark <em></em>not contained by any spaces”这一错误消息。</p>
<p>当 GC 尝试标记无法找到空间的对象时,就会发生此错误。在此检查失败后,GC 会遍历根,并尝试查看无效对象是否为根。结果共有两个选项:对象为根或非根。</p>
diff --git a/zh-cn/devices/tech/dalvik/improvements.html b/zh-cn/devices/tech/dalvik/improvements.html
index 8c82e4d6..87907a72 100644
--- a/zh-cn/devices/tech/dalvik/improvements.html
+++ b/zh-cn/devices/tech/dalvik/improvements.html
@@ -21,127 +21,243 @@
-->
<p>
-在 Android 8.0 版本中,Android Runtime (ART) 有了极大改进。下面的列表总结了设备制造商可以在 ART 中获得的增强功能。
+ 在 Android 8.0 版本中,Android Runtime (ART) 有了极大改进。下面的列表总结了设备制造商可以在 ART 中获得的增强功能。
</p>
-<h2 id="loop-optimizations">循环优化</h2>
+<h2 id="concurrent-compacting-gc">并发压缩式垃圾回收器</h2>
<p>
-在 Android 8.0 版本中,ART 采用了多种循环优化,具体如下:
+ 正如 Google 在 Google I/O 大会上所宣布的那样,ART 在 Android 8.0 中提供了新的并发压缩式垃圾回收器 (GC)。该回收器会在每次执行 GC 时以及应用正在运行时对堆进行压缩,且仅在处理线程根时短暂停顿一次。该回收器具有以下优势:
</p>
- <ul>
- <li>消除边界检查
- <ul>
- <li>静态:证明范围在编译时位于边界内
- </li><li>动态:运行时测试确保循环始终位于边界内(否则就是逆优化)
- </li></ul>
- </li><li>消除归纳变量
- <ul>
- <li>移除无用归纳</li><li>用封闭式表达式替换仅在循环后使用的归纳
- </li></ul>
- </li><li>消除循环主体内的无用代码,移除整个死循环</li><li>强度减少
- </li><li>循环转换:逆转、交换、拆分、展开、单模等。
- </li><li>SIMDization(也称为矢量化)</li>
- </ul>
+
+<ul>
+ <li>
+ GC 始终会对堆进行压缩:堆的大小平均比 Android 7.0 中的小 32%。
+ </li>
+ <li>
+ 得益于压缩,系统现可实现线程局部碰撞指针对象分配:分配速度比 Android 7.0 中的快 70%。
+ </li>
+ <li>
+ H2 基准的停顿次数比 Android 7.0 GC 的少 85%。
+ </li>
+ <li>
+ 停顿次数不再随堆的大小而变化,应用在使用较大的堆时也无需担心造成卡顿。
+ </li>
+ <li>GC 实现细节 - 读取屏障:
+ <ul>
+ <li>
+ 读取屏障是在读取每个对象字段时所做的少量工作。
+ </li>
+ <li>
+ 它们在编译器中经过了优化,但可能会减慢某些用例的速度。
+ </li>
+ </ul>
+</li></ul>
+
+<h2 id="loop-optimizations">循环优化</h2>
<p>
-循环优化器位于 ART 编译器中其自身的优化遍数中。
-大多数循环优化与其他方面的优化和简化类似。由于大多数 CFG 实用工具(请参阅 nodes.h)侧重于编译而不是重写 CFG,因此通过更复杂(与平时相比)的方式进行一些重写 CFG 的优化时,会面临挑战。
+ 在 Android 8.0 版本中,ART 采取了多种循环优化措施,具体如下:
</p>
-<h2 id="class-hierarchy-analysis">类层次结构分析</h2>
+<ul>
+ <li>消除边界检查
+ <ul>
+ <li>静态:在编译时证明范围位于边界内</li>
+ <li>
+ 动态:运行时测试确保循环始终位于边界内(否则不进行优化)
+ </li>
+ </ul>
+ </li>
+ <li>消除归纳变量
+ <ul>
+ <li>移除无用归纳</li>
+ <li>
+ 用封闭式表达式替换仅在循环后使用的归纳
+ </li>
+ </ul>
+ </li>
+ <li>
+ 消除循环主体内的无用代码,移除整个死循环
+ </li>
+ <li>强度降低</li>
+ <li>
+ 循环转换:逆转、交换、拆分、展开、单模等
+ </li>
+ <li>SIMDization(也称为矢量化)</li>
+</ul>
<p>
-在 Android 8.0 中,ART 会使用类层次结构分析 (CHA),这是一种编译器优化,可基于通过分析类层次结构所生成的信息,将虚拟调用去虚拟化为直接调用。虚拟调用代价高昂,因为它们围绕 vtable 查找来实现,且会占用几个依赖负载。另外,虚拟调用也不能内嵌。
+ 循环优化器位于 ART 编译器中一个独立的优化环节中。大多数循环优化与其他方面的优化和简化类似。由于大多数 CFG 实用工具(请参阅 nodes.h)侧重于编译而不是重写 CFG,因此通过更复杂(与平时相比)的方式进行一些重写 CFG 的优化时,会面临挑战。
</p>
+<h2 id="class-hierarchy-analysis">类层次结构分析</h2>
+
<p>
-以下是对相关增强功能的总结:
+ 在 Android 8.0 中,ART 会使用类层次结构分析 (CHA),这是一种编译器优化,可基于通过分析类层次结构所生成的信息,将虚拟调用去虚拟化为直接调用。虚拟调用代价高昂,因为它们围绕 vtable 查找来实现,且会占用几个依赖负载。另外,虚拟调用也不能内嵌。
</p>
- <ul>
- <li>动态单一实现方法状态更新 - 在类关联时间结束时,如果 vtable 已被填充,ART 会按条目对超类的 vtable 进行比较。</li>
- <li>编译器优化 - 编译器会利用某种方法的单一实现信息。如果方法 A.foo 设置了单一实现标记,则编译器会将虚拟调用去虚拟化为直接调用,并借此进一步尝试内联直接调用。</li>
- <li>已编译代码无效 - 另外,在类关联时间结束时,如果单一实现信息进行了更新,且方法 A.foo 之前拥有单一实现,但该状态现已变为无效,则依赖方法 A.foo 拥有单一实现这一假设的所有已编译代码都需要变为无效代码。</li>
- <li>去优化 - 对于堆栈上已编译的有效代码,系统会启动去优化功能,以强制使已编译代码进入解释器模式,从而确保正确性。系统会采用结合了同步和异步去优化的全新去优化机制。</li>
+
+<p>以下是对相关增强功能的总结:</p>
+
+<ul>
+ <li>
+ 动态单一实现方法状态更新 - 在类关联时间结束时,如果 vtable 已被填充,ART 会按条目对超类的 vtable 进行比较。
+ </li>
+ <li>编译器优化 - 编译器会利用某种方法的单一实现信息。如果方法 A.foo 设置了单一实现标记,则编译器会将虚拟调用去虚拟化为直接调用,并借此进一步尝试内嵌直接调用。
+ </li>
+ <li>
+ 已编译代码无效 - 另外,在类关联时间结束时,如果单一实现信息进行了更新,且方法 A.foo 之前拥有单一实现,但该状态现已变为无效,则依赖方法 A.foo 拥有单一实现这一假设的所有已编译代码都需要变为无效代码。
+ </li>
+ <li>
+ 去优化 - 对于堆栈上已编译的有效代码,系统会启动去优化功能,以强制使已编译无效代码进入解释器模式,从而确保正确性。系统会采用结合了同步和异步去优化的全新去优化机制。
+ </li>
</ul>
-<h2 id="inline-caches-in-oat-files">.oat 文件中的内联缓存</h2>
+<h2 id="inline-caches-in-oat-files">.oat 文件中的内嵌缓存</h2>
<p>
-ART 现在采用的是内联缓存,并优化了有足够数据可用的调用站点。内联缓存功能会将额外的运行时信息记录到配置文件中,并会利用这类信息将动态优化添加到预先编译中。
+ ART 现在采用内嵌缓存,并对有足够数据可用的调用站点进行优化。内嵌缓存功能会将额外的运行时信息记录到配置文件中,并利用这类信息将动态优化添加到预先编译中。
</p>
<h2 id="dexlayout">Dexlayout</h2>
<p>
-Dexlayout 是在 Android 8.0 中引入的一个库,用于分析 dex 文件,并根据配置文件对其进行重新排序。Dexlayout 旨在使用运行时配置信息对 dex 文件的各个部分进行重新排序(在设备的空闲维护编译期间)。通过将经常一起访问的部分 dex 文件集中在一起,程序可以因改进文件位置而拥有更好的内存访问模式,从而节省 RAM 并缩短启动时间。
+ Dexlayout 是在 Android 8.0 中引入的一个库,用于分析 dex 文件,并根据配置文件对其进行重新排序。Dexlayout 旨在使用运行时配置信息对 dex 文件的各个部分进行重新排序(在设备的空闲维护编译期间)。通过将经常一起访问的部分 dex 文件集中在一起,程序可以因改进文件位置而拥有更好的内存访问模式,从而节省 RAM 并缩短启动时间。
</p>
<p>
-由于配置文件信息目前仅在运行应用后可用,因此系统会在空闲维护期间将 dexlayout 集成到 dex2oat 的设备编译中。
+ 由于配置文件信息目前仅在运行应用后可用,因此系统会在空闲维护期间将 dexlayout 集成到 dex2oat 的设备编译中。
</p>
<h2 id="dex-cache-removal">Dex 缓存移除</h2>
<p>
-在 Android 7.0 及更早版本中,DexCache 对象拥有四个大型数组,与 DexFile 中特定元素的数量成正比,即:
+ 在 Android 7.0 及更早版本中,DexCache 对象拥有四个大型数组,与 DexFile 中特定元素的数量成正比,即:
</p>
<ul>
- <li>字符串(每个 DexFile :: StringId 一个引用),
+ <li>
+ 字符串(每个 DexFile::StringId 一个引用),
</li>
- <li>类型(每个 DexFile :: TypeId 一个引用),
+ <li>
+ 类型(每个 DexFile::TypeId 一个引用),
</li>
- <li>方法(每个 DexFile :: MethodId 一个原生指针),
+ <li>
+ 方法(每个 DexFile::MethodId 一个原生指针),
</li>
- <li>字段(每个 DexFile :: FieldId 一个原生指针)。
+ <li>
+ 字段(每个 DexFile::FieldId 一个原生指针)。
</li>
</ul>
<p>
- 这些数组用于快速检索我们以前解决的对象。在 Android 8.0 中,除方法数组外,所有数组都已移除。
+ 这些数组用于快速检索我们以前解析的对象。在 Android 8.0 中,除方法数组外,所有数组都已移除。
</p>
<h2 id="interpreter-performance">解释器性能</h2>
<p>
-通过引入 Mterp(一种解释器,具有以汇编语言编写的核心提取/解码/解释机制),Android 7.0 版本中的解释器性能得以显著提升。Mterp 模仿了快速的 Dalvik 解释器,并支持 arm、arm64、x86、x86_64、mips 和 mips64。对于计算代码而言,ART 的 Mterp 大致相当于 Dalvik 的快速解释器。不过,有时候,它的速度可能会显著变慢,甚至急剧变慢:
+ 通过引入 Mterp(一种解释器,具有以汇编语言编写的核心提取/解码/解释机制),Android 7.0 版本中的解释器性能得以显著提升。Mterp 模仿了快速 Dalvik 解释器,并支持 arm、arm64、x86、x86_64、mips 和 mips64。对于计算代码而言,ART 的 Mterp 大致相当于 Dalvik 的快速解释器。不过,有时候,它的速度可能会显著变慢,甚至急剧变慢:
</p>
- <ol>
- <li>调用性能。</li>
- <li>字符串操作和 Dalvik 中其他被视为内联函数的高频用户方法。</li>
- <li>堆栈内存使用量较高。</li>
- </ol>
+<ol>
+ <li>调用性能。</li>
+ <li>
+ 字符串操作和 Dalvik 中其他被视为内嵌函数的高频用户方法。
+ </li>
+ <li>堆栈内存使用量较高。</li>
+</ol>
+
+<p>Android 8.0 解决了这些问题。</p>
+
+<h2 id="more-inlining">详细了解内嵌</h2>
<p>
-Android 8.0 解决了这些问题。
+ 从 Android 6.0 开始,ART 可以内嵌同一个 dex 文件中的任何调用,但只能内嵌来自其他 dex 文件的叶方法。此项限制具有以下两个原因:
</p>
-<h2 id="more-inlining">详细了解内联</h2>
+<ol>
+ <li>
+ 从其他 dex 文件进行内嵌需要使用该 dex 文件的 dex 缓存,这与同一 dex 文件内嵌(只能重复使用调用程序的 dex 缓存)有所不同。已编译代码中需要具有 dex 缓存,以便执行一系列指令,例如静态调用、字符串加载或类加载。
+ </li><li>
+ 堆栈映射只对当前 dex 文件中的方法索引进行编码。
+ </li>
+</ol>
+
+<p>为了应对这些限制,Android 8.0 做出了以下改进:</p>
+
+<ol>
+ <li>从已编译代码中移除 dex 缓存访问(另请参阅“Dex 缓存移除”部分)</li>
+ <li>扩展堆栈映射编码。</li>
+</ol>
+
+<h2 id="synchronization-improvements">同步方面的改进</h2>
<p>
-从 Android 6.0 开始,ART 可以内联同一个 dex 文件中的任何调用,但只能内联来自其他 dex 文件的叶方法。实施此项限制的两个原因如下:
+ ART 团队调整了 MonitorEnter/MonitorExit 代码路径,并减少了我们对 ARMv8 上传统内存屏障的依赖,尽可能将其替换为较新的(获取/释放)指令。
</p>
- <ol>
- <li>从其他 dex 文件进行内联需要使用该 dex 文件的 dex 缓存,这与同一 dex 文件内联(只能重复使用调用程序的 dex 缓存)有所不同。已编译代码中需要具有 dex 缓存,以便执行一系列指令,例如静态调用、字符串加载或类加载。
- </li><li>堆栈映射只对当前 dex 文件中的方法索引进行编码。</li>
- </ol>
+<h2 id="faster-native-methods">更快速的原生方法</h2>
<p>
-为了取消这些限制,Android 8.0 做出了以下改进:
+ 可以使用 <a class="external" href="https://android.googlesource.com/platform/libcore/+/master/dalvik/src/main/java/dalvik/annotation/optimization/FastNative.java"><code>@FastNative</code></a> 和 <a class="external" href="https://android.googlesource.com/platform/libcore/+/master/dalvik/src/main/java/dalvik/annotation/optimization/CriticalNative.java"><code>@CriticalNative</code></a> 注解实现对 Java 原生接口 (JNI) 更快速的原生调用。这种内置的 ART 运行时优化加快了 JNI 转换并取代了现在已弃用的 !<em>bang JNI 标记。</em>注解对非原生方法没有任何影响,并且仅适用于 <code>bootclasspath</code> 上的平台 Java 语言代码(无 Play 商店更新)。
</p>
- <ol>
- <li>从已编译代码中移除 dex 缓存访问(另请参阅“Dex 缓存移除”部分)</li>
- <li>扩展堆栈映射编码。</li>
- </ol>
+<p>
+<code>@FastNative</code> 注解支持非静态方法。如果某种方法将 <code>jobject</code> 作为参数或返回值进行访问,请使用此注解。
+</p>
-<h2 id="synchronization-improvements">同步方面的改进</h2>
+<p>
+ 利用 <code>@CriticalNative</code> 注解,可更快速地运行原生方法,但存在以下限制:
+</p>
+
+<ul>
+ <li>
+ 方法必须是静态的 - 没有参数、返回值或隐式 <code>this</code> 的对象。
+ </li>
+ <li>仅将基元类型传递给原生方法。</li>
+ <li>
+ 原生方法在其函数定义中不使用 <code>JNIEnv</code> 和 <code>jclass</code> 参数。
+ </li>
+ <li>
+ 该方法必须是使用 <code>RegisterNatives</code> 注册的,而不是依靠动态 JNI 链接。
+ </li>
+</ul>
+
+<aside class="caution">
+ <p>
+ <code>@FastNative</code> 和 <code>@CriticalNative</code> 注解在执行原生方法时会停用垃圾回收。请勿使用运行时间较长的方法,包括通常很快但一般不受控制的方法。
+ </p>
+ <p>
+ 停顿垃圾回收可能会导致死锁。如果锁尚未得到本地释放(即尚未返回受管理代码),请勿在原生快速调用期间获取锁。此要求不适用于常规的 JNI 调用,因为 ART 将正执行的原生代码视为已暂停的状态。
+ </p>
+</aside>
<p>
-ART 团队调整了 MonitorEnter/MonitorExit 代码路径,并减少了我们对 ARMv8 上传统内存屏障的依赖,尽可能将其替换为较新的(获取/释放)指令。
+ <code>@FastNative</code> 可以使原生方法的性能提升高达 3 倍,<code>@CriticalNative</code> 则可以提升高达 5 倍。例如,在 Nexus 6P 设备上测量的 JNI 转换如下:
</p>
+<table>
+ <tbody><tr>
+ <th>Java 原生接口 (JNI) 调用</th>
+ <th>执行时间(以纳秒计)</th>
+ </tr>
+ <tr>
+ <td>常规 JNI</td>
+ <td>115</td>
+ </tr>
+ <tr>
+ <td><em>!bang JNI</em></td>
+ <td>60</td>
+ </tr>
+ <tr>
+ <td><code>@FastNative</code></td>
+ <td>35</td>
+ </tr>
+ <tr>
+ <td><code>@CriticalNative</code></td>
+ <td>25</td>
+ </tr>
+</tbody></table>
+
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/tech/dalvik/index.html b/zh-cn/devices/tech/dalvik/index.html
index 2c2deab8..5acef1a8 100644
--- a/zh-cn/devices/tech/dalvik/index.html
+++ b/zh-cn/devices/tech/dalvik/index.html
@@ -20,7 +20,7 @@
limitations under the License.
-->
-<p>Android Runtime (ART) 是 Android 上的应用和部分系统服务使用的托管运行时。ART 及其前身 Dalvik 最初是专为 Android 项目打造的。作为运行时的 ART 会执行 Dalvik 可执行文件并遵循 Dex 字节码规范。</p>
+<p>Android Runtime (ART) 是 Android 上的应用和部分系统服务使用的托管式运行时。ART 及其前身 Dalvik 最初是专为 Android 项目打造的。作为运行时的 ART 可执行 Dalvik 可执行文件并遵循 Dex 字节码规范。</p>
<p>ART 和 Dalvik 是运行 Dex 字节码的兼容运行时,因此针对 Dalvik 开发的应用也能在 ART 环境中运作。不过,Dalvik 采用的一些技术并不适用于 ART。有关最重要问题的信息,请参阅<a href="http://developer.android.com/guide/practices/verifying-apps-art.html">在 Android Runtime (ART) 上验证应用行为</a>。</p>
@@ -32,7 +32,7 @@
<p>ART 推出了预先 (AOT) 编译,可提高应用的性能。ART 还具有比 Dalvik 更严格的安装时验证。</p>
-<p>在安装时,ART 使用设备自带的 <strong>dex2oat</strong> 工具来编译应用。该实用工具接受 <a href="http://source.android.com/devices/tech/dalvik/dex-format.html">DEX</a> 文件作为输入,并针对目标设备生成已编译应用的可执行文件。该实用工具应能够毫不费力地编译所有有效的 DEX 文件。但是,一些后处理工具会生成无效文件,Dalvik 可以接受这些文件,但 ART 无法编译这些文件。有关详情,请参阅<a href="http://developer.android.com/guide/practices/verifying-apps-art.html#GC_Migration">解决垃圾回收问题</a>。</p>
+<p>在安装时,ART 使用设备自带的 <strong>dex2oat</strong> 工具来编译应用。该实用工具接受 <a href="/devices/tech/dalvik/dex-format.html">DEX</a> 文件作为输入,并针对目标设备生成已编译的应用可执行文件。该实用工具应能够毫不费力地编译所有有效的 DEX 文件。但是,一些后处理工具会生成无效文件,Dalvik 可以接受这些文件,但 ART 无法编译这些文件。有关详情,请参阅<a href="http://developer.android.com/guide/practices/verifying-apps-art.html#GC_Migration">解决垃圾回收问题</a>。</p>
<h3 id="Improved_GC">优化的垃圾回收</h3>
@@ -42,7 +42,7 @@
<li>采用一个而非两个 GC 暂停</li>
<li>在 GC 保持暂停状态期间并行处理</li>
<li>采用总 GC 时间更短的回收器清理最近分配的短时对象这种特殊情况</li>
- <li>优化了垃圾回收人机工程学,这样能够更加及时地进行并行垃圾回收,而这使得 <a href="http://developer.android.com/tools/debugging/debugging-memory.html#LogMessages"><code>GC_FOR_ALLOC</code></a> 事件在典型用例中极为罕见</li>
+ <li>优化了垃圾回收人机工程学,这样能够更加及时地进行并行垃圾回收,这使得 <a href="http://developer.android.com/tools/debugging/debugging-memory.html#LogMessages"><code>GC_FOR_ALLOC</code></a> 事件在典型用例中极为罕见</li>
<li>压缩 GC 以减少后台内存使用和碎片</li>
</ul>
@@ -70,10 +70,9 @@
<h4 id="Crash_Reports">优化了异常和崩溃报告中的诊断详细信息</h4>
-<p>当发生运行时异常时,ART 会为您提供尽可能多的上下文和详细信息。ART 会提供 <code><a href="http://developer.android.com/reference/java/lang/ClassCastException.html">java.lang.ClassCastException</a></code>、<code><a href="http://developer.android.com/reference/java/lang/ClassNotFoundException.html">java.lang.ClassNotFoundException</a></code> 和 <code><a href="http://developer.android.com/reference/java/lang/NullPointerException.html">java.lang.NullPointerException</a></code> 的更多异常详细信息。
-(更高版本的 Dalvik 提供 <code><a href="http://developer.android.com/reference/java/lang/ArrayIndexOutOfBoundsException.html">java.lang.ArrayIndexOutOfBoundsException</a></code> 和 <code><a href="http://developer.android.com/reference/java/lang/ArrayStoreException.html">java.lang.ArrayStoreException</a></code> 的更多异常详细信息,这些信息现在包括数组大小和超出范围的偏移量。同样,ART 也提供此类信息。)</p>
+<p>当发生运行时异常时,ART 会为您提供尽可能多的上下文和详细信息。ART 会提供 <code><a href="http://developer.android.com/reference/java/lang/ClassCastException.html">java.lang.ClassCastException</a></code>、<code><a href="http://developer.android.com/reference/java/lang/ClassNotFoundException.html">java.lang.ClassNotFoundException</a></code> 和 <code><a href="http://developer.android.com/reference/java/lang/NullPointerException.html">java.lang.NullPointerException</a></code> 的更多异常详细信息。(更高版本的 Dalvik 提供 <code><a href="http://developer.android.com/reference/java/lang/ArrayIndexOutOfBoundsException.html">java.lang.ArrayIndexOutOfBoundsException</a></code> 和 <code><a href="http://developer.android.com/reference/java/lang/ArrayStoreException.html">java.lang.ArrayStoreException</a></code> 的更多异常详细信息,这些信息现在包括数组大小和超出范围的偏移量。同样,ART 也提供此类信息。)</p>
-<p>例如,<code><a href="http://developer.android.com/reference/java/lang/NullPointerException.html">java.lang.NullPointerException</a></code> 现在会显示有关应用尝试处理 null 指针所进行操作(例如应用尝试写入的字段或尝试调用的方法)的信息。一些典型常见示例如下:</p>
+<p>例如,<code><a href="http://developer.android.com/reference/java/lang/NullPointerException.html">java.lang.NullPointerException</a></code> 现在会显示有关应用尝试处理 null 指针所进行操作的信息(例如应用尝试写入的字段或尝试调用的方法)。一些典型示例如下:</p>
<pre class="no-pretty-print">
java.lang.NullPointerException: Attempt to write to field 'int
@@ -88,7 +87,7 @@ java.lang.NullPointerException: Attempt to invoke virtual method
<h2 id="Reporting_Problems">报告问题</h2>
-<p>如果您遇到任何并非由应用 JNI 问题导致的问题,请通过 <a href="/source/report-bugs#platform">Android 开放源代码项目问题跟踪器</a>报告这些问题。请包含 <code>adb bugreport</code> 和应用在 Google Play 商店中的链接(如果有)。否则,如果可能,请附加可重现该问题的 APK。</p>
+<p>如果您遇到任何并非由应用 JNI 问题导致的问题,请通过 <a href="/setup/report-bugs#platform">Android 开源项目问题跟踪器</a>报告这些问题。请包含 <code>adb bugreport</code> 和应用在 Google Play 商店中的链接(如果有)。否则,如果可能,请附加可重现该问题的 APK。</p>
<aside class="caution"><strong>提醒</strong>:这些问题(包括附件)都是公开可见的。</aside>
diff --git a/zh-cn/devices/tech/datausage/tags-explained.html b/zh-cn/devices/tech/datausage/tags-explained.html
index fee14783..e97b4a43 100644
--- a/zh-cn/devices/tech/datausage/tags-explained.html
+++ b/zh-cn/devices/tech/datausage/tags-explained.html
@@ -1,5 +1,5 @@
<html devsite><head>
- <title>已说明的流量使用情况标签</title>
+ <title>流量消耗标签说明</title>
<meta name="project_path" value="/_project.yaml"/>
<meta name="book_path" value="/_book.yaml"/>
</head>
@@ -30,6 +30,6 @@
<p><code>a, b, c…</code> 表示与特定套接字关联的显式标签。</p>
<p><code>default_tag (acct_tag=0)</code> 是包含相应 uid 的总流量(包括所有未标记的流量)的默认帐号标签,通常用于强制执行监管/配额规则。</p>
<p>这些标签可用于将应用的网络流量划分到独立的逻辑类别中(在网络套接字级别)。可在运行时移除、重新应用或修改这些标签。</p>
-<p>qtaguid 模块已在 <a href="https://android-review.googlesource.com/#/q/project:kernel/common+branch:android-3.0,n,z">kernel/common branch of android-3.0</a> 上实现</p>
+<p>qtaguid 模块已在 <a href="https://android-review.googlesource.com/#/q/project:kernel/common+branch:android-3.0,n,z">kernel/common branch:android-3.0</a> 上实现</p>
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/tech/debug/ftrace.html b/zh-cn/devices/tech/debug/ftrace.html
index 7a193ca8..1dee6a9b 100644
--- a/zh-cn/devices/tech/debug/ftrace.html
+++ b/zh-cn/devices/tech/debug/ftrace.html
@@ -22,83 +22,120 @@
<p>ftrace 是一种调试工具,用于了解 Linux 内核中的情况。以下部分详细介绍了 ftrace 的基本功能、ftrace 与 atrace(捕获内核事件)如何配合使用,以及动态 ftrace。</p>
-<p>有关 systrace 中没有的 ftrace 高级功能的详情,请参阅位于以下位置的 ftrace 文档:<a href="https://www.kernel.org/doc/Documentation/trace/ftrace.txt"><code>&lt;kernel
+<p>要详细了解 systrace 中没有的 ftrace 高级功能,请参阅 ftrace 文档:<a href="https://www.kernel.org/doc/Documentation/trace/ftrace.txt"><code>&lt;kernel
tree&gt;/Documentation/trace/ftrace.txt</code></a>。</p>
<h2 id="atrace">通过 atrace 捕获内核事件</h2>
-<p>atrace (<code>frameworks/native/cmds/atrace</code>) 使用 ftrace 来捕获内核事件。反之,systrace.py(或更高版本的 <a href="https://github.com/catapult-project/catapult">Catapult</a> 中的 run_systrace.py)使用 adb 在设备上运行 atrace。atrace 执行以下操作:</p>
+<p>atrace (<code>frameworks/native/cmds/atrace</code>) 使用 ftrace 来捕获内核事件。反之,systrace.py(或更高版本的 <a href="https://github.com/catapult-project/catapult">Catapult</a> 中的 run_systrace.py)使用 adb 在设备上运行 atrace。atrace 会执行以下操作:</p>
<ul>
<li>通过设置属性 (<code>debug.atrace.tags.enableflags</code>) 来设置用户模式跟踪。</li>
-<li>通过写入适当的 ftrace sysfs 节点来启用所需的 ftrace 功能。不过,由于 ftrace 支持的功能更多,您可以自行设置一些 sysfs 节点,然后使用 atrace。</li>
+<li>通过写入相应的 ftrace sysfs 节点来启用所需的 ftrace 功能。不过,由于 ftrace 支持的功能更多,您可以自行设置一些 sysfs 节点,然后使用 atrace。</li>
</ul>
-<p>除了启动时跟踪之外,还可以通过使用 atrace 将属性设置为适当的值。属性是一个位掩码,除了查找适当的标头(在不同的 Android 版本之间会有所变化),没有确定正确值更好的办法了。</p>
+<p>您可以使用 atrace 将该属性设置为适当的值,但启动时跟踪除外。该属性是一个位掩码,除了查看相应的标头(在不同的 Android 版本之间会有所变化),没有确定正确值更好的办法了。</p>
<h2 id="enabling_events">启用 ftrace 事件</h2>
<p>ftrace sysfs 节点位于 <code>/d/tracing</code> 中,trace 事件在 <code>/d/tracing/events</code> 中被划分为多个类别。
-</p><p>要按类别启用事件,请使用:</p><pre>$ echo 1 &gt; /d/tracing/events/irq/enable</pre>
+</p><p>要按类别启用事件,请使用:
+</p><pre class="devsite-terminal devsite-click-to-copy">
+echo 1 &gt; /d/tracing/events/irq/enable
+</pre>
-<p>要按事件启用事件,请使用:</p><pre>$ echo 1 &gt; /d/tracing/events/sched/sched_wakeup/enable</pre>
+<p>要按事件启用事件,请使用:
+</p><pre class="devsite-terminal devsite-click-to-copy">
+echo 1 &gt; /d/tracing/events/sched/sched_wakeup/enable
+</pre>
<p>如果通过写入 sysfs 节点启用了额外的事件,这些事件将<strong>不会</strong>被 atrace 重置。Qualcomm 设备启动的常用模式是启用 <code>kgsl</code> (GPU) 和 <code>mdss</code>(显示管道)跟踪点,然后使用 atrace 或 <a href="/devices/tech/debug/systrace.html">systrace</a>:</p>
-<pre>$ adb shell "echo 1 &gt; /d/tracing/events/mdss/enable"
-$ adb shell "echo 1 &gt; /d/tracing/events/kgsl/enable"
-$ ./systrace.py sched freq idle am wm gfx view binder_driver irq workq ss sync -t 10 -b 96000 -o full_trace.html</pre>
+<pre class="devsite-click-to-copy">
+<code class="devsite-terminal">adb shell "echo 1 &gt; /d/tracing/events/mdss/enable"</code>
+<code class="devsite-terminal">adb shell "echo 1 &gt; /d/tracing/events/kgsl/enable"</code>
+<code class="devsite-terminal">./systrace.py sched freq idle am wm gfx view binder_driver irq workq ss sync -t 10 -b 96000 -o full_trace.html</code>
+</pre>
<p>您还可以单独使用 ftrace(不使用 atrace 或 systrace),这在您需要仅限内核的跟踪(或者您已经花时间手动写入用户模式跟踪属性)时很有帮助。如需只运行 ftrace,请执行以下操作:</p>
<ol>
-<li>将缓冲区大小设置为足以用于您跟踪的值:<pre>$ echo 96000 &gt; /d/tracing/buffer_size_kb</pre></li>
-<li>启用跟踪:<pre>$ echo 1 &gt; /d/tracing/tracing_on</pre></li>
-<li>运行您的测试,然后停用跟踪:<pre>$ echo 0 &gt; /d/tracing/tracing_on</pre></li>
-<li>转储跟踪:<pre>$ cat /d/tracing/trace &gt; /data/local/tmp/trace_output</pre>
-</li></ol>
+<li>将缓冲区大小设置为足以用于您跟踪的值:
+<pre class="devsite-terminal devsite-click-to-copy">
+echo 96000 &gt; /d/tracing/buffer_size_kb
+</pre>
+</li>
+<li>启用跟踪:
+<pre class="devsite-terminal devsite-click-to-copy">
+echo 1 &gt; /d/tracing/tracing_on
+</pre>
+</li>
+<li>运行您的测试,然后停用跟踪:
+<pre class="devsite-terminal devsite-click-to-copy">
+echo 0 &gt; /d/tracing/tracing_on
+</pre>
+</li>
+<li>转储跟踪:
+<pre class="devsite-terminal devsite-click-to-copy">
+cat /d/tracing/trace &gt; /data/local/tmp/trace_output
+</pre>
+</li>
+</ol>
-<p>trace_output 以文本形式提供跟踪记录。要使用 Catapult 将其可视化,请从 Github 获取 <a href="https://github.com/catapult-project/catapult/tree/master/">Catapult 存储区</a>并运行 trace2html:</p>
+<p>trace_output 以文本形式提供跟踪记录。要使用 Catapult 将其可视化,请从 Github 获取 <a href="https://github.com/catapult-project/catapult/tree/master/">Catapult 代码库</a>并运行 trace2html:</p>
-<pre>$ catapult/tracing/bin/trace2html ~/path/to/trace_file</pre>
+<pre class="devsite-terminal devsite-click-to-copy">
+catapult/tracing/bin/trace2html ~/path/to/trace_file
+</pre>
<p>默认情况下,此操作会将 <code>trace_file.html</code> 写入同一目录中。</p>
<h2 id="correlate">相关事件</h2>
-<p>同时查看 Catapult 可视化内容和 ftrace 日志通常很有帮助,例如,某些 ftrace 事件(尤其是特定于供应商的事件)未经 Catapult 可视化。不过,Catapult 的时间戳与跟踪记录中的第一个事件或 atrace 所转储的特定时间戳相关,而原始的 ftrace 时间戳则基于 Linux 内核中的特别绝对时钟源。</p>
+<p>同时查看 Catapult 可视化内容和 ftrace 日志通常很有帮助,例如,某些 ftrace 事件(尤其是特定于供应商的事件)未经 Catapult 可视化。不过,Catapult 的时间戳与跟踪记录中的第一个事件或 atrace 所转储的特定时间戳相关,而原始的 ftrace 时间戳则基于 Linux 内核中的特定绝对时钟源。</p>
<p>要从 Catapult 事件中查找特定的 ftrace 事件,请执行以下操作:</p>
<ol>
-<li>打开原始的 ftrace 日志。最新版本的 systrace 中的跟踪记录默认经过压缩:<ul>
-<li>如果您使用 <code>--no-compress</code> 捕获 systrace,则跟踪记录在 html 文件中以 BEGIN TRACE 开头的部分。</li>
+<li>打开原始的 ftrace 日志。最新版本的 systrace 中的跟踪记录默认经过压缩:
+<ul>
+<li>如果您使用 <code>--no-compress</code> 捕获 systrace,则跟踪记录位于 html 文件中以 BEGIN TRACE 开头的部分。</li>
<li>如果没有,请从 <a href="https://github.com/catapult-project/catapult/tree/master/">Catapult 树</a> (<code>tracing/bin/html2trace</code>) 运行 html2trace 来解压缩跟踪记录。</li>
</ul>
</li>
<li>在 Catapult 可视化中查找相对时间戳。</li>
-<li>在跟踪记录的开头找到一行包含 <code>tracing_mark_sync</code> 的内容。该行应该与以下内容相似:<pre>&lt;5134&gt;-5134 (-----) [003] ...1 68.104349: tracing_mark_write: trace_event_clock_sync: parent_ts=68.104286</pre>
+<li>在跟踪记录的开头找到一行包含 <code>tracing_mark_sync</code> 的内容。该行应该与以下内容相似:
+<pre class="devsite-click-to-copy">
+&lt;5134&gt;-5134 (-----) [003] ...1 68.104349: tracing_mark_write: trace_event_clock_sync: parent_ts=68.104286
+</pre>
-<br />如果此行不存在(或者您使用没有 atrace 的 ftrace),则计时将与 ftrace 日志中的第一个事件相关。
+<br />如果此行不存在(或者您在使用 ftrace 时没有使用 atrace),则时间将相对于 ftrace 日志中的第一个事件。
<ol style="list-style-type: lower-alpha">
<li>将相对时间戳(以毫秒为单位)添加到 <code>parent_ts</code>(以秒为单位)中的值。</li>
<li>搜索新时间戳。</li>
</ol>
</li>
</ol>
-<p>按照这些步骤操作之后,您应该会找到(或至少非常接近于)要找的事件。</p>
+<p>执行这些步骤之后,您应该会找到(或至少非常接近于)要找的事件。</p>
<h2 id="dftrace">使用动态 ftrace</h2>
-<p>当 systrace 和标准 ftrace 不足时,还有最后一种可用资源:动态 ftrace。<em></em>动态 ftrace 涉及在启动后重写内核代码,因此出于安全考虑,它在正式版内核中不可用。不过,2015 和 2016 版中的每个严重性能错误最终都使用动态 ftrace 找出了根本原因。它在调试不间断休眠方面的功能尤其强大,因为每次命中触发不间断休眠的函数时,您都会获得内核中的堆栈跟踪记录。您还可以调试中断和抢占被停用的部分,这对证明问题非常有帮助。</p>
+<p>当 systrace 和标准 ftrace 不能满足需求时,还有最后一种可用资源:动态 ftrace。<em></em>动态 ftrace 涉及在启动后重写内核代码,因此出于安全考虑,它在正式版内核中不可用。不过,2015 和 2016 版中的每个严重性能错误最终都使用动态 ftrace 找出了根本原因。它在调试不间断休眠方面的功能尤其强大,因为每次命中触发不间断休眠的函数时,您都会在内核中获得堆栈跟踪记录。您还可以调试中断和抢占被停用的部分,这对证明问题非常有帮助。</p>
<p>要开启动态 ftrace,请修改您内核的 defconfig:</p>
<ol>
<li>移除 CONFIG_STRICT_MEMORY_RWX(如果存在)。如果您使用的是 3.18 或更新版本以及 arm64,则不存在。</li>
<li>添加以下内容:CONFIG_DYNAMIC_FTRACE=y、CONFIG_FUNCTION_TRACER=y、CONFIG_IRQSOFF_TRACER=y、CONFIG_FUNCTION_PROFILER=y 和 CONFIG_PREEMPT_TRACER=y</li>
-<li>重建和启动新内核。</li>
-<li>运行以下代码以检查可用的跟踪工具:<pre>$ cat /d/tracing/available_tracers</pre></li>
+<li>重新编译和启动新内核。</li>
+<li>运行以下代码以检查可用的跟踪工具:
+<pre class="devsite-terminal devsite-click-to-copy">
+cat /d/tracing/available_tracers
+</pre>
+</li>
<li>确认命令返回 <code>function</code>、<code>irqsoff</code>、<code>preemptoff</code> 和 <code>preemptirqsoff</code>。</li>
-<li>运行以下命令以确保动态 ftrace 正常运行:<pre>$ cat /d/tracing/available_filter_functions | grep &lt;a function you care about&gt;</pre>
+<li>运行以下命令以确保动态 ftrace 正常运行:
+<pre class="devsite-terminal devsite-click-to-copy">
+cat /d/tracing/available_filter_functions | grep &lt;a function you care about&gt;
+</pre>
</li>
</ol>
@@ -108,21 +145,45 @@ $ ./systrace.py sched freq idle am wm gfx view binder_driver irq workq ss sync -
<section class="expandable">
<h4 class="showalways">显示问题:HDR 照片 + 旋转取景器</h4>
-<p>在此问题中,每次使用 Pixel XL 拍摄 HDR + 照片后立即旋转取景器时都会造成卡顿。我们使用函数分析器不到一个小时就调试了该问题。要按照示例进行操作,请<a href="perf_traces.zip">下载跟踪记录的 ZIP 文件</a>(其中包括本部分中提到的其他跟踪记录),解压下载的文件,然后在浏览器中打开 trace_30898724.html 文件。</p>
+<p>对于此问题,每次使用 Pixel XL 拍摄 HDR + 照片后立即旋转取景器时都会造成卡顿。我们使用函数分析器不到一个小时就调试了该问题。要按照示例进行操作,请<a href="perf_traces.zip">下载跟踪记录的 ZIP 文件</a>(其中包括本部分中提到的其他跟踪记录),解压缩下载的文件,然后在浏览器中打开 trace_30898724.html 文件。</p>
-<p>跟踪记录显示 cameraserver 进程中的一些线程在 <code>ion_client_destroy</code> 上的不间断休眠模式下被屏蔽。此为高代价函数,但不得经常调用,因为 ion 客户端应该包含多项分配。最初是将原因归咎于 Halide 中的 Hexagon 代码,它确实是其中一个原因(它为每个 ion 分配创建新的客户端,并在分配被释放时破坏相应客户端,其代价太高了)。转为适用于所有 Hexagon 分配的单个 ion 客户端改善了这种情况,但卡顿问题并没有得到解决。</p>
+<p>跟踪记录显示 cameraserver 进程中的一些线程在 <code>ion_client_destroy</code> 上的不间断休眠模式下被屏蔽。此为高代价函数,只能极为偶尔地调用,因为 ion 客户端应该包含多项分配。最初是将原因归咎于 Halide 中的 Hexagon 代码,它确实是其中一个原因(它为每个 ion 分配创建了新的客户端,并在分配被释放时破坏相应客户端,其代价太高了)。改为针对所有 Hexagon 分配使用单个 ion 客户端改善了这种情况,但卡顿问题并没有得到解决。</p>
<p>此时,我们需要知道谁在调用 <code>ion_client_destroy</code>,这就要使用函数分析器:</p>
<p></p>
<ol>
-<li>由于编译人员有时会对函数进行重命名,因此通过使用以下命令确认 <code>ion_client_destroy</code> 是否存在:<pre>$ cat /d/tracing/available_filter_functions | grep ion_client_destroy</pre>
-</li>
-<li>确认存在之后,将其用作 ftrace 过滤器:<pre>$ echo ion_client_destroy &gt; /d/tracing/set_ftrace_filter</pre></li>
-<li>开启函数分析器:<pre>$ echo function &gt; /d/tracing/current_tracer</pre></li>
-<li>每次调用筛选器函数时均开启堆栈跟踪:<pre>$ echo func_stack_trace &gt; /d/tracing/trace_options</pre></li>
-<li>增加缓冲区大小:<pre>$ echo 64000 &gt; /d/tracing/buffer_size_kb</pre></li>
-<li>开启跟踪功能:<pre>$ echo 1 &gt; /d/tracing/trace_on</pre></li>
-<li>运行测试并获取跟踪记录:<pre>$ cat /d/tracing/trace &gt; /data/local/tmp/trace</pre></li>
-<li>查看跟踪,以查看大量堆栈跟踪记录:<pre> cameraserver-643 [003] ...1 94.192991: ion_client_destroy &lt;-ion_release
+<li>由于编译器有时会对函数进行重命名,因此通过使用以下命令确认 <code>ion_client_destroy</code> 是否存在:
+<pre class="devsite-terminal devsite-click-to-copy">
+cat /d/tracing/available_filter_functions | grep ion_client_destroy
+</pre>
+</li>
+<li>确认存在之后,将其用作 ftrace 过滤器:
+<pre class="devsite-terminal devsite-click-to-copy">
+echo ion_client_destroy &gt; /d/tracing/set_ftrace_filter
+</pre>
+</li>
+<li>开启函数分析器:
+<pre class="devsite-terminal devsite-click-to-copy">
+echo function &gt; /d/tracing/current_tracer
+</pre>
+</li>
+<li>每次调用筛选器函数时均开启堆栈跟踪:<pre class="devsite-terminal devsite-click-to-copy">
+echo func_stack_trace &gt; /d/tracing/trace_options
+</pre>
+</li>
+<li>增加缓冲区大小:<pre class="devsite-terminal devsite-click-to-copy">
+echo 64000 &gt; /d/tracing/buffer_size_kb
+</pre>
+</li>
+<li>开启跟踪功能:<pre class="devsite-terminal devsite-click-to-copy">
+echo 1 &gt; /d/tracing/trace_on
+</pre>
+</li>
+<li>运行测试并获取跟踪记录:<pre class="devsite-terminal devsite-click-to-copy">
+cat /d/tracing/trace &gt; /data/local/tmp/trace
+</pre>
+</li>
+<li>查看跟踪,以查看大量堆栈跟踪记录:<pre class="devsite-click-to-copy">
+ cameraserver-643 [003] ...1 94.192991: ion_client_destroy &lt;-ion_release
cameraserver-643 [003] ...1 94.192997: &lt;stack trace&gt;
=&gt; ftrace_ops_no_ops
=&gt; ftrace_graph_call
@@ -132,7 +193,9 @@ $ ./systrace.py sched freq idle am wm gfx view binder_driver irq workq ss sync -
=&gt; ____fput
=&gt; task_work_run
=&gt; do_notify_resume
- =&gt; work_pending</pre></li>
+ =&gt; work_pending
+ </pre>
+</li>
</ol>
<p>对 ion 驱动程序进行检查后,我们可以发现,<code>ion_client_destroy</code> 被将 fd 关闭到 <code>/dev/ion</code>(而非随机内核驱动程序)的用户空间函数所破坏。通过在 Android 代码库中搜索 <code>\"/dev/ion\"</code>,我们发现一些供应商驱动程序与 Hexagon 驱动程序的功能相同,每次在需要新的 ion 分配时打开/关闭 <code>/dev/ion</code>(创建和破坏新的 ion 客户端)。将其更改为在进程的生命周期中<a href="https://android.googlesource.com/platform/hardware/qcom/camera/+/8f7984018b6643f430c229725a58d3c6bb04acab">使用单个 ion 客户端</a>即修复了该错误。</p>
@@ -151,17 +214,29 @@ $ ./systrace.py sched freq idle am wm gfx view binder_driver irq workq ss sync -
<p>在这个问题中,当所有内核以最大负载运行 non-SCHED_FIFO 线程时,SCHED_FIFO 线程便会终止。我们的跟踪记录显示 VR 应用中的 fd 存在明显的锁争用,但是我们无法轻松确定相关 fd。要按照示例进行操作,请<a href="perf_traces.zip">下载跟踪记录的 ZIP 文件</a>(其中包括本部分中提到的其他跟踪记录),解压下载文件,然后在浏览器中打开 trace_30905547.html 文件。
</p>
-<p>我们假设 ftrace 本身是锁争用的来源,当优先级较低的线程开始写入 ftrace 管道时,却在释放锁之前被抢占。这是最糟糕的一种情况,一些优先级极低的线程写入 ftrace 标记,同时另一些优先级较高的线程在 CPU 上旋转以模拟完全负载的设备,从而进一步加重情况。</p>
+<p>我们假设 ftrace 本身是锁争用的来源,当优先级较低的线程开始写入 ftrace 管道时,却在能够释放锁之前被抢占。这是最糟糕的一种情况,一些优先级极低的线程写入 ftrace 标记,同时另一些优先级较高的线程在 CPU 上旋转以模拟完全负载的设备,从而进一步加重情况。</p>
<p>由于我们无法使用 ftrace 进行调试,因此运行 <code>LOCK_STAT</code>,然后关闭应用的所有其他跟踪功能。结果表明,锁争用实际上来自 ftrace,因为当 ftrace 不运行时,锁跟踪记录中没有出现任何争用情况。</p>
</section>
<hr />
<p>如果您可以使用配置选项启动内核,则锁跟踪与 ftrace 类似:</p>
<ol>
-<li>启用跟踪:<pre>$ echo 1 &gt; /proc/sys/kernel/lock_stat</pre></li>
+<li>启用跟踪:
+<pre class="devsite-terminal devsite-click-to-copy">
+echo 1 &gt; /proc/sys/kernel/lock_stat
+</pre>
+</li>
<li>运行您的测试。</li>
-<li>停用跟踪:<pre>$ echo 0 &gt; /proc/sys/kernel/lock_stat</pre></li>
-<li>转储您的跟踪记录:<pre>$ cat /proc/lock_stat &gt; /data/local/tmp/lock_stat</pre></li>
+<li>停用跟踪:
+<pre class="devsite-terminal devsite-click-to-copy">
+echo 0 &gt; /proc/sys/kernel/lock_stat
+</pre>
+</li>
+<li>转储您的跟踪记录:
+<pre class="devsite-terminal devsite-click-to-copy">
+cat /proc/lock_stat &gt; /data/local/tmp/lock_stat
+</pre>
+</li>
</ol>
<p>有关解释所生成的输出结果的帮助内容,请参阅 lockstat 文档:<a href="https://www.kernel.org/doc/Documentation/locking/lockstat.txt"><code>&lt;kernel&gt;/Documentation/locking/lockstat.txt</code></a>。</p>
diff --git a/zh-cn/devices/tech/debug/sanitizers.html b/zh-cn/devices/tech/debug/sanitizers.html
index f1bb727f..1b94cf20 100644
--- a/zh-cn/devices/tech/debug/sanitizers.html
+++ b/zh-cn/devices/tech/debug/sanitizers.html
@@ -1,5 +1,5 @@
<html devsite><head>
- <title>LLVM 排错程序</title>
+ <title>LLVM 清理程序</title>
<meta name="project_path" value="/_project.yaml"/>
<meta name="book_path" value="/_book.yaml"/>
</head>
@@ -37,7 +37,7 @@ Android 编译版本最好在启用排错程序(如 AddressSanitizer 和 Undef
<li>释放后再使用</li>
</ul>
<p>
-Android 允许在完整编译级别和在<a href="/devices/tech/debug/asan#addresssanitizer_in_the_apps">应用级别</a>通过 asanwrapper 进行 <a href="/devices/tech/debug/asan">ASan 插桩</a>。
+Android 允许在完整编译级别和在<a href="/devices/tech/debug/asan">应用级别</a>通过 asanwrapper 进行 <a href="/devices/tech/debug/asan#addresssanitizer_in_the_apps">ASan 插桩</a>。
</p>
<p>
AddressSanitizer 对所有与内存相关的函数调用(包括 alloca、malloc 和 free)进行插桩,并使用被读取或写入时会触发 ASan 回调的内存填充所有变量和已分配的内存区域。
@@ -248,7 +248,7 @@ CONFIG_KERNEL_LZ4
</pre>
<p>
-此外,如果在内核中启用了模块,则可以加载 test_kasan 内核模块以供进一步测试。该模块会尝试出界内存访问和释放后再使用,有助于在目标设备上测试 KASAN。
+此外,如果在内核中启用了模块,则可以加载 test_kasan 内核模块以供进一步测试。该模块会尝试“越界内存访问”和“释放后再使用”,它有助于在目标设备上测试 KASAN。
</p>
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/tech/debug/systrace.html b/zh-cn/devices/tech/debug/systrace.html
index d0dba1c3..d742d54a 100644
--- a/zh-cn/devices/tech/debug/systrace.html
+++ b/zh-cn/devices/tech/debug/systrace.html
@@ -33,39 +33,45 @@
./systrace.py sched freq idle am wm gfx view sync binder_driver irq workq input -b 96000
</pre>
-<p>当将该命令用于 GPU 活动和显示通道活动所需的附加跟踪点时,您将能够跟踪从用户输入直到屏幕上显示的帧。将缓冲区大小设为较大的值,以避免丢失事件(通常表现为一些 CPU 在跟踪记录中的某个点之后不包含任何事件)。</p>
+<p>当将该命令用于 GPU 活动和显示管道活动所需的附加跟踪点时,您将能够跟踪从用户输入直到屏幕上显示的帧。将缓冲区大小设为较大的值,以避免丢失事件(通常表现为一些 CPU 在跟踪记录中的某个点之后不包含任何事件)。</p>
<p>在使用 systrace 的过程中,请记住,<strong>每个事件都是由 CPU 上的活动触发的</strong>。</p>
<p class="note"><strong>注意</strong>:硬件中断不受 CPU 控制,且会在 ftrace 中触发事件,不过,向跟踪日志的实际提交操作是由中断处理程序完成的,如果您的中断已到达,而(例如)某个其他不良驱动程序已停用中断,则提交可能会延迟。因此,CPU 是关键要素。</p>
-<p>因为 systrace 构建于 ftrace 之上,而 ftrace 在 CPU 上运行,所以 CPU 上的活动必须写入用于记录硬件变化情况的 ftrace 缓冲区。这意味着,如果您想知道显示栅栏更改状态的原因,则可以查看在状态转换的确切点 CPU 上运行了哪些活动(在 CPU 上运行的某些活动会触发日志中出现这种更改)。此概念是使用 systrace 分析性能的基础。</p>
+<p>因为 systrace 构建于 ftrace 之上,而 ftrace 在 CPU 上运行,所以 CPU 上的活动必须写入用于记录硬件变化情况的 ftrace 缓冲区。这意味着,如果您想知道显示栅栏更改状态的原因,则可以查看在状态转换的确切点 CPU 上运行了哪些活动(在 CPU 上运行的某些活动在日志中触发了这种更改)。此概念是使用 systrace 分析性能的基础。</p>
<h2 id="example_1">示例:工作帧</h2>
-<p>该示例介绍了用于正常界面通道的 systrace。要按照示例操作,请<a href="perf_traces.zip">下载跟踪记录的 ZIP 文件</a>(包括本节中提及的其他跟踪记录),将文件解压缩,然后在浏览器中打开 systrace_tutorial.html 文件。系统会显示一条警告,提示 systrace 是一个大型文件;除非您在日常工作中使用 systrace,否则这个跟踪记录可能更完整,其中包含的信息比您以前在单个跟踪记录中看到的更多。</p>
-<p>对于一致的周期性工作负载(例如 TouchLatency),界面通道包含以下内容:</p>
+<p>该示例介绍了正常界面管道的 systrace。要按照示例操作,请<a href="perf_traces.zip">下载跟踪记录的 ZIP 文件</a>(包括本节中提及的其他跟踪记录),将文件解压缩,然后在浏览器中打开 systrace_tutorial.html 文件。注意,该 systrace 是一个大型文件;除非您在日常工作中使用 systrace,否则这个跟踪记录可能更完整,其中包含的信息比您以前在单个跟踪记录中看到的要多很多。</p>
+<p>对于一致的周期性工作负载(例如 TouchLatency),界面管道包含以下内容:</p>
<p></p>
<ol>
-<li>SurfaceFlinger 中的 EventThread 唤醒应用的界面线程,表明该渲染新帧了。</li>
-<li>应用使用 CPU 和 GPU 资源在界面线程、RenderThread 和 hwuiTasks 中渲染帧。这是界面占用的大部分容量。</li>
-<li>应用通过 Binder 将渲染帧发送到 SurfaceFlinger 并进入休眠状态。</li>
-<li>SurfaceFlinger 中的第二个 EventThread 唤醒 SurfaceFlinger,以触发构图和显示输出。如果 SurfaceFlinger 确定没有任何任务需要执行,它将返回休眠状态。</li>
-<li>SurfaceFlinger 通过 HWC/HWC2 或 GL 处理构图。HWC/HWC2 构图的速度更快且功率更低,但存在限制,具体取决于 SOC。这个步骤通常需要约 4 到 6 毫秒,但是可以与步骤 2 同步进行,因为 Android 应用始终会进行三重缓冲(虽然应用始终会进行三重缓冲,但 SurfaceFlinger 中可能只有一个待处理帧在等待,这样它就看起来与双重缓冲一样)。</li>
+<li>SurfaceFlinger 中的 EventThread 会唤醒应用的界面线程,表明该渲染新帧了。</li>
+<li>应用使用 CPU 和 GPU 资源在界面线程、RenderThread 和 hwuiTask 中渲染帧。这是界面占用的大部分容量。</li>
+<li>应用通过 Binder 将渲染的帧发送到 SurfaceFlinger 并进入休眠状态。</li>
+<li>SurfaceFlinger 中的第二个 EventThread 唤醒 SurfaceFlinger,以触发构图和显示输出。如果 SurfaceFlinger 确定没有任何任务需要执行,将返回休眠状态。</li>
+<li>SurfaceFlinger 通过 HWC/HWC2 或 GL 处理构图。HWC/HWC2 构图的速度更快且功率更低,但存在限制,具体取决于 SOC。这个步骤通常需要约 4-6 毫秒,但是可以与第 2 步同步进行,因为 Android 应用始终会进行三重缓冲(虽然应用始终会进行三重缓冲,但 SurfaceFlinger 中可能只有一个待处理帧在等待,这样它就看起来与双重缓冲一样)。</li>
<li>SurfaceFlinger 将通过供应商驱动程序将最终输出调度到显示部分,然后返回休眠状态,等待 EventThread 唤醒。</li>
</ol>
<p>下面我们详细介绍一下从 15409 毫秒开始的帧:</p>
-<p><img src="/devices/tech/debug/images/perf_trace_normal_pipeline.png"/></p>
-<p class="img-caption"><strong>图 1. </strong> 正常界面通道(EventThread 正在运行)。</p>
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_normal_pipeline.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_normal_pipeline.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 1. </strong> 正常界面管道(EventThread 正在运行)。
+ </figcaption>
+</figure>
-<p>图 1 显示了一个由多个正常帧围绕的正常帧,因此对于理解界面通道的工作原理来说,它是一个很好的切入点。TouchLatency 的界面线程所在行在不同的时间显示为不同的颜色。柱形表示线程的不同状态:</p>
+<p>图 1 显示了一个由多个正常帧围绕的正常帧,因此对于理解界面管道的工作原理来说,它是一个很好的切入点。TouchLatency 的界面线程所在行在不同的时间显示为不同的颜色。柱形表示线程的不同状态:</p>
<ul>
<li><strong>灰色</strong>:正在休眠。</li>
<li><strong>蓝色</strong>:可运行(它可以运行,但是调度程序尚未选择让它运行)。</li>
-<li><strong>绿色</strong>:正在活跃运行(调度程序认为它正在运行)。
-<p class="note"><strong>注意</strong>:中断处理程序并未在正常的单个 CPU 时间轴中显示,因此您有可能实际上是在线程运行时的某个阶段运行中断处理程序或 softirq。请检查跟踪记录的中断 (irq) 部分(在进程 0 下),以确认中断(而非标准线程)正在运行。</p>
+<li><strong>绿色</strong>:正在运行(调度程序认为它正在运行)。
+<p class="note"><strong>注意</strong>:中断处理程序并未在正常的单个 CPU 时间轴中显示,因此您有可能实际上是在线程运行时的某个阶段运行中断处理程序或 softirq。请检查跟踪记录的中断请求 (irq) 部分(在进程 0 下),以确认中断(而非标准线程)正在运行。</p>
</li>
<li><strong>红色</strong>:不可中断休眠(通常在内核中处于休眠锁定状态)。可以指示 I/O 负载,在调试性能问题时非常有用。</li>
<li><strong>橙色</strong>:由于 I/O 负载而不可中断休眠。</li>
@@ -74,101 +80,191 @@
<p>要查看不可中断休眠的原因(可从 <code>sched_blocked_reason</code> 跟踪点获取),请选择红色的不可中断休眠图块。</p>
<p>当 EventThread 运行时,TouchLatency 的界面线程会变为可运行。要查看是什么唤醒的它,请点击蓝色部分:</p>
-<p><img src="/devices/tech/debug/images/perf_trace_tl.png"/></p>
-<p class="img-caption"><strong>图 2. </strong> TouchLatency 的界面线程。</p>
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_tl.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_tl.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 2. </strong> TouchLatency 的界面线程。
+ </figcaption>
+</figure>
<p>图 2 显示了 TouchLatency 的界面线程被与 EventThread 对应的 tid 6843 唤醒。界面线程被唤醒:</p>
-<p><img src="/devices/tech/debug/images/perf_trace_wake_render_enqueue.png"/></p>
-<p class="img-caption"><strong>图 3. </strong> 界面线程被唤醒、渲染一个帧,并将其加入队列以供 SurfaceFlinger 使用。</p>
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_wake_render_enqueue.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_wake_render_enqueue.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 3. </strong> 界面线程被唤醒、渲染一个帧,并将其加入队列以供 SurfaceFlinger 使用。
+ </figcaption>
+</figure>
<p>如果跟踪记录中的 <code>binder_driver</code> 标记已启用,则您可以选择一个 Binder 事务,并查看该事务涉及的所有进程的相关信息:</p>
-<p><img src="/devices/tech/debug/images/perf_trace_binder_trans.png"/></p>
-<p class="img-caption"><strong>图 4. </strong> Binder 事务。</p>
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_binder_trans.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_binder_trans.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 4. </strong> Binder 事务。
+ </figcaption>
+</figure>
-<p>图 4 显示了在 15423.65 毫秒,SurfaceFlinger 中的 Binder:6832_1 由于 tid 9579(即 TouchLatency 的 RenderThread)变为可运行。此外,您还可以在 Binder 事务的两侧看到 queueBuffer。</p>
+<p>图 4 显示在 15423.65 毫秒,SurfaceFlinger 中的 Binder:6832_1 由于 tid 9579(即 TouchLatency 的 RenderThread)变为可运行。此外,您还可以在 Binder 事务的两侧看到 queueBuffer。</p>
<p>在 SurfaceFlinger 端的 queueBuffer 期间,TouchLatency 中待处理帧的数量从 1 变为 2:</p>
-<p><img src="/devices/tech/debug/images/perf_trace_pending_frames.png"/></p>
-<p class="img-caption"><strong>图 5. </strong> 待处理帧从 1 个变为 2 个。</p>
-
-<p>图 5 显示了三重缓冲,其中两个帧已完成渲染,应用将很快开始渲染第三个帧。这是因为一些帧已经丢弃,所以应用保留两个待处理的帧而不是一个,以避免以后再丢弃帧。</p>
-
-<p>稍后,SurfaceFlinger 的主线程会被第二个 EventThread 唤醒,以便它可以将较早的待处理帧输出到显示部分:</p>
-
-<p><img src="/devices/tech/debug/images/perf_trace_sf_woken_et.png"/></p>
-<p class="img-caption"><strong>图 6. </strong> SurfaceFlinger 的主线程被第二个 EventThread 唤醒。</p>
-
-<p>SurfaceFlinger 首先锁定较早的待处理缓冲区,而这将导致待处理缓冲区的计数从 2 减为 1:</p>
-
-<p><img src="/devices/tech/debug/images/perf_trace_sf_latches_pend.png"/></p>
-<p class="img-caption"><strong>图 7. </strong> SurfaceFlinger 首先锁定较早的待处理缓冲区。</p>
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_pending_frames.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_pending_frames.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 5. </strong> 待处理帧从 1 个变为 2 个。
+ </figcaption>
+</figure>
+
+<p>图 5 表示三重缓冲,其中两个帧已完成渲染,应用将很快开始渲染第三个帧。这是因为一些帧已经丢弃,所以应用保留两个待处理的帧而不是一个,以避免以后再丢弃帧。</p>
+
+<p>稍后,SurfaceFlinger 的主线程被第二个 EventThread 唤醒,以便它可以将较早的待处理帧输出到显示部分:</p>
+
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_sf_woken_et.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_sf_woken_et.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 6. </strong> SurfaceFlinger 的主线程被第二个 EventThread 唤醒。
+ </figcaption>
+</figure>
+
+<p>SurfaceFlinger 首先锁定较早的待处理缓冲区,而这将导致待处理缓冲区的数量从 2 减为 1:</p>
+
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_sf_latches_pend.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_sf_latches_pend.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 7. </strong> SurfaceFlinger 首先锁定较早的待处理缓冲区。
+ </figcaption>
+</figure>
<p>锁定缓冲区后,SurfaceFlinger 会设置构图并将最终帧提交给显示部分(其中某些区段作为 <code>mdss</code> 跟踪点的一部分启用,因此它们可能不在您 SOC 的相应位置上)。</p>
-<p><img src="/devices/tech/debug/images/perf_trace_sf_comp_submit.png"/></p>
-<p class="img-caption"><strong>图 8. </strong> SurfaceFlinger 设置构图并提交最终帧。</p>
-
-<p>接下来,<code>mdss_fb0</code> 在 CPU 0 上被唤醒。<code>mdss_fb0</code> 是显示通道的内核线程,用于将渲染过的帧输出到显示部分。我们可以看到 <code>mdss_fb0</code> 位于跟踪记录中其自己所在行中的情形(向下滚动即可查看)。</p>
-
-<p><img src="/devices/tech/debug/images/perf_trace_wake_cpu0.png"/></p>
-<p class="img-caption"><strong>图 9</strong>. <code>mdss_fb0</code> 在 CPU 0 上被唤醒。</p>
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_sf_comp_submit.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_sf_comp_submit.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 8. </strong> SurfaceFlinger 设置构图并提交最终帧。
+ </figcaption>
+</figure>
+
+<p>接下来,<code>mdss_fb0</code> 在 CPU 0 上被唤醒。<code>mdss_fb0</code> 是显示管道的内核线程,用于将渲染过的帧输出到显示部分。我们可以看到 <code>mdss_fb0</code> 位于跟踪记录中其自己所在行中的情形(向下滚动即可查看)。</p>
+
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_wake_cpu0.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_wake_cpu0.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 9</strong>. <code>mdss_fb0</code> 在 CPU 0 上被唤醒。
+ </figcaption>
+</figure>
<p><code>mdss_fb0</code> 被唤醒,短暂运行,进入不可中断休眠状态,然后再次被唤醒。</p>
-<p class="note"><strong>注意</strong>:从现在开始,跟踪记录将变得更为复杂,因为最后的工作会在 <code>mdss_fb0</code>、中断和工作队列函数之间划分。如果您需要该级别的详细信息,请参阅您的 SOC 的驱动程序堆栈的确切特性(因为了解 Pixel XL 上发生的活动可能对您并无帮助)。</p>
+<p class="note"><strong>注意</strong>:从现在开始,跟踪记录将变得更为复杂,因为最后的工作会在 <code>mdss_fb0</code>、中断和工作队列函数之间划分。如果您需要该级别的详细信息,请参阅您 SOC 的驱动程序堆栈的确切特性(因为了解 Pixel XL 上发生的活动可能对您并无帮助)。</p>
<h2 id="example_2">示例:非工作帧</h2>
<p>该示例介绍了用于调试 Pixel/Pixel XL 抖动问题的 systrace。要按照示例操作,请<a href="/devices/tech/debug/perf_traces.zip">下载跟踪记录的 ZIP 文件</a>(包括本节中提及的其他跟踪记录),将文件解压缩,然后在浏览器中打开 systrace_tutorial.html 文件。</p>
<p>首次打开 systrace 时,您会看到如下内容:</p>
-<p><img src="/devices/tech/debug/images/perf_trace_tl_pxl.png"/></p>
-<p class="img-caption"><strong>图 10</strong>. 在 Pixel XL 上运行的 TouchLatency(大多数选项已启用,包括 mdss 和 kgsl 跟踪点)。</p>
-
-<p>查找卡顿时,请检查 SurfaceFlinger 下的 FrameMissed 行。FrameMissed 是一项可提升用户体验的改进,由硬件合成器 2 (HWC2) 提供。自 2016 年 12 月起,HWC2 只能用于 Pixel/Pixel XL;当您查看其他设备的 systrace 时,可能不会看到 FrameMissed 行。在任一情况下,FrameMissed 都会与具有以下特点的 SurfaceFlinger 相关联:缺少一个很常用的运行时,以及在 vsync 时的应用 (<code>com.prefabulated.touchlatency</code>) 存在未更改的待处理缓冲区计数:</p>
-
-<p><img src="/devices/tech/debug/images/perf_trace_fm_sf.png"/></p>
-<p class="img-caption"><strong>图 11</strong>. FrameMissed 与 SurfaceFlinger 的关联。</p>
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_tl_pxl.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_tl_pxl.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 10</strong>. 在 Pixel XL 上运行的 TouchLatency(大多数选项已启用,包括 mdss 和 kgsl 跟踪点)。
+ </figcaption>
+</figure>
+
+<p>查找卡顿时,请检查 SurfaceFlinger 下的 FrameMissed 行。FrameMissed 是一项可提升用户体验的改进,由硬件合成器 2 (HWC2) 提供。截止 2016 年 12 月,HWC2 只能用于 Pixel/Pixel XL;当您查看其他设备的 systrace 时,可能不会看到 FrameMissed 行。在任一情况下,FrameMissed 都会与具有以下特点的 SurfaceFlinger 相关联:缺少一个很常用的运行时,以及在 vsync 时应用 (<code>com.prefabulated.touchlatency</code>) 的待处理缓冲区计数未发生变化:</p>
+
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_fm_sf.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_fm_sf.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 11</strong>. FrameMissed 与 SurfaceFlinger 相关联。
+ </figcaption>
+</figure>
<p>图 11 显示了 15598.29 毫秒处的已丢失帧。SurfaceFlinger 在 vsync 间隔时间被短暂唤醒,并在未执行任何任务的情况下返回休眠状态,这意味着 SurfaceFlinger 确定不值得再次向显示部分发送帧。为什么?</p>
-<p>要了解在渲染此帧时通道是如何出现故障的,请先回顾上面的工作帧示例,了解正常界面通道是如何在 systrace 中出现的。准备就绪后,返回到丢失的帧并进行反推。请注意,SurfaceFlinger 被唤醒后立即进入休眠状态。查看来自 TouchLatency 的待处理帧的数量时,可以看到有两个帧(这是一条很好的线索,可帮助弄清楚发生的实际情况)。</p>
+<p>要了解在渲染此帧时管道是如何出现故障的,请先回顾上面的正常帧示例,了解正常界面管道在 systrace 中的效果如何。准备就绪后,回到丢失的帧并进行反推。请注意,SurfaceFlinger 被唤醒后立即进入休眠状态。查看来自 TouchLatency 的待处理帧的数量时,可以看到有两个帧(这是一条很好的线索,可帮助弄清楚发生的实际情况)。</p>
-<p><img src="/devices/tech/debug/images/perf_trace_sf_wake_sleep.png"/></p>
-<p class="img-caption"><strong>图 12. </strong> SurfaceFlinger 被唤醒后立即进入休眠状态。</p>
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_sf_wake_sleep.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_sf_wake_sleep.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 12. </strong> SurfaceFlinger 被唤醒并立即进入休眠状态。
+ </figcaption>
+</figure>
<p>因为我们在 SurfaceFlinger 中有一些帧,所以这不是一个应用问题。此外,SurfaceFlinger 在正确的时间被唤醒,所以这也不是一个 SurfaceFlinger 问题。如果 SurfaceFlinger 和应用看起来都正常,那么这可能是一个驱动程序问题。</p>
-<p>因为启用了 <code>mdss</code> 和 <code>sync</code> 跟踪点,所以我们可以获得有关相应栅栏(在显示驱动程序和 SurfaceFlinger 之间共享,控制帧实际提交到显示部分的时间)的信息。我们关心的栅栏列于 <code>mdss_fb0_retire</code> 下,它指示帧实际在显示部分出现的时间。这些栅栏作为 <code>sync</code> 跟踪类别的一部分提供。哪些栅栏与 SurfaceFlinger 中的特定事件相对应,取决于您的 SOC 和驱动程序堆栈,因此请与您的 SOC 供应商联系,以了解您的跟踪记录中栅栏类别的含义。</p>
+<p>因为启用了 <code>mdss</code> 和 <code>sync</code> 跟踪点,所以我们可以获得有关相应栅栏(在显示驱动程序和 SurfaceFlinger 之间共享,控制帧实际提交到显示部分的时间)的信息。我们关心的栅栏列于 <code>mdss_fb0_retire</code> 下,它会指示帧实际在显示部分出现的时间。这些栅栏作为 <code>sync</code> 跟踪类别的一部分提供。哪些栅栏与 SurfaceFlinger 中的特定事件相对应,取决于您的 SOC 和驱动程序堆栈,因此请与您的 SOC 供应商联系,以了解您的跟踪记录中栅栏类别的含义。</p>
-<p><img src="/devices/tech/debug/images/perf_traces_fences.png"/></p>
-<p class="img-caption"><strong>图 13</strong>. <code>mdss_fb0_retire</code> 栅栏。</p>
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_fences.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_fences.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 13</strong>. <code>mdss_fb0_retire</code> 栅栏。
+ </figcaption>
+</figure>
-<p>图 13 显示的帧显示了 33 毫秒,而不是预期的 16.7 毫秒。图块前进到中途时,该帧应该被新帧替换,但实际上没有。请查看上一帧,看看是否可以找到蛛丝马迹:</p>
+<p>图 13 中的帧显示了 33 毫秒,而不是预期的 16.7 毫秒。图块前进到中途时,该帧应该被新帧替换,但实际上没有。查看上一帧,看看是否可以找到蛛丝马迹:</p>
-<p><img src="/devices/tech/debug/images/perf_trace_frame_previous.png"/></p>
-<p class="img-caption"><strong>图 14. </strong> 被损坏帧的上一帧。</p>
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_frame_previous.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_frame_previous.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 14. </strong> 被损坏帧的上一帧。
+ </figcaption>
+</figure>
-<p>图 14 显示了时长为 14.482 毫秒的一个帧。被损坏的两帧片段是 33.6 毫秒,这和我们预期的两帧时长大致接近(我们以 60Hz 渲染,每帧 16.7 毫秒,很接近)。但是 14.482 毫秒与 16.7 毫秒相去甚远,这表明显示通道存在严重错误。</p>
+<p>图 14 显示了时长为 14.482 毫秒的帧。被损坏的两帧区段是 33.6 毫秒,这和我们预期的两帧时长大致接近(我们以 60Hz 渲染帧,每帧 16.7 毫秒,很接近)。但是 14.482 毫秒与 16.7 毫秒相去甚远,这表明显示管道存在严重错误。</p>
<p>调查栅栏的确切结束位置,以确定是什么在控制它:</p>
-<p><img src="/devices/tech/debug/images/perf_trace_fence_end.png"/></p>
-<p class="img-caption"><strong>图 15. </strong> 调查栅栏的结束位置。</p>
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_fence_end.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_fence_end.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 15. </strong> 调查栅栏的结束位置。
+ </figcaption>
+</figure>
-<p>工作队列包含一个 <code>__vsync_retire_work_handler</code>,它在栅栏发生变化时运行。通过浏览内核源代码,您可以看到它是显示驱动程序的一部分。它显然位于显示通道的关键路径上,所以必须以尽可能快的速度运行。它可运行约 70 微秒(不是很长的调度延迟),但它是一个工作队列,系统可能无法准确地排定其运行时间。</p>
+<p>工作队列包含一个 <code>__vsync_retire_work_handler</code>,它在栅栏发生变化时运行。通过浏览内核源代码,您可以看到它是显示驱动程序的一部分。它显然位于显示管道的关键路径上,所以必须以尽可能快的速度运行。它可运行约 70 微秒(不是很长的调度延迟),但它是一个工作队列,系统可能无法准确地排定其运行时间。</p>
<p>检查上一帧,以确定它是否会导致该问题;有时抖动会随时间而累加,最终导致我们错过最后期限。</p>
-<p><img src="/devices/tech/debug/images/perf_trace_previous_frame.png"/></p>
-<p class="img-caption"><strong>图 16. </strong> 上一帧。</p>
+<figure>
+ <a href="/devices/tech/debug/images/perf_trace_previous_frame.png" title="点击即可放大">
+ <img src="/devices/tech/debug/images/perf_trace_previous_frame.png" class="screenshot"/>
+ </a>
+ <figcaption>
+ <strong>图 16. </strong> 上一帧。
+ </figcaption>
+</figure>
-<p>kworker 上的可运行行不可见,因为当该行被选择时,查看器会将它变为白色,不过,通过统计数据,我们可以了解到问题所在:部分显示通道关键路径的 2.3 毫秒调度程序延迟时间<strong>很不乐观</strong>。在执行任何其他操作之前,我们应该先解决该问题,方法是:将显示通道关键路径的这一部分从工作队列(作为 <code>SCHED_OTHER</code> CFS 线程运行)移动到专用的 <code>SCHED_FIFO</code> kthread。这一功能需要时间保证,而工作队列不能(也不打算)提供这一保证。</p>
+<p>kworker 上的可运行行不可见,因为当该行被选择时,查看器会将它变为白色,不过,通过统计数据,我们可以了解到问题所在:部分显示管道关键路径存在 2.3 毫秒的调度程序延迟,这<strong>很糟糕</strong>。在执行任何其他操作之前,我们应该先解决该问题,方法是:将显示管道关键路径的这一部分从工作队列(作为 <code>SCHED_OTHER</code> CFS 线程运行)移动到专用的 <code>SCHED_FIFO</code> kthread。这一功能需要时间保证,而工作队列不能(也不打算)提供这一保证。</p>
-<p>这是产生卡顿的原因吗?很难说这就是最终结论。在不易于诊断的情况下(如内核锁争用导致显示关键线程进入休眠状态),您通常无法直接通过跟踪记录了解问题的起因。这种抖动有可能是帧丢弃的原因吗?当然有可能。栅栏时间应该是 16.7 毫秒,但是在最终导致帧丢弃的帧中,栅栏时间与该值相去甚远(有一个 19 毫秒的栅栏,后接一个 14 毫秒的栅栏)。鉴于显示通道的耦合紧密程度,栅栏时间的上下抖动完全有可能导致最终丢弃帧。</p>
+<p>这是产生卡顿的原因吗?很难说这就是最终结论。在不易于诊断的情况下(如内核锁争用导致显示关键线程进入休眠状态),您通常无法直接通过跟踪记录了解问题的起因。这种抖动有可能是帧丢弃的原因吗?当然有可能。栅栏时间应该是 16.7 毫秒,但是在最终导致帧丢弃的帧中,栅栏时间与该值相去甚远(有一个 19 毫秒的栅栏,后接一个 14 毫秒的栅栏)。鉴于显示管道的耦合紧密程度,栅栏时间的上下抖动完全有可能导致最终丢弃帧。</p>
<p>在此示例中,解决方案涉及将 <code>__vsync_retire_work_handler</code> 从工作队列转换为专用 kthread。这样一来,弹力球测试中的抖动情况得到显著改善,且卡顿问题也会明显减轻。随后的跟踪记录显示了非常接近 16.7 毫秒的栅栏时间。</p>
diff --git a/zh-cn/devices/tech/display/widgets-shortcuts.html b/zh-cn/devices/tech/display/widgets-shortcuts.html
index 7acf600e..104794a6 100644
--- a/zh-cn/devices/tech/display/widgets-shortcuts.html
+++ b/zh-cn/devices/tech/display/widgets-shortcuts.html
@@ -59,16 +59,15 @@
合作伙伴需要参考 Launcher3 实现 (<code>packages/apps/Launcher3</code>) 来更新其启动器应用。
</p>
<p>
-相关的 Launcher3 更改:
-
-</p>
+在 Android 开源项目 (AOSP) 中查找相关的 Launcher3 更改:
+ </p>
<ul>
- <li>Change-Id: I664366822fe8088742faff2cce006239ab0771bc
- </li><li>Change-Id: I905532ba44a8898c9c17476f9f75bc309eeb7b41
+ <li>Change-Id:<a href="https://android.googlesource.com/platform/packages/apps/Launcher3/+/8b2002e28072c52d78f6d052c6ff6da50a2d0324">8b2002e28072c52d78f6d052c6ff6da50a2d0324</a>
+ </li><li>Change-Id:<a href="https://android.googlesource.com/platform/packages/apps/Launcher3/+/278359539c02ca160caf1df54ce96053a2a2ef59">278359539c02ca160caf1df54ce96053a2a2ef59</a>
</li></ul>
<h2 id="validation">验证</h2>
<p>
-要验证该功能,请尝试从 Chrome 或通讯录应用添加快捷方式,并验证系统是否会显示正确的确认提示。在接受之后,图标应已添加到主屏幕上,并且 Chrome 应显示一个提示添加成功的消息框。
+要验证该功能,请尝试从 Chrome 或通讯录应用添加快捷方式,并验证系统是否会显示正确的确认提示。在接受提示后,图标应已添加到主屏幕上,并且 Chrome 应显示一个提示添加成功的消息框。
</p>
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/tech/ota/ab/ab_implement.html b/zh-cn/devices/tech/ota/ab/ab_implement.html
index 27a72b04..10141149 100644
--- a/zh-cn/devices/tech/ota/ab/ab_implement.html
+++ b/zh-cn/devices/tech/ota/ab/ab_implement.html
@@ -23,8 +23,7 @@
<p>想要实现 A/B 系统更新的原始设备制造商 (OEM) 和 SoC 供应商必须确保其引导加载程序实现 boot_control HAL,并将<a href="#kernel">正确的参数</a>传递到内核。</p>
<h2 id="bootcontrol">实现启动控件 HAL</h2>
-<p>支持 A/B 更新的引导加载程序必须在 <code><a href="https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/boot_control.h" class="external">hardware/libhardware/include/hardware/boot_control.h</a></code> 实现 <code>boot_control</code> HAL。
-您可以使用 <code><a href="https://android.googlesource.com/platform/system/extras/+/master/bootctl/" class="external">system/extras/bootctl</a></code> 实用工具和 <code><a href="https://android.googlesource.com/platform/system/extras/+/refs/heads/master/tests/bootloader/" class="external">system/extras/tests/bootloader/</a></code> 来测试实现。
+<p>支持 A/B 更新的引导加载程序必须在 <code><a href="https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/boot_control.h" class="external">hardware/libhardware/include/hardware/boot_control.h</a></code> 中实现 <code>boot_control</code> HAL。您可以使用 <code><a href="https://android.googlesource.com/platform/system/extras/+/master/bootctl/" class="external">system/extras/bootctl</a></code> 实用工具和 <code><a href="https://android.googlesource.com/platform/system/extras/+/refs/heads/master/tests/bootloader/" class="external">system/extras/tests/bootloader/</a></code> 来测试实现。
</p>
<p>您还必须实现状态机,如下所示:</p>
@@ -117,8 +116,7 @@ A/B 化的所有分区都应按以下方法命名(插槽始终被命名为 <co
<h3 id="recovery">恢复</h3>
-<p>恢复 RAM 磁盘现已包含在 <code>boot.img</code> 文件中。
-进入恢复模式时,引导加载程序<strong>无法</strong>在内核命令行中添加 <code>skip_initramfs</code> 选项。</p>
+<p>恢复 RAM 磁盘现已包含在 <code>boot.img</code> 文件中。进入恢复模式时,引导加载程序<strong>无法</strong>在内核命令行中添加 <code>skip_initramfs</code> 选项。</p>
<p>对于非 A/B 更新,恢复分区包含用于应用更新的代码。A/B 更新由在正常启动的系统映像中运行的 <code>update_engine</code> 应用。同时,仍有一种用于实现恢复出厂设置和旁加载更新软件包的恢复模式(“恢复”就由此而来)。恢复模式的代码和数据存储在 ramdisk 的常规启动分区中;为启动进入系统映像,引导加载程序会指示内核跳过 ramdisk(否则,设备会启动进入恢复模式)。恢复模式很小(其中大部分已在启动分区上),所以启动分区的大小不会增加。</p>
@@ -232,6 +230,6 @@ AB_OTA_POSTINSTALL_CONFIG += \
</li>
</ol>
-<p>要获取有关将预选文件安装到未使用的第二个系统分区的帮助,请参阅 <a href="/devices/tech/dalvik/configure.html#other_odex">DEX_PREOPT 文件的首次启动安装</a>。</p>
+<p>要获取有关将预先优化的文件安装到未使用的第二个系统分区的帮助,请参阅 <a href="/devices/tech/dalvik/configure.html#other_odex">DEX_PREOPT 文件的首次启动安装</a>。</p>
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/tech/ota/ab/index.html b/zh-cn/devices/tech/ota/ab/index.html
index b0340136..d7bb1755 100644
--- a/zh-cn/devices/tech/ota/ab/index.html
+++ b/zh-cn/devices/tech/ota/ab/index.html
@@ -114,8 +114,8 @@ 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">
- boot_control.h</a></code> 中定义。
+此外,每个槽位还都有一个由用户空间设置的“成功”属性,仅当相应槽位处于可启动状态时,该属性才具有相关性。<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>
<h3 id="update-engine">更新引擎守护进程</h3>
@@ -142,22 +142,22 @@ A/B 系统更新过程会使用名为 <code>update_engine</code> 的后台守护
<h4 id="update_engine_source">更新引擎源代码</h4>
- <p>
+ <p>
<code>update_engine</code> 源代码位于 <code><a href="https://android.googlesource.com/platform/system/update_engine/" class="external">system/update_engine</a></code> 中。A/B OTA dexopt 文件分开放到了 <code>installd</code> 和一个程序包管理器中:
- </p>
+ </p>
- <ul>
- <li>
- <code><a href="https://android.googlesource.com/platform/frameworks/native/+/master/cmds/installd/" class="external-link">frameworks/native/cmds/installd/</a></code>ota* 包括安装后脚本、用于 chroot 的二进制文件、负责调用 dex2oat 的已安装克隆、OTA 后 move-artifacts 脚本,以及 move 脚本的 rc 文件。
- </li>
- <li>
- <code><a href="https://android.googlesource.com/platform/frameworks/base/+/master/services/core/java/com/android/server/pm/OtaDexoptService.java" class="external-link">frameworks/base/services/core/java/com/android/server/pm/OtaDexoptService.java</a></code>(加上 <code><a href="https://android.googlesource.com/platform/frameworks/base/+/master/services/core/java/com/android/server/pm/OtaDexoptShellCommand.java" class="external-link">OtaDexoptShellCommand</a></code>)是负责为应用准备 dex2oat 命令的程序包管理器。
- </li>
- </ul>
+ <ul>
+ <li>
+ <code><a href="https://android.googlesource.com/platform/frameworks/native/+/master/cmds/installd/" class="external-link">frameworks/native/cmds/installd/</a></code>ota* 包括安装后脚本、用于 chroot 的二进制文件、负责调用 dex2oat 的已安装克隆、OTA 后 move-artifacts 脚本,以及 move 脚本的 rc 文件。
+ </li>
+ <li>
+ <code><a href="https://android.googlesource.com/platform/frameworks/base/+/master/services/core/java/com/android/server/pm/OtaDexoptService.java" class="external-link">frameworks/base/services/core/java/com/android/server/pm/OtaDexoptService.java</a></code>(加上 <code><a href="https://android.googlesource.com/platform/frameworks/base/+/master/services/core/java/com/android/server/pm/OtaDexoptShellCommand.java" class="external-link">OtaDexoptShellCommand</a></code>)是负责为应用准备 dex2oat 命令的程序包管理器。
+ </li>
+ </ul>
- <p>
+ <p>
如需可使用的示例,请参阅 <code><a href="https://android.googlesource.com/device/google/marlin/+/nougat-dr1-release/device-common.mk" class="external-link">/device/google/marlin/device-common.mk</a></code>。
- </p>
+ </p>
<h4 id="update_engine_logs">更新引擎日志</h4>
@@ -174,11 +174,13 @@ A/B 系统更新过程会使用名为 <code>update_engine</code> 的后台守护
更改 529081</a></li>
<li><a href="https://android-review.googlesource.com/c/platform/system/sepolicy/+/534660">
更改 534660</a></li>
+ <li><a href="https://android-review.googlesource.com/c/platform/system/update_engine/+/594637">
+更改 594637</a></li>
</ul>
- <p>这些更改会将最新的 <code>update_engine</code> 日志的副本保存到 <code>/data/misc/update_engine_log/update_engine.log</code>。拥有<strong>日志</strong>组 ID 的用户将能够访问相应的文件系统日志。
+ <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><h3 id="bootloader-interactions">引导加载程序交互</h3>
+ <h3 id="bootloader-interactions">引导加载程序交互</h3>
<p>
<code>boot_control</code> HAL 供 <code>update_engine</code>(可能还有其他守护进程)用于指示引导加载程序从何处启动。常见的示例情况及其相关状态包括:
@@ -350,7 +352,7 @@ OTA 更新包本身所含的元数据可能会指示可进行流式更新,在
</p>
<p>
- <code>update_verifier</code> 只会读取 <code>/data/ota_package/care_map.txt</code>(在使用 AOSP 代码时,该文件会包含在 A/B OTA 更新包中)中列出的数据块。Java 系统更新客户端(例如 GmsCore)会在重新启动设备前提取 <code>care_map.txt</code> 并设置访问权限,在系统成功启动到新版本后会删除所提取的这个文件。
+ <code>update_verifier</code> 只会读取 <code>/data/ota_package/care_map.txt</code>(在使用 AOSP 代码时,该文件会包含在 A/B OTA 更新包中)中列出的数据块。Java 系统更新客户端(例如 GmsCore)会在重新启动设备前提取 <code>care_map.txt</code> 并设置访问权限,在系统成功启动到新版本后会删除所提取的文件。
</p>
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/tech/ota/device_code.html b/zh-cn/devices/tech/ota/device_code.html
index bd49223b..c5fd7366 100644
--- a/zh-cn/devices/tech/ota/device_code.html
+++ b/zh-cn/devices/tech/ota/device_code.html
@@ -68,7 +68,7 @@ device/yoyodyne/tardis/recovery.fstab
<p>对于 <a href="https://developer.android.com/things/hardware/index.html">Android Things</a> 设备,您可以在 Android Things 控制台中上传压缩文件,以便在所选产品中包含图片。</p>
-<p class="note"><strong>注意</strong>:这些图片必须符合 Android <a href="/source/brands">品牌推广指南</a>。</p>
+<p class="note"><strong>注意</strong>:这些图片必须符合 Android <a href="/setup/brands">品牌推广指南</a>。</p>
<h2 id="recovery-ui">恢复界面</h2>
<p>要支持配备不同可用硬件(物理按钮、LED、屏幕等)的设备,您可以自定义恢复界面以显示状态,并访问每台设备的手动操作隐藏功能。</p>
@@ -106,7 +106,7 @@ static const char* ITEMS[] = {"reboot system now",
<p class="note"><strong>注意</strong>:长行会被截断(而非换行),因此请留意您设备的屏幕宽度。</p>
<h3 id="customize-checkkey">自定义 CheckKey</h3>
-<p>接下来,请定义您设备的 RecoveryUI 实现。本例假设 <b>tardis</b> 设备配有屏幕,因此,您可以沿用内置 ScreenRecoveryUIimplementation(请参阅有关<a href="#devices-without-screens">无屏幕设备</a>的说明)。可通过 ScreenRecoveryUI 自定义的唯一函数是 <code>CheckKey()</code>,该函数会执行初始异步键处理操作:</p>
+<p>接下来,请定义您设备的 RecoveryUI 实现。本例假设 <b>tardis</b> 设备配有屏幕,因此,您可以继承内置 ScreenRecoveryUIimplementation(请参阅有关<a href="#devices-without-screens">无屏幕设备</a>的说明)。可通过 ScreenRecoveryUI 自定义的唯一函数是 <code>CheckKey()</code>,该函数会执行初始异步键处理操作:</p>
<pre class="prettyprint">
class TardisUI : public ScreenRecoveryUI {
@@ -230,8 +230,7 @@ const char* const* GetMenuItems() { return ITEMS; }
<p>由于 <code>HandleMenuKey()</code> 隐含在可见参数中,因此,即使菜单不可见,也会进行调用。与 <code>CheckKey()</code> 不同的是,当恢复系统执行清除数据或安装软件包等操作时,系统不会调用该函数,只有恢复系统处于闲置状态或等待输入时才会调用该函数。<i></i></p>
<h4 id="trackball-mechanism">轨迹球机制</h4>
-<p>如果您的设备采用类似于轨迹球的输入机制(生成类型为 EV_REL、代码为 REL_Y 的输入事件),那么,只要类似于轨迹球的输入设备报告 Y 轴的动作,恢复系统就会合成 KEY_UP 和 KEY_DOWN 按键。您只需将 KEY_UP 和 KEY_DOWN 事件映射到相应的菜单操作即可。
-无法针对 <code>CheckKey()</code> 实现此映射,因此,您无法将轨迹球动作用作重新启动或切换显示状态的触发器。<i></i></p>
+<p>如果您的设备采用类似于轨迹球的输入机制(生成类型为 EV_REL、代码为 REL_Y 的输入事件),那么,只要类似于轨迹球的输入设备报告 Y 轴的动作,恢复系统就会合成 KEY_UP 和 KEY_DOWN 按键。您只需将 KEY_UP 和 KEY_DOWN 事件映射到相应的菜单操作即可。<i></i>无法针对 <code>CheckKey()</code> 实现此映射,因此,您无法将轨迹球动作用作重新启动或切换显示状态的触发器。</p>
<h4 id="modifier-keys">辅助键</h4>
<p>要查看作为辅助键按下的键,请调用您自己的界面对象的 <code>IsKeyPressed()
@@ -516,8 +515,7 @@ Value* ReprogramTardisFn(const char* name, State* state, int argc, Expr* argv[])
}
</pre>
-<p><code>ReadValueArgs()</code> 不执行类型检查,因此您必须在这里执行这项检查;使用 <b>if</b> 语句执行这项检查会更方便,不过,这样做也有一个弊端,那就是操作失败时所显示的错误消息会不够具体。
-不过,如果有任何评估失败,<code>ReadValueArgs()</code> 会处理每个参数的评估操作,并释放之前评估的所有参数(以及设置有用的错误消息)。您可以使用 <code>
+<p><code>ReadValueArgs()</code> 不执行类型检查,因此您必须在这里执行这项检查;使用 <b>if</b> 语句执行这项检查会更方便,不过,这样做也有一个弊端,那就是操作失败时所显示的错误消息不够具体。不过,如果有任何评估失败,<code>ReadValueArgs()</code> 会处理每个参数的评估操作,并释放之前评估的所有参数(以及设置有用的错误消息)。您可以使用 <code>
ReadValueVarArgs()</code> 便捷函数来评估数量不定的参数(它会返回 <code>Value*</code> 的数组)。</p>
<p>对参数进行评估后,执行以下函数:</p>
@@ -556,7 +554,7 @@ ReadValueVarArgs()</code> 便捷函数来评估数量不定的参数(它会返
}
</pre>
-<p>要将函数挂接到 edify 解释器中,请提供函数 <code>Register_<i>foo</i></code>(其中 <i></i>foo 是包含此代码的静态库的名称)。调用 <code>RegisterFunction()</code> 即可注册各个扩展函数。按照惯例,您需要对设备专属函数 <code><i>device</i>.<i>whatever</i></code> 进行命名,以免与将来添加的内置函数发生冲突。</p>
+<p>要将函数挂接到 edify 解释器中,请提供函数 <code>Register_<i>foo</i></code>(其中 foo 是包含此代码的静态库的名称)。<i></i>调用 <code>RegisterFunction()</code> 即可注册各个扩展函数。按照惯例,您需要对设备专属函数 <code><i>device</i>.<i>whatever</i></code> 进行命名,以免与将来添加的内置函数发生冲突。</p>
<pre class="prettyprint">
void Register_librecovery_updater_tardis() {
@@ -583,7 +581,7 @@ LOCAL_MODULE := librecovery_updater_tardis
include $(BUILD_STATIC_LIBRARY)
</pre>
-<p>最后,配置 recovery 的版本号以拉入您的库。将您的库添加到 TARGET_RECOVERY_UPDATER_LIBS(它可能包含多个库;所有库均已注册)。如果您的代码依赖于本身不是 edify 扩展程序的其他静态库(即,它们没有 <code>Register_<i>libname</i></code> 函数),您可以将其列于 TARGET_RECOVERY_UPDATER_EXTRA_LIBS 中,以将其链接到更新程序,而无需调用其(不存在的)注册函数。例如,如果您的设备专属代码需要使用 zlib 解压缩数据,您可以在此处包含 libz。</p>
+<p>最后,配置 recovery 的编译版本以拉入您的库。将您的库添加到 TARGET_RECOVERY_UPDATER_LIBS(它可能包含多个库;所有库均已注册)。如果您的代码依赖于本身不是 edify 扩展程序的其他静态库(即,它们没有 <code>Register_<i>libname</i></code> 函数),您可以将其列于 TARGET_RECOVERY_UPDATER_EXTRA_LIBS 中,以将其关联到更新程序,而无需调用其(不存在的)注册函数。例如,如果您的设备专属代码需要使用 zlib 解压缩数据,您可以在此处包含 libz。</p>
<pre class="devsite-click-to-copy">
device/yoyodyne/tardis/BoardConfig.mk
@@ -631,7 +629,7 @@ endif
<p>由于历史原因,这些文件被称为无线电文件,但它们可能与设备无线电(如果存在)没有任何关系。它们只是编译系统复制到 OTA 生成工具所用的 target-files .zip 中的模糊数据 blob。在您执行编译时,tardis.dat 会作为 <code>RADIO/tardis.dat</code> 存储在 target-files.zip 中。您可以多次调用 <code>add-radio-file</code> 以根据需要添加任意数量的文件。</p>
<h3 id="python-module">Python 模块</h3>
-<p>要扩展发布工具,请编写工具(如果有)可以调用的 Python 模块(必须命名为 releasetools.py)。示例:</p>
+<p>要扩展发布工具,请编写工具(如果有)可以调用的 Python 模块(必须命名为 releasetools.py)。例如:</p>
<pre class="devsite-click-to-copy">
device/yoyodyne/tardis/releasetools.py
@@ -698,10 +696,10 @@ def IncrementalOTA_InstallEnd(info):
<ul>
<li><b>info.input_zip</b>:(仅限完整 OTA)输入 target-files .zip 的 <code>zipfile.ZipFile</code> 对象。</li>
<li><b>info.source_zip</b>:(仅限增量 OTA)源 target-files .zip 的 <code>zipfile.ZipFile
-</code> 对象(安装增量包时版本号已在设备上)。</li>
+</code> 对象(安装增量包时编译版本已在设备上)。</li>
<li><b>info.target_zip</b>:(仅限增量 OTA)目标 target-files .zip 的 <code>zipfile.ZipFile
-</code> 对象(增量包置于设备上的版本号)。</li>
-<li><b>info.output_zip</b>:正在创建的更新包;为进行写入而打开的 <code>zipfile.ZipFile
+</code> 对象(增量包置于设备上的编译版本)。</li>
+<li><b>info.output_zip</b>:正在创建的软件包;为进行写入而打开的 <code>zipfile.ZipFile
</code> 对象。使用 common.ZipWriteStr(info.output_zip、<i>filename</i>、<i>data</i>)将文件添加到文件包。</li>
<li><b>info.script</b>:可以附加命令的目标脚本对象。调用 <code>info.script.AppendExtra(<i>script_text</i>)</code> 以将文本输出到脚本中。请确保输出文本以分号结尾,这样就不会运行到随后发出 (emit) 的命令中。</li>
</ul>
@@ -761,7 +759,7 @@ Device::InvokeMenuItem()</code> 方法可以返回以下 BuiltinAction 值:</p
<ul>
<li>仅支持 USB 传输。</li>
<li>如果您的恢复系统可以正常运行 adbd(对于 userdebug 和 eng 版本来说通常是这样),则会在设备处于 adb 旁加载模式时关闭,并将在 adb 旁加载完成接收更新包后重新启动。在 adb 旁加载模式下,只有 <code>sideload</code> 命令可以发挥作用(<code>logcat</code>、<code>reboot</code>、<code>push</code>、<code>pull</code>、<code>shell</code> 等都不起作用)。</li>
-<li>您无法在设备上退出 adb 旁加载模式。要终止,您可以将 <code>/dev/null</code>(或有效更新包以外的其他任何文件)作为更新包进行发送,然后设备将无法对其进行验证,并会停止安装程序。RecoveryUI 实现的 <code>CheckKey()</code> 方法将继续为按键所调用,因此,您可以提供可重新启动设备并在 adb 旁加载模式下运行的按键序列。</li>
+<li>您无法在设备上退出 adb 旁加载模式。要终止,您可以将 <code>/dev/null</code>(或有效更新包以外的其他任何文件)作为更新包进行发送,然后设备将无法对其进行验证,并会停止安装程序。RecoveryUI 实现的 <code>CheckKey()</code> 方法将继续为按键所调用,以便您可以提供可重新启动设备并在 adb 旁加载模式下运行的按键序列。</li>
</ul>
</body></html> \ No newline at end of file
diff --git a/zh-cn/devices/tech/ota/nonab/device_code.html b/zh-cn/devices/tech/ota/nonab/device_code.html
index 4e25c730..b93623f4 100644
--- a/zh-cn/devices/tech/ota/nonab/device_code.html
+++ b/zh-cn/devices/tech/ota/nonab/device_code.html
@@ -73,7 +73,7 @@ device/yoyodyne/tardis/recovery.fstab
<h2 id="recovery-ui">恢复界面</h2>
<p>要支持配备不同可用硬件(物理按钮、LED、屏幕等)的设备,您可以自定义恢复界面以显示状态,并访问每台设备的手动操作隐藏功能。</p>
<p>您的目标是编译一个包含一些 C++ 对象的小型静态库,以提供设备专属功能。默认情况下会使用 <code>
-<b>bootable/recovery/default_device.cpp</b></code> 文件,该文件正好可在为设备编写此文件的版本时供您复制。</p>
+<b>bootable/recovery/default_device.cpp</b></code> 文件,该文件可在为您的设备编写这一文件时供您参考。</p>
<pre class="devsite-click-to-copy">
device/yoyodyne/tardis/recovery/recovery_ui.cpp
@@ -106,7 +106,7 @@ static const char* ITEMS[] = {"reboot system now",
<p class="note"><strong>注意</strong>:长行会被截断(而非换行),因此请留意您设备的屏幕宽度。</p>
<h3 id="customize-checkkey">自定义 CheckKey</h3>
-<p>接下来,请定义您设备的 RecoveryUI 实现。本例假设 <b>tardis</b> 设备配有屏幕,因此,您可以沿用内置 ScreenRecoveryUIimplementation(请参阅有关<a href="#devices-without-screens">无屏幕设备</a>的说明)。可通过 ScreenRecoveryUI 自定义的唯一函数是 <code>CheckKey()</code>,该函数会执行初始异步键处理操作:</p>
+<p>接下来,请定义您设备的 RecoveryUI 实现。本示例假设 <b>tardis</b> 设备配有屏幕,因此,您可以沿用内置 ScreenRecoveryUIimplementation(请参阅有关<a href="#devices-without-screens">无屏幕设备</a>的说明)。可通过 ScreenRecoveryUI 自定义的唯一函数是 <code>CheckKey()</code>,该函数会执行初始异步键处理操作:</p>
<pre class="prettyprint">
class TardisUI : public ScreenRecoveryUI {
@@ -227,11 +227,10 @@ const char* const* GetMenuItems() { return ITEMS; }
<li><b>kNoAction</b>:不使用此按键执行任何操作</li>
</ul>
-<p>由于 <code>HandleMenuKey()</code> 隐含在可见参数中,因此,即使菜单不可见,也会进行调用。与 <code>CheckKey()</code> 不同的是,当恢复系统执行清除数据或安装软件包等操作时,系统不会调用该函数,只有恢复系统处于闲置状态或等待输入时才会调用该函数。<i></i></p>
+<p>由于 <code>HandleMenuKey()</code> 隐含在可见参数中,因此,即使菜单不可见,也会进行调用。与 <code>CheckKey()</code> 不同的是,当恢复系统执行清除数据或安装软件包等操作时,系统不会调用该函数,只有恢复系统处于闲置状态并等待输入时才会调用该函数。<i></i></p>
<h4 id="trackball-mechanism">轨迹球机制</h4>
-<p>如果您的设备采用类似于轨迹球的输入机制(生成类型为 EV_REL、代码为 REL_Y 的输入事件),那么,只要类似于轨迹球的输入设备报告 Y 轴的动作,恢复系统就会合成 KEY_UP 和 KEY_DOWN 按键。您只需将 KEY_UP 和 KEY_DOWN 事件映射到相应的菜单操作即可。
-<i></i>由于无法针对 <code>CheckKey()</code> 实现此映射,因此不能将轨迹球运动作为重新启动或切换显示状态的触发器。</p>
+<p>如果您的设备采用类似于轨迹球的输入机制(生成类型为 EV_REL、代码为 REL_Y 的输入事件),那么,只要类似于轨迹球的输入设备报告 Y 轴的动作,恢复系统就会合成 KEY_UP 和 KEY_DOWN 按键。您只需将 KEY_UP 和 KEY_DOWN 事件映射到相应的菜单操作即可。<i></i>由于无法针对 <code>CheckKey()</code> 实现此映射,因此不能将轨迹球动作作为重新启动或切换显示状态的触发器。</p>
<h4 id="modifier-keys">辅助键</h4>
<p>要查看作为辅助键按下的键,请调用您自己的界面对象的 <code>IsKeyPressed()
@@ -545,7 +544,7 @@ ReadValueVarArgs()</code> 便捷函数来评估数量不定的参数(它会返
}
</pre>
-<p>便捷函数 <code>StringValue()</code> 会将字符串封装到新的 Value 对象中。使用此函数可使上述代码的编写更加简洁:</p>
+<p>便捷函数 <code>StringValue()</code> 会将字符串封装到新的 Value 对象中。使用此函数可以简化上述代码:</p>
<pre class="prettyprint">
FreeValue(key);
@@ -563,7 +562,7 @@ void Register_librecovery_updater_tardis() {
}
</pre>
-<p>现在,您可以配置 makefile,以使用您的代码编译静态库(此 makefile 即是之前的区段中用于自定义恢复界面的 makefile;您设备的两个静态库可能都是在此定义的)。</p>
+<p>现在,您可以配置 makefile,以使用您的代码编译静态库(此 makefile 即是用于自定义之前区段中的恢复界面的 makefile;您设备的两个静态库可能都是在此定义的)。</p>
<pre class="devsite-click-to-copy">
device/yoyodyne/tardis/recovery/Android.mk
@@ -582,7 +581,7 @@ LOCAL_MODULE := librecovery_updater_tardis
include $(BUILD_STATIC_LIBRARY)
</pre>
-<p>最后,配置 recovery 的版本号以拉入您的库。将您的库添加到 TARGET_RECOVERY_UPDATER_LIBS(它可能包含多个库;所有库均已注册)。如果您的代码依赖于本身不是 edify 扩展程序的其他静态库(即,它们没有 <code>Register_<i>libname</i></code> 函数),您可以将其列于 TARGET_RECOVERY_UPDATER_EXTRA_LIBS 中,以将其关联到更新程序,而无需调用其(不存在的)注册函数。例如,如果您的设备专属代码需要使用 zlib 解压缩数据,您可以在此处包含 libz。</p>
+<p>最后,配置 recovery 的编译版本以拉入您的库。将您的库添加到 TARGET_RECOVERY_UPDATER_LIBS(它可能包含多个库;所有库均已注册)。如果您的代码依赖于本身不是 edify 扩展的其他静态库(即,它们没有 <code>Register_<i>libname</i></code> 函数),您可以将这些库列于 TARGET_RECOVERY_UPDATER_EXTRA_LIBS 中,以将其关联到更新程序,而无需调用其(不存在的)注册函数。例如,如果您的设备专属代码需要使用 zlib 解压缩数据,您可以在此处包含 libz。</p>
<pre class="devsite-click-to-copy">
device/yoyodyne/tardis/BoardConfig.mk
@@ -697,9 +696,9 @@ def IncrementalOTA_InstallEnd(info):
<ul>
<li><b>info.input_zip</b>:(仅限完整 OTA)输入 target-files .zip 的 <code>zipfile.ZipFile</code> 对象。</li>
<li><b>info.source_zip</b>:(仅限增量 OTA)源 target-files .zip 的 <code>zipfile.ZipFile
-</code> 对象(安装增量包时版本号已在设备上)。</li>
+</code> 对象(安装增量包时编译版本已在设备上)。</li>
<li><b>info.target_zip</b>:(仅限增量 OTA)目标 target-files .zip 的 <code>zipfile.ZipFile
-</code> 对象(增量包置于设备上的版本号)。</li>
+</code> 对象(增量包置于设备上的编译版本)。</li>
<li><b>info.output_zip</b>:正在创建的更新包;为进行写入而打开的 <code>zipfile.ZipFile
</code> 对象。使用 common.ZipWriteStr(info.output_zip、<i>filename</i>、<i>data</i>)将文件添加到文件包。</li>
<li><b>info.script</b>:可以附加命令的目标脚本对象。调用 <code>info.script.AppendExtra(<i>script_text</i>)</code> 以将文本输出到脚本中。请确保输出文本以分号结尾,这样就不会运行到随后发出 (emit) 的命令中。</li>
@@ -753,7 +752,7 @@ Device::InvokeMenuItem()</code> 方法可以返回以下 BuiltinAction 值:</p
</code> 通常不可用于恢复系统,因为它可能会被加密。恢复界面会显示 <code>/sdcard</code> 中的 .zip 文件菜单,以便用户进行选择。</li>
<li><b>APPLY_CACHE</b>:类似于从 <code>/sdcard</code> 加载更新包,不过使用的是 <code>/cache</code> 目录(始终可用于恢复)。<i></i>在常规系统中,<code>/cache
</code> 只能由特权用户写入;如果设备不可启动,则完全无法写入 <code>/cache</code> 目录(这样一来,该机制的效用就会有所限制)。</li>
-<li><b>APPLY_ADB_SIDELOAD</b>:允许用户通过 USB 数据线和 adb 开发工具将软件包发送到设备。调用此机制时,恢复系统将启动自身的迷你版 adbd 守护进程,以便已连接的主机上的 adb 与其进行对话。该迷你版守护进程仅支持一个命令:<code>adb sideload <i>filename</i></code>。已命名的文件会从主机发送到设备,然后对其进行验证和安装(如同文件在本地存储区中一样)。</li>
+<li><b>APPLY_ADB_SIDELOAD</b>:允许用户通过 USB 数据线和 adb 开发工具将软件包发送到设备。调用此机制时,恢复系统将启动自身的迷你版 adbd 守护进程,以便已连接的主机上的 adb 与其进行对话。该迷你版守护进程仅支持一个命令:<code>adb sideload <i>filename</i></code>。已命名的文件会从主机发送到设备,然后接受验证并进行安装(如同文件在本地存储区中一样)。</li>
</ul>
<p>一些注意事项:</p>
diff --git a/zh-cn/devices/tech/ota/nonab/inside_packages.html b/zh-cn/devices/tech/ota/nonab/inside_packages.html
index ecb3a2b5..c863878e 100644
--- a/zh-cn/devices/tech/ota/nonab/inside_packages.html
+++ b/zh-cn/devices/tech/ota/nonab/inside_packages.html
@@ -1,5 +1,5 @@
<html devsite><head>
- <title>OTA 软件包内部</title>
+ <title>OTA 软件包内部探秘</title>
<meta name="project_path" value="/_project.yaml"/>
<meta name="book_path" value="/_book.yaml"/>
</head>
@@ -73,8 +73,7 @@ tgt_size</i>, <i>patch1_sha1</i>, <i>patch1_blob</i>, [...])</code></dt>
<p>支持特殊语法将 MTD(内存技术设备)分区的内容作为文件处理,以便为引导分区这样的原始分区打补丁。由于 MTD 分区没有文件结束标记,因此要读取该分区,您必须知道您要读取的数据量。您可以使用字符串“MTD:partition:size_1:sha1_1:size_2:sha1_2”作为文件名来读取给定的分区。<i></i><i></i><i></i><i></i><i></i>您必须至少指定一个(size,sha-1)对;如果您希望读取的内容有多种可能,则可以指定多个对。<i></i></p></dd>
<dt><code>apply_patch_check(<i>filename</i>, <i>sha1</i>[, <i>sha1</i>, ...])
</code></dt>
-<dd>如果 filename 的内容或缓存分区中的临时副本(如果存在)中的内容具有与给定的 sha1 值之一相等的 SHA1 校验和,则返回 True。sha1 值指定为 40 位十六进制数字。<i></i><i></i><i></i>
-该函数不同于 <code>sha1_check(read_file(<i>filename</i>),
+<dd>如果 filename 的内容或缓存分区中的临时副本(如果存在)中的内容具有与给定的 sha1 值之一相等的 SHA1 校验和,则返回 True。sha1 值指定为 40 位十六进制数字。<i></i><i></i><i></i>该函数不同于 <code>sha1_check(read_file(<i>filename</i>),
<i>sha1</i> [, ...])</code>,因为它知道要检查缓存分区副本,因此即使文件被中断的 <code>apply_patch() update</code> 损坏,<code>apply_patch_check()</code> 也将成功。</dd>
<dt><code>apply_patch_space(<i>bytes</i>)</code></dt>
<dd>如果至少有 bytes 个字节的暂存空间可用于打二进制补丁程序,则返回 True。<i></i></dd>
diff --git a/zh-cn/devices/tech/ota/reduce_size.html b/zh-cn/devices/tech/ota/reduce_size.html
index d2e35db2..5268b6ec 100644
--- a/zh-cn/devices/tech/ota/reduce_size.html
+++ b/zh-cn/devices/tech/ota/reduce_size.html
@@ -20,23 +20,23 @@
limitations under the License.
-->
-<p>本页介绍了为减少不同编译之间不必要的文件变更而添加到 AOSP 的编译变更。负责自行维护编译系统的设备实现人员可根据这项信息减小无线下载 (OTA) 更新的大小。
+<p>本页介绍了为减少多次编译之间不必要的文件变更而对 AOSP 编译系统所做的改动。使用专有编译系统的设备实现人员可根据这项信息采取措施,减小无线下载 (OTA) 更新的大小。
</p>
-<p>有时,Android OTA 包含的变更文件并非对应于代码变更,而是对应于编译系统的软件工件。在不同时间、不同目录或不同机器上编译相同的代码时会产生大量变更文件,这时便会发生上述情况。这些多余的文件不仅会增加 OTA 的大小,还会导致难以确定 OTA 中发生变更的代码。</p>
+<p>有时,Android OTA 包含的变更文件并非源于代码变更,而是编译系统造成的。在不同时间、不同目录或不同机器上编译相同的代码时可能会发生上述情况,产生大量变更文件。这些多余的文件不仅会增加 OTA 的大小,还会导致难以确定 OTA 中发生变更的代码。</p>
-<p>为了使 OTA 的内容更加透明,AOSP 纳入了编译系统变更,目的是通过消除不同编译之间不必要的文件变更来减小 OTA 的大小。这样做是为了减小 OTA 的大小,使其只包含与 OTA 中所含补丁程序相关的文件。AOSP 还会加入<a href="#the_build_diff_tool">编译 diff 工具</a>(可过滤出常见的编译相关文件变更,并提供更清晰的编译文件 diff)以及<a href="#block-mapping-tool">块映射工具</a>(协助您确保块分配的一致性)。</p>
+<p>为了使 OTA 的内容更加透明,我们对 AOSP 编译系统做了多项改动,目的是消除多次编译之间不必要的文件变更,以此减小 OTA 的大小。这样做是为了减小 OTA 的大小,使其只包含与 OTA 中所含补丁程序相关的文件。AOSP 还包括<a href="#the_build_diff_tool">编译 diff 工具</a>(可过滤出常见的编译相关文件变更,并提供更清晰的编译文件 diff)以及<a href="#block-mapping-tool">块映射工具</a>(协助您确保块分配的一致性)。</p>
<p>编译系统可能会通过多种方式创建不必要的文件 diff。下文讨论了其中一些问题和解决方案,并尽可能提供了 AOSP 中的修复示例。</p>
<h2 id="file_order">文件顺序</h2>
-<p><strong>问题</strong>:文件系统在请求目录中的文件列表时,并不保证文件顺序,尽管对于同一项查询,文件顺序通常是相同的。<code>ls</code> 等工具在默认情况下会对结果进行排序,但 <code>find</code> 和 <code>make</code> 等命令使用的通配符函数却不会对结果进行排序。用户在使用这类工具之前,务必要对输出进行排序。
+<p><strong>问题</strong>:文件系统在请求目录中的文件列表时,并不保证文件顺序,尽管对于同一个检出,文件顺序通常是相同的。<code>ls</code> 等工具在默认情况下会对结果进行排序,但 <code>find</code> 和 <code>make</code> 等命令使用的通配符函数却不会对结果进行排序。用户在使用这类工具之前,务必要对输出进行排序。
</p>
<p><strong>解决方案</strong>:用户在使用带通配符的 <code>find</code> 和 <code>make</code> 等工具之前,务必要对这些命令的输出进行排序。要在 <code>Android.mk</code> 文件中使用 <code>$(wildcard)</code> 或 <code>$(shell find)</code>,也应该进行排序。有些工具(如 Java)确实会对输入进行排序,因此有必要先对排序进行验证。</p>
-<p><strong>示例</strong>:很多实例使用内建的 <code>all-*-files-under</code> 宏固定在核心编译系统中,其中包括 <code>all-cpp-files-under</code>(一些定义分散在其他 makefile 中)。有关详情,请参阅以下 CL:</p>
+<p><strong>示例</strong>:多处问题在核心编译系统中通过内置的 <code>all-*-files-under</code> 宏得到修正,其中包括 <code>all-cpp-files-under</code>(一些定义分散在其他 makefile 中)。有关详情,请参阅以下 CL:</p>
<ul>
<li><a href="https://android.googlesource.com/platform/build/+/4d66adfd0e6d599d8502007e4ea9aaf82e95569f" class="external">https://android.googlesource.com/platform/build/+/4d66adfd0e6d599d8502007e4ea9aaf82e95569f</a>
@@ -47,14 +47,14 @@
<h2 id="build_directory">编译目录</h2>
-<p><strong>问题</strong>:变更编译内容所在的目录会导致二进制文件有所不同。Android 编译中的大多数路径都是相对路径,因此 C/C++ 中的 <code>__FILE__</code> 不是问题。不过,默认情况下调试符号会对完整的路径名进行编码,而对预剥离二进制文件进行哈希处理会生成 <code>.note.gnu.build-id</code>,因此调试符号发生变更会致使二进制文件发生变化。</p>
+<p><strong>问题</strong>:变更编译内容所在的目录会导致二进制文件有所不同。Android 编译系统中的大多数路径都是相对路径,因此 C/C++ 中的 <code>__FILE__</code> 不是问题。不过,默认情况下调试符号会对完整的路径名进行编码,而对预剥离二进制文件进行哈希处理会生成 <code>.note.gnu.build-id</code>,因此调试符号发生变更会致使二进制文件发生变化。</p>
<p><strong>解决方案</strong>:AOSP 现在会使调试路径变成相对路径。有关详情,请参阅 CL:<a href="https://android.googlesource.com/platform/build/+/6a66a887baadc9eb3d0d60e26f748b8453e27a02" class="external">https://android.googlesource.com/platform/build/+/6a66a887baadc9eb3d0d60e26f748b8453e27a02</a>。
</p>
<h2 id="timestamps">时间戳</h2>
-<p><strong>问题</strong>:编译输出中的时间戳会导致不必要的文件变更。这可能发生在以下位置:</p>
+<p><strong>问题</strong>:编译输出中的时间戳会导致不必要的文件变更。这可能会发生在以下位置:</p>
<ul>
<li>C 或 C++ 代码中的 <code>__DATE__/__TIME__/__TIMESTAMP__</code> 宏。</li>
@@ -86,7 +86,7 @@
<h2 id="version_strings">版本字符串</h2>
-<p><strong>问题</strong>:APK 版本字符串通常包含附加到硬编码版本的 <code>BUILD_NUMBER</code>。即使 APK 中并未发生任何其他变更,APK 也仍然会有所不同。</p>
+<p><strong>问题</strong>:APK 版本字符串的硬编码版本通常附加了 <code>BUILD_NUMBER</code>。即使 APK 中并未发生任何其他变更,APK 也仍然会有所不同。</p>
<p><strong>解决方案</strong>:从 APK 版本字符串中移除版本号。</p>
@@ -106,12 +106,13 @@
<ul>
<li><strong>NOTICE 文件创建工具</strong>。NOTICE 文件创建工具需要变更。请参阅 CL:<a href="https://android.googlesource.com/platform/build/+/8ae4984c2c8009e7a08e2a76b1762c2837ad4f64" class="external">https://android.googlesource.com/platform/build/+/8ae4984c2c8009e7a08e2a76b1762c2837ad4f64</a>。
</li>
- <li><strong>Java Android 编译器套件 (Jack)</strong>。Jack 工具链需要更新才能处理生成的构造函数排序的偶然性变更。请参阅 CL:<a href="https://android.googlesource.com/toolchain/jack/+/056a5425b3ef57935206c19ecb198a89221ca64b" class="external">https://android.googlesource.com/toolchain/jack/+/056a5425b3ef57935206c19ecb198a89221ca64b</a>。</li>
- <li><strong>ART AOT 编译器 (dex2oat)</strong>。ART 编译器二进制文件需要更新才能创建确定性图像。请参阅 CL:<a href="https://android.googlesource.com/platform/art/+/ace0dc1dd5480ad458e622085e51583653853fb9" class="external">https://android.googlesource.com/platform/art/+/ace0dc1dd5480ad458e622085e51583653853fb9</a>。
+ <li><strong>Java Android 编译器套件 (Jack)</strong>。Jack 工具链需要更新才能处理生成的构造函数排序的偶然性变更。请参阅 CL:<a href="https://android.googlesource.com/toolchain/jack/+/056a5425b3ef57935206c19ecb198a89221ca64b" class="external">https://android.googlesource.com/toolchain/jack/+/056a5425b3ef57935206c19ecb198a89221ca64b</a>。
</li>
- <li><strong>libpac.so 文件 (V8)</strong>。每项编译会创建不同的 <code>/system/lib/libpac.so</code> 文件,因为 V8 快照会针对每项编译发生变更。解决方案是移除快照。请参阅 CL:<a href="https://android.googlesource.com/platform/external/v8/+/e537f38c36600fd0f3026adba6b3f4cbcee1fb29" class="external">https://android.googlesource.com/platform/external/v8/+/e537f38c36600fd0f3026adba6b3f4cbcee1fb29</a>。
+ <li><strong>ART AOT 编译器 (dex2oat)</strong>。ART 编译器二进制文件需要更新才能创建确定性映像。请参阅 CL:<a href="https://android.googlesource.com/platform/art/+/ace0dc1dd5480ad458e622085e51583653853fb9" class="external">https://android.googlesource.com/platform/art/+/ace0dc1dd5480ad458e622085e51583653853fb9</a>。
</li>
- <li><strong>预先经过 dexopt 处理 (.odex) 的应用文件</strong>。预先经过 dexopt 处理 (.odex) 的文件包含 64 位系统上的未初始化填充。请参阅 CL:<a href="https://android.googlesource.com/platform/art/+/34ed3afc41820c72a3c0ab9770be66b6668aa029" class="external">https://android.googlesource.com/platform/art/+/34ed3afc41820c72a3c0ab9770be66b6668aa029</a>。
+ <li><strong>libpac.so 文件 (V8)</strong>。每项编译会创建不同的 <code>/system/lib/libpac.so</code> 文件,因为 V8 快照会针对每项编译发生变更。解决方案是移除该快照。请参阅 CL:<a href="https://android.googlesource.com/platform/external/v8/+/e537f38c36600fd0f3026adba6b3f4cbcee1fb29" class="external">https://android.googlesource.com/platform/external/v8/+/e537f38c36600fd0f3026adba6b3f4cbcee1fb29</a>。
+ </li>
+ <li><strong>预先经过 dexopt 处理的 (.odex) 应用文件</strong>。预先经过 dexopt 处理的 (.odex) 文件在 64 位系统上包含未初始化填充。请参阅 CL:<a href="https://android.googlesource.com/platform/art/+/34ed3afc41820c72a3c0ab9770be66b6668aa029" class="external">https://android.googlesource.com/platform/art/+/34ed3afc41820c72a3c0ab9770be66b6668aa029</a>。
</li>
</ul>
diff --git a/zh-cn/devices/tech/ota/sign_builds.html b/zh-cn/devices/tech/ota/sign_builds.html
index 700b7bd1..070c3d0b 100644
--- a/zh-cn/devices/tech/ota/sign_builds.html
+++ b/zh-cn/devices/tech/ota/sign_builds.html
@@ -1,5 +1,5 @@
<html devsite><head>
- <title>对要发布的编译版本进行签名</title>
+ <title>对要发布的版本进行签名</title>
<meta name="project_path" value="/_project.yaml"/>
<meta name="book_path" value="/_book.yaml"/>
</head>
diff --git a/zh-cn/devices/tech/perf/boot-times.html b/zh-cn/devices/tech/perf/boot-times.html
index 907addf3..74b39a90 100644
--- a/zh-cn/devices/tech/perf/boot-times.html
+++ b/zh-cn/devices/tech/perf/boot-times.html
@@ -215,6 +215,11 @@ CONFIG_MOBICORE_DRIVER=y
很多进程都在设备启动期间启动,但只有关键路径 (bootloader &gt; kernel &gt; init &gt; file system mount &gt; zygote &gt; system server) 中的组件才会直接影响启动时间。在内核启动期间执行 <strong>initcall</strong> 来识别对启动 init 进程不重要的外设/组件,然后将这些外设/组件延迟到启动过程的后期来启动。
</p>
+<pre class="prettyprint">
+BoardConfig-common.mk:
+ BOARD_KERNEL_CMDLINE += initcall_debug ignore_loglevel
+</pre>
+
<h2 id="optimizing-i-o-efficiency">优化 I/O 效率</h2>
<p>
diff --git a/zh-cn/devices/tech/power/component.html b/zh-cn/devices/tech/power/component.html
index 40a220b4..56b858c4 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 7a0436f6..ca727188 100644
--- a/zh-cn/devices/tv/index.html
+++ b/zh-cn/devices/tv/index.html
@@ -22,7 +22,7 @@
<img style="float: right; margin: 0px 15px 15px 15px;" src="images/ape_fwk_hal_tv.png" alt="Android TV HAL 图标"/>
-<p>Android TV Input Framework (TIF) 简化了向 Android TV 传送直播内容的过程。Android TIF 为制造商提供了一个标准 API,用于创建能够控制 Android TV 的输入模块,并让他们可以通过 TV Input 发布的元数据来搜索和推荐直播电视内容。</p>
+<p>Android TV 输入框架 (TIF) 简化了向 Android TV 传送直播内容的过程。Android TIF 为制造商提供了一个标准 API,用于创建能够控制 Android TV 的输入模块,并让他们可以通过 TV Input 发布的元数据来搜索和推荐直播电视内容。</p>
<p>此框架的目的并不在于实施电视标准或区域性要求,而是在于让设备制造商不必重新实现就能够更轻松地满足区域性数字电视广播标准。对于想要创建自定义 TV Input 的第三方应用开发者来说,本部分文档可能也非常实用。</p>
<h2 id="components">组件</h2>
@@ -53,7 +53,7 @@
<ol>
<li>用户看到 TV 应用(一款第三方应用无法替代的系统应用)并与该应用进行互动。
</li><li>TV 应用显示来自 TV Input 的 AV 内容。
- </li><li>TV 应用无法直接与 TV Input 通信。TV Input Manager 可为 TV 应用识别 TV Input 的状态。有关使用限制的更多详情,请参阅下文的“TV Input Manager”部分。<em></em>
+ </li><li>TV 应用无法直接与 TV Input 通信。TV Input Manager 可为 TV 应用识别 TV Input 的状态。有关相关限制的更多详情,请参阅下文的“TV Input Manager”部分。<em></em>
</li></ol>
<h2 id="permissions">权限</h2>
@@ -63,7 +63,7 @@
</li><li>只有系统 TV Input 可以通过 TV Input Manager Service 访问 TV Input HAL。系统通过 TV Input Manager 会话对 TV Input 进行一对一访问。
</li><li>第三方 TV Input 拥有对 TV Provider 数据库的访问权限(软件包已锁定),只能对匹配的软件包行进行读写。
</li><li>第三方 TV Input 可以显示自己的内容,也可显示来自设备制造商提供的直通 TV Input(如 HDMI1)上的内容。它们不能显示来自非直通 TV Input(如内置调谐器或 IPTV 调谐器)的内容。
- </li><li>硬件 TV Input 应用的 <code>TV_INPUT_HARDWARE</code> 权限,向 TV Input Manager Service 发送信号,以通知 TV Input Service 在启动时调用 TV Input Manager Service 并添加其 TV Input。借助此权限,硬件 TV Input 应用可通过一个 TV Input Service 支持多个 TV Input,并能够动态地添加和移除支持的 TV Input。
+ </li><li>硬件 TV Input 应用的 <code>TV_INPUT_HARDWARE</code> 权限,向 TV Input Manager Service 发送信号,以通知 TV Input Service 在启动时调用 TV Input Manager Service 并添加其 TV Input。借助此权限,硬件 TV Input 应用可通过一项 TV Input Service 支持多个 TV Input,并能够动态地添加和移除支持的 TV Input。
</li></ul>
<h2 id="tv_provider">TV Provider</h2>
@@ -88,14 +88,15 @@
<p>TV Provider 支持频道 (<code>android.provider.TvContract.Channels</code>) 和节目 (<code>android.provider.TvContract.Programs</code>) 表格中的结构化数据。这些表格由 TV Input 和系统应用(如 TV 应用)进行填充和访问。这些表格具有四种类型的字段:</p>
<ul>
- <li><strong>显示</strong>:显示字段包含应用可能希望向用户显示的信息,如频道名称 (<code>COLUMN_DISPLAY_NAME</code>) 或编号 (<code>COLUMN_DISPLAY_NUMBER</code>) 或正在观看的节目的标题。
+ <li><strong>显示</strong>:显示字段包含应用可能希望向用户显示的信息,如频道名称 (<code>COLUMN_DISPLAY_NAME</code>) 或编号 (<code>COLUMN_DISPLAY_NUMBER</code>) 或正在观看的节目的名称。
</li><li><strong>元数据</strong>:根据相关标准,有三个字段可用于识别内容,如频道的传输流 ID (<code>COLUMN_TRANSPORT_STREAM_ID</code>)、原始网络 ID (<code>COLUMN_ORIGINAL_NETWORK_ID</code>) 和服务 ID (<code>COLUMN_SERVICE_ID</code>)。
- </li><li><strong>内部数据</strong>:用于自定义 TV Input 用途的字段。<br />某些字段(如 <code>COLUMN_INTERNAL_PROVIDER_DATA</code>)是可自定义的 BLOB 字段,TV Input 可以在这些字段中存储有关其频道或节目的任意元数据。
+ </li><li><strong>内部数据</strong>:用于 TV Input 自定义用途的字段。<br />
+ 某些字段(如 <code>COLUMN_INTERNAL_PROVIDER_DATA</code>)是可自定义的 BLOB 字段,TV Input 可以在这些字段中存储有关其频道或节目的任意元数据。
</li><li><strong>标记</strong>:标记字段表示是否应禁止搜索、浏览或查看某个频道。只能在频道级别进行此设置。所有节目均应遵循此项频道设置。
<ul>
<li><code>COLUMN_SEARCHABLE</code>:在某些地区可能要求禁止搜索某些频道。<code>COLUMN_SEARCHABLE = 0</code> 表示不应在搜索结果中显示此频道。
</li><li><code>COLUMN_BROWSABLE</code>:仅对系统应用可见。禁止应用浏览频道。<code>COLUMN_BROWSABLE = 0</code> 表示频道列表中不应包含此频道。
- </li><li><code>COLUMN_LOCKED</code>:仅对系统应用可见。禁止未输入 PIN 码的无效帐号观看频道。<code>COLUMN_LOCKED = 1</code> 表示此频道应受家长控制保护。
+ </li><li><code>COLUMN_LOCKED</code>:仅对系统应用可见。禁止未输入 PIN 码的无效帐号查看频道。<code>COLUMN_LOCKED = 1</code> 表示此频道应受家长控制保护。
</li></ul>
</li></ul>
@@ -118,7 +119,7 @@
<ul>
<li>列出 TV Input 并查看其状态</li><li>创建会话并管理监听器</li></ul>
-<p>对于会话,TV Input(除了可使用 <code>TvContract.buildChannelUriForPassthroughInput()</code> 调谐的直通 TV Input)只能由 TV 应用调谐至已被 TV 应用添加到 TV Provider 数据库中的 URI。TV Input 也可以自己设置音量。由设备制造商(签名应用)或安装于系统分区中的其他应用提供和签名的 TV Input 具有对整个 TV Provider 数据库的访问权限。此访问权限可用于构建应用,以浏览和搜索所有可用的电视频道和节目。</p>
+<p>对于会话,TV Input(除了可使用 <code>TvContract.buildChannelUriForPassthroughInput()</code> 调谐到的直通 TV Input)只能由 TV 应用调谐至已被 TV 应用添加到 TV Provider 数据库中的 URI。TV Input 也可以自己设置音量。由设备制造商(签名应用)或安装于系统分区中的其他应用提供和签名的 TV Input 可以访问整个 TV Provider 数据库。此访问权限可用于构建应用,以在所有可用的电视频道和节目中进行浏览和搜索。</p>
<p>应用可以通过 <code>android.media.tv.TvInputManager</code> 创建和注册一个 <code>TvInputCallback</code>,并在 TV Input 的状态发生改变或添加/移除 TV Input 时进行该回调。例如,TV 应用可以在 TV Input 断开连接时做出以下响应:显示该 TV Input 已断开连接并阻止它被选中。</p>
@@ -135,7 +136,7 @@
<img src="images/TIF_HDMI_TV_Input.png" alt="Android TV 系统输入源"/>
<p class="img-caption"><strong>图 3.</strong> Android TV 系统输入源</p>
-<p>在上述示例中,由设备制造商提供的 TV Input 是可信输入源,并拥有对 TV Provider 的完全访问权限。作为直通 TV Input,它不会向 TV Provider 注册任何频道或节目。要获取用于引用直通输入源的 URI,请使用 <code>android.media.tv.TvContract</code> 实用程序方法 <code>buildChannelUriForPassthroughInput(String inputId)</code>。TV 应用与 TV Input Manager 进行通信,从而访问 HDMI TV Input。</p>
+<p>在上述示例中,由设备制造商提供的 TV Input 是可信输入源,并拥有对 TV Provider 的完全访问权限。作为直通 TV Input,它不会向 TV Provider 注册任何频道或节目。要获取用于引用直通输入源的 URI,请使用 <code>android.media.tv.TvContract</code> 实用程序方法 <code>buildChannelUriForPassthroughInput(String inputId)</code>。TV 应用会与 TV Input Manager 进行通信,从而访问 HDMI TV Input。</p>
<h3 id="built-in_tuner_example">内置调谐器示例</h3>
@@ -158,13 +159,13 @@
<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>
+<p>只有系统 TV Input 才有资格接收 <code>InputEvents</code>(前提是这些系统 TV Input 具有 <code>RECEIVE_INPUT_EVENT</code> 系统权限)。TV Input 负责确定要消耗哪些 InputEvent,并允许 TV 应用处理它不需要消耗的按键。</p>
<p>TV 应用负责确定哪些系统 TV Input 处于有效状态(即用户已选择)、区分传入的 <code>KeyEvents</code> 并将它们路由到正确的 TV Input Manager 会话,以及调用 <code>dispatchInputEvent()</code> 以将事件传递到相关联的 TV Input。</p>
-<h3 id="mheg-5_input_example">MHEG-5 输入源示例</h3>
+<h3 id="mheg-5_input_example">MHEG-5 输入示例</h3>
<p>下图详细说明了 <code>KeyEvents</code> 如何通过 Android TIF 进行路由。</p>
@@ -182,7 +183,7 @@
</li><li><code>KeyEvents</code>(例如:红色按钮)作为 <code>InputEvents.</code> 被传递到处于有效状态的 TV Input。
</li><li>系统 TV Input 与 MHEG-5 堆栈进行集成,并拥有 <code>RECEIVE_INPUT_EVENT</code> 系统权限。
</li><li>TV Input 在接收到激活键码(例如:红色按钮)后激活广播应用。
- </li><li>TV Input 将 <code>KeyEvents</code> 当做 <code>InputEvents</code> 进行消费,然后广播应用获得焦点并处理 <code>InputEvents</code> 直到应用被关闭。
+ </li><li>TV Input 将 <code>KeyEvents</code> 当做 <code>InputEvents</code> 进行消耗,然后广播应用获得焦点并处理 <code>InputEvents</code> 直到应用被关闭。
</li></ol>
<p class="note"><strong>注意</strong>:第三方 TV Input 从不接收按键事件。</p>
@@ -193,8 +194,7 @@
<h2 id="tv_app">TV 应用</h2>
-<p>系统 TV 应用向用户呈现直播电视内容。Android 平台提供了一个参考 TV 应用 (Live TV),设备制造商可以直接按原样使用该应用、对其进行定制、扩展或将其替换掉。
-Android 开源项目中提供了<a href="https://android.googlesource.com/platform/packages/apps/TV/">源代码</a>,您可以按照<a href="/devices/tv/reference-tv-app.html">参考 TV 应用</a>一文中的说明开始构建 TV 应用。</p>
+<p>系统 TV 应用向用户呈现直播电视内容。Android 平台提供了一个参考 TV 应用 (Live TV),设备制造商可以直接按原样使用该应用、对其进行定制、扩展或将其替换掉。Android 开源项目中提供了<a href="https://android.googlesource.com/platform/packages/apps/TV/">源代码</a>,您可以按照<a href="/devices/tv/reference-tv-app.html">参考 TV 应用</a>一文中的说明开始构建 TV 应用。</p>
<p>设备制造商可以扩展他们的 TV 应用来实现适用于特定设备制造商或国家/地区的功能,但这不属于 TIF 或参考 TV 应用的职责范畴。</p>
@@ -265,7 +265,7 @@ Android 开源项目中提供了<a href="https://android.googlesource.com/platfo
<p class="img-caption"><strong>图 12.</strong> 表示有可用新频道来源的通知。</p>
<p>如果用户通过通知进行操作,他们可以选择设置频道来源,如图 10 所示。</p>
-<p>请参阅<a href="http://developer.android.com/training/tv/tif/tvinput.html#setup">定义您的 TV Input Service</a>,了解开发者对此领域的期望。</p>
+<p>请参阅<a href="http://developer.android.com/training/tv/tif/tvinput.html#setup">定义您的 TV Input Service</a>,了解相关的开发者要求。</p>
<h4 id="customize_the_channel_list">自定义频道列表</h4>
@@ -287,7 +287,7 @@ Android 开源项目中提供了<a href="https://android.googlesource.com/platfo
<p>为确保最佳用户体验,制造商必须实现以下 TV 应用功能:纳入能够满足全局搜索请求的搜索结果。Live TV 提供了一种实现方法(请参阅 <a href="https://android.googlesource.com/platform/packages/apps/TV/+/android-live-tv/src/com/android/tv/search/TvProviderSearch.java">com.android.tv.search.TvProviderSearch</a>),它可提供来自第三方输入源(对于平台兼容性而言是必要的)以及内置输入源的结果。</p>
-<h4 id="time-shifting">时移</h4>
+<h4 id="time-shifting">时光平移</h4>
<p>对于运行 Android 6.0 及更高版本的设备,TV 应用必须支持 Android 框架<a href="https://developer.android.com/reference/android/media/tv/TvView.html">时移 API</a>。此外,制造商必须在 TV 应用中实现播放控件,让用户可以对播放内容执行暂停、继续、快退和快进播放等操作。
</p>
<p>对于支持时移的 TV Input,TV 应用需显示播放控件。
@@ -333,8 +333,8 @@ Android 开源项目中提供了<a href="https://android.googlesource.com/platfo
<ul>
<li><a href="/compatibility/android-cdd.pdf">Android CDD</a> 和开发者 API 文档是最具权威性的参考资料。
- </li><li>CTS 验证程序会在兼容性测试计划过程中执行 API。对照 Live TV 运行 CTS 验证程序可能是一种在第三方输入源环境中查看 EPG、搜索、家长控制和其他要求的实用方法。
- </li><li>请参阅<a href="http://developer.android.com/training/tv/tif/tvinput.html#setup">定义您的 TV Input Service</a>,了解开发者对此领域的期望。
+ </li><li>CTS 验证程序会在兼容性测试计划过程中执行 API。对 Live TV 运行 CTS 验证程序可能是一种在第三方输入源环境中查看 EPG、搜索、家长控制和其他要求的实用方法。
+ </li><li>请参阅<a href="http://developer.android.com/training/tv/tif/tvinput.html#setup">定义您的 TV Input Service</a>,了解相关的开发者要求。
</li></ul>
<h2 id="parental_control">家长控制</h2>
@@ -406,7 +406,7 @@ Android 开源项目中提供了<a href="https://android.googlesource.com/platfo
<ul>
<li>MHEG:原生堆栈
</li><li>电视文字广播:原生堆栈
- </li><li>HbbTV:由 Opera 浏览器修改过的 webkit
+ </li><li>HbbTV:Vewd Software 提供的 HbbTV 解决方案
</li></ul>
<p>在 Android L 版本中,Android TV 希望设备制造商针对区域性电视堆栈使用系统集成器或 Android 解决方案,将 Surface 传递到电视软件堆栈,或传递与传统堆栈进行交互所需的按键代码。</p>
diff --git a/zh-cn/devices/tv/reference-tv-app.html b/zh-cn/devices/tv/reference-tv-app.html
index be9b8d21..ca7f7d04 100644
--- a/zh-cn/devices/tv/reference-tv-app.html
+++ b/zh-cn/devices/tv/reference-tv-app.html
@@ -92,7 +92,7 @@ adb push $OUT/system/priv-app/LiveTv/LiveTv.apk /system/priv-app/LiveTv/
<h2 id="test">测试</h2>
-<p>在设备上安装 Live TV 后,您需要测试该应用是否已正确集成。除了对 TV 应用运行<a href="/compatibility/cts/index.html">兼容性测试套件</a>和 <a href="http://source.android.com/compatibility/cts/verifier.html">CTS 验证程序测试</a>外,您还可以使用以下这些测试:</p>
+<p>在设备上安装 Live TV 后,您需要测试该应用是否已正确集成。除了对 TV 应用运行<a href="/compatibility/cts/index.html">兼容性测试套件</a>和 <a href="/compatibility/cts/verifier.html">CTS 验证程序测试</a>外,您还可以使用以下这些测试:</p>
<h3 id="unit_tests">单元测试</h3>
diff --git a/zh-cn/license.html b/zh-cn/license.html
index 5b60febd..4603793b 100644
--- a/zh-cn/license.html
+++ b/zh-cn/license.html
@@ -45,8 +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/advisory/index.html b/zh-cn/security/advisory/index.html
index 0d219d02..2e0028be 100644
--- a/zh-cn/security/advisory/index.html
+++ b/zh-cn/security/advisory/index.html
@@ -35,7 +35,7 @@
<tr>
<td><a href="2016-03-18.html">2016-03-18</a></td>
<td>
- <a href="/security/advisory/2016-03-18.html">English</a> / <a href="/security/advisory/2016-03-18.html?hl=ja">日本語</a> / <a href="/security/advisory/2016-03-18.html?hl=ko">한국어</a> / <a href="/security/advisory/2016-03-18.html?hl=ru">ру́сский</a> / <a href="/security/advisory/2016-03-18.html?hl=zh-cn">中文 (中国)</a> /<a href="/security/advisory/2016-03-18.html?hl=zh-tw">中文 (台灣)</a>
+ <a href="/security/advisory/2016-03-18.html">English</a> / <a href="/security/advisory/2016-03-18.html?hl=ja">日本語</a> / <a href="/security/advisory/2016-03-18.html?hl=ko">한국어</a> / <a href="/security/advisory/2016-03-18.html?hl=ru">ру́сский</a> / <a href="/security/advisory/2016-03-18.html?hl=zh-cn">中文 (中国)</a> / <a href="/security/advisory/2016-03-18.html?hl=zh-tw">中文 (台灣)</a>
</td>
<td>2016 年 3 月 18 日</td>
</tr>
diff --git a/zh-cn/security/apksigning/v2.html b/zh-cn/security/apksigning/v2.html
index b32f6fff..3870b140 100644
--- a/zh-cn/security/apksigning/v2.html
+++ b/zh-cn/security/apksigning/v2.html
@@ -1,5 +1,5 @@
<html devsite><head>
- <title>APK 签名方案 v2</title>
+ <title>APK 签名架构 v2</title>
<meta name="project_path" value="/_project.yaml"/>
<meta name="book_path" value="/_book.yaml"/>
</head>
diff --git a/zh-cn/security/keystore/tags.html b/zh-cn/security/keystore/tags.html
index 477d4e4b..1ffb2a55 100644
--- a/zh-cn/security/keystore/tags.html
+++ b/zh-cn/security/keystore/tags.html
@@ -206,7 +206,7 @@ typedef enum {
<p>用于指定授权在多长时间内使用相应密钥(以秒数计,从通过身份验证开始算起)。如果 <a href="#user_secure_id">Tag::USER_SECURE_ID</a> 存在而此标记不存在,那么每次使用相应密钥时都需要通过身份验证(要详细了解各项操作的身份验证流程,请参阅 <a href="/security/keystore/implementer-ref#begin">begin</a>)。</p>
-<p>此标记的值是一个 32 位的整数,用于指定可在多长时间内使用相应密钥(以秒数计,从使用通过 <a href="#user_secure_id">Tag::USER_AUTH_TYPE</a> 指定的身份验证方法对通过 <a href="#mac_length">Tag::USER_SECURE_ID</a> 指定的用户成功进行身份验证后开始算起)。</p>
+<p>此标记的值是一个 32 位的整数,用于指定可在多长时间内使用相应密钥(以秒数计,从使用通过 <a href="#mac_length">Tag::USER_AUTH_TYPE</a> 指定的身份验证方法对通过 <a href="#user_secure_id">Tag::USER_SECURE_ID</a> 指定的用户成功进行身份验证后开始算起)。</p>
<h2 id="auth_token">Tag::AUTH_TOKEN</h2>
@@ -396,8 +396,7 @@ P_521 = 3,
<p><strong>是否可重复使用</strong>?否</p>
<p>用于指定相应密钥的大小(以位数计,按适用于相应密钥算法的一般方式衡量)。例如,对于 RSA 密钥,<code>Tag::KEY_SIZE</code> 用于指定公开模数的大小。对于 AES 密钥,此标记用于指定密钥私密材料的长度。</p>
-<p class="note">在 Keymaster 2 及更高版本中,<code>Tag::KEY_SIZE</code> 不再是选择 ECC(椭圆曲线加密)曲线的首选机制。
-虽然对于其他密钥类型而言是没有变化的,但 ECC 曲线是使用标记 <a href="#ec_curve"><code>Tag::EC_CURVE</code></a> 选择的。</p>
+<p class="note">在 Keymaster 2 及更高版本中,<code>Tag::KEY_SIZE</code> 不再是选择 ECC(椭圆曲线加密)曲线的首选机制。虽然对于其他密钥类型而言没有变化,但 ECC 曲线是使用标记 <a href="#ec_curve"><code>Tag::EC_CURVE</code></a> 选择的。</p>
<h2 id="mac_length">Tag::MAC_LENGTH</h2>
diff --git a/zh-cn/security/overview/acknowledgements.html b/zh-cn/security/overview/acknowledgements.html
index 3c27a68e..3094e789 100644
--- a/zh-cn/security/overview/acknowledgements.html
+++ b/zh-cn/security/overview/acknowledgements.html
@@ -24,6 +24,120 @@
<h2 id="2018">2018</h2>
<p>2018 年的安全致谢信息将按月列出。过去几年的致谢信息是列在一起的。</p>
+
+<h4 id="feb-2018">2 月</h4>
+
+<table>
+ <colgroup><col width="70%" />
+ <col width="30%" />
+ </colgroup><tbody><tr>
+ <th>研究人员</th>
+ <th>CVE</th>
+ </tr>
+ <tr>
+ <td>Codefire 团队的 Aaron Willey、autoprime (<a href="https://twitter.com/utoprime?lang=en">@utoprime</a>) 和 Tyler Montgomery (<a href="https://twitter.com/tylerfixer">@tylerfixer</a>)
+ </td>
+ <td>CVE-2017-13238
+ </td>
+ </tr>
+ <tr>
+ <td>华为公司的 Cusas
+ </td>
+ <td>CVE-2017-13235
+ </td>
+ </tr>
+ <tr>
+ <td>奇虎 360 科技有限公司 Alpha 团队的 Elphet 和龚广
+ </td>
+ <td>CVE-2017-13229
+ </td>
+ </tr>
+ <tr>
+ <td><a href="http://www.ms509.com">MS509Team</a> 的 En He (<a href="https://twitter.com/heeeeen4x">@heeeeen4x</a>) 和 Bo Liu
+ </td>
+ <td>CVE-2017-13242
+ </td>
+ </tr>
+ <tr>
+ <td>Google 的 Gal Beniamini
+ </td>
+ <td>CVE-2017-13236
+ </td>
+ </tr>
+ <tr>
+ <td>奇虎 360 科技有限公司 Alpha 团队的 Hao Chen 和龚广
+ </td>
+ <td>CVE-2017-13245
+ </td>
+ </tr>
+ <tr>
+ <td><a href="http://c0reteam.org">C0RE 团队</a>的 Hongli Han (<a href="https://twitter.com/HexB1n">@HexB1n</a>)、<a href="mailto:shaodacheng2016@gmail.com">Dacheng Shao</a> 和 Mingjian Zhou (<a href="https://twitter.com/Mingjian_Zhou">@Mingjian_Zhou</a>)
+ </td>
+ <td>CVE-2017-6258
+ </td>
+ </tr>
+ <tr>
+ <td><a href="http://c0reteam.org">CORE 团队</a>的 Hongli Han (<a href="https://twitter.com/HexB1n">@HexB1n</a>)、Mingjian Zhou (<a href="https://twitter.com/Mingjian_Zhou">@Mingjian_Zhou</a>)
+ </td>
+ <td>CVE-2017-17767、CVE-2017-6279
+ </td>
+ </tr>
+ <tr>
+ <td><a href="http://c0reteam.org">C0RE 团队</a>的周明建 (<a href="https://twitter.com/Mingjian_Zhou">@Mingjian_Zhou</a>)
+ </td>
+ <td>CVE-2017-13241、CVE-2017-13231
+ </td>
+ </tr>
+ <tr>
+ <td>Nightwatch Cybersecurity Research
+ </td>
+ <td>CVE-2017-13243
+ </td>
+ </tr>
+ <tr>
+ <td><a href="mailto:jiych.guru@gmail.com">Niky1235</a> (<a href="https://twitter.com/jiych_guru">@jiych_guru</a>)
+ </td>
+ <td>CVE-2017-13230、CVE-2017-13234
+ </td>
+ </tr>
+ <tr>
+ <td>Outware
+ </td>
+ <td>CVE-2017-13239
+ </td>
+ </tr>
+ <tr>
+ <td>PDD 安全团队的 Qidan He (<a href="https://twitter.com/flanker_hqd?lang=en">@flanker_hqd</a>)
+ </td>
+ <td>CVE-2017-13246
+ </td>
+ </tr>
+ <tr>
+ <td>腾讯安全平台部门的 Xiling Gong
+ </td>
+ <td>CVE-2017-15852
+ </td>
+ </tr>
+ <tr>
+ <td>奇虎 360 科技有限公司 IceSword 实验室的 Yonggang Guo (<a href="https://twitter.com/guoygang">@guoygang</a>)
+ </td>
+ <td>CVE-2017-13273
+ </td>
+ </tr>
+ <tr>
+ <td>腾讯安全平台部门的 ZhangBo
+ </td>
+ <td>CVE-2015-9016
+ </td>
+ </tr>
+ <tr>
+ <td>奇虎 360 科技有限公司成都安全响应中心的 <a href="http://weibo.com/ele7enxxh">Zinuo Han</a>
+ </td>
+ <td>CVE-2017-13232
+ </td>
+ </tr>
+</tbody></table>
+
<h4 id="january-2018">1 月</h4>
<table>
@@ -34,7 +148,7 @@
<th>CVE</th>
</tr>
<tr>
- <td><a href="mailto:zhangadong@huawei.com">Adong Zhang</a> (张阿东)、<a href="mailto:liuchao741@huawei.com">Chao Liu</a> (刘超) 和 <a href="mailto:dongjinguang@huawei.com">Jinguang Dong</a> (董金光)</td>
+ <td><a href="mailto:zhangadong@huawei.com">张阿东</a>、<a href="mailto:liuchao741@huawei.com">刘超</a>和<a href="mailto:dongjinguang@huawei.com">董金光</a></td>
<td>CVE-2017-13215</td>
</tr>
<tr>
@@ -1093,7 +1207,7 @@
<p>William Roberts (<a href="mailto:william.c.roberts@intel.com">william.c.roberts@intel.com</a>)</p>
-<p><a href="http://www.trendmicro.com">趋势科技</a>的<a href="http://blog.trendmicro.com/trendlabs-security-intelligence/category/mobile/">移动威胁响应团队</a>的<a href="http://weibo.com/wishlinux">吴潍浠</a> (<a href="https://twitter.com/wish_wu">@wish_wu</a>)</p>
+<p><a href="http://www.trendmicro.com">趋势科技</a><a href="http://blog.trendmicro.com/trendlabs-security-intelligence/category/mobile/">移动威胁响应团队</a>的<a href="http://weibo.com/wishlinux">吴潍浠</a> (<a href="https://twitter.com/wish_wu">@wish_wu</a>)</p>
<p><a href="http://c0reteam.org">C0RE 团队</a>的 <a href="mailto:wisedd@gmail.com">Xiaodong Wang</a></p>
@@ -1349,7 +1463,7 @@ William Roberts</a> (<a href="mailto:bill.c.roberts@gmail.com">bill.c.roberts@gm
<p>印第安纳大学布卢明顿分校的 <a href="http://www.informatics.indiana.edu/xw7/">Xiaofeng Wang</a> (<a href="mailto:xw7@indiana.edu">xw7@indiana.edu</a>)</p>
-<p><a href="http://www.cs.indiana.edu/~zhou/">印第安纳大学布卢明顿分校</a>的 Xiaoyong Zhou <br />(<a href="https://twitter.com/xzhou">@xzhou</a>、<a href="mailto:zhou.xiaoyong@gmail.com">zhou.xiaoyong@gmail.com</a>)</p>
+<p><a href="http://www.cs.indiana.edu/~zhou/">印第安纳大学布卢明顿分校</a>的 Xiaoyong Zhou <br />(<a href="https://twitter.com/xzhou">@xzhou</a>、<a href="mailto:zhou.xiaoyong@gmail.com">zhou.xiaoyong@gmail.com</a>)</p>
<p>北京大学的 Xinhui Han (<a href="mailto:hanxinhui@pku.edu.cn">hanxinhui@pku.edu.cn</a>)</p>
diff --git a/zh-cn/setup/64-bit-builds.html b/zh-cn/setup/64-bit-builds.html
index 2d10e38b..dab0696f 100644
--- a/zh-cn/setup/64-bit-builds.html
+++ b/zh-cn/setup/64-bit-builds.html
@@ -151,6 +151,6 @@ $(local-generated-sources-dir)</code> 或 <code>$(generated-sources-dir-for)</co
<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>
+<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/brands.html b/zh-cn/setup/brands.html
index a0eafe4d..9031a951 100644
--- a/zh-cn/setup/brands.html
+++ b/zh-cn/setup/brands.html
@@ -1,5 +1,5 @@
<html devsite><head>
- <title>品牌指南</title>
+ <title>品牌推广指南</title>
<meta name="project_path" value="/_project.yaml"/>
<meta name="book_path" value="/_book.yaml"/>
</head>
@@ -20,7 +20,7 @@
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 Inc. 的资产,不属于通过 Android 开源项目提供的资源。</p>
+<p>“Android”名称、<img src="/setup/assets/images/sac_logo.png" alt="Android" style="margin:0;padding:0 2px;vertical-align:baseline"/> 徽标、“Google Play”品牌以及其他商标均为 Google Inc. 的资产,不属于通过 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>
@@ -76,7 +76,7 @@
</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>
+<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>
diff --git a/zh-cn/setup/build-numbers.html b/zh-cn/setup/build-numbers.html
index ede1f19f..a0879d5d 100644
--- a/zh-cn/setup/build-numbers.html
+++ b/zh-cn/setup/build-numbers.html
@@ -1,5 +1,5 @@
<html devsite><head>
- <title>代号、标记和细分版本号</title>
+ <title>代号、标记和细分版本 (Build) 号</title>
<meta name="project_path" value="/_project.yaml"/>
<meta name="book_path" value="/_book.yaml"/>
</head>
@@ -165,12 +165,13 @@
</tr>
</tbody>
</table>
-<p>从 Oreo 开始,每个细分版本均采用新的细分版本号格式,即 PVBB.YYMMDD.bbb。</p>
+<p>从 Oreo 开始,每个细分版本均采用新的细分版本号格式,即 PVBB.YYMMDD.bbb[.Cn]。</p>
<p>P 部分表示平台版本代号的第一个字母,例如 O 表示 Oreo。</p>
<p>V 部分表示支持的行业。按照惯例,“P”表示主要平台分支。</p>
<p>BB 部分表示由字母和数字组成的代码,Google 可通过该代码识别相应细分版本所属的确切代码分支。</p>
<p>YYMMDD 部分表示相应版本从开发分支细分出来或与开发分支同步的日期。它并不一定是细分版本的确切构建日期,Google 常常会在现有细分版本中增加细微的更改,并在新细分版本中重复使用与现有细分版本相同的日期代码。</p>
<p>bbb 部分表示具有相同日期代码的不同版本,从 001 开始。</p>
+<p>可选的字母数字 Cn 部分表示在现有 PVBB.YYMMDD.bbb 细分版本(从 A1 开始)之上编译的修补程序。</p>
<p>从 Cupcake 到 Nougat 的较早 Android 版本所用的细分版本号格式有所不同。这些 Android 细分版本均有一个简短的细分版本代码,以作区分,例如 FRF85B。
</p>
<p>第一个字母代表相应版本系列的代号,例如 F 表示 Froyo。</p>
@@ -195,6 +196,36 @@
</thead>
<tbody>
<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>
diff --git a/zh-cn/setup/community.html b/zh-cn/setup/community.html
index 668c301c..457e12d1 100644
--- a/zh-cn/setup/community.html
+++ b/zh-cn/setup/community.html
@@ -181,12 +181,12 @@
</li>
<li>允许讨论的主题:我们的大多数论坛都用于讨论与 Android 相关的技术话题或方便用户互相帮助。<em></em>一般情况下,我们不会对在论坛中讨论的主题进行严格限制:只要主题在某种程度上与 Android 相关,都可以在我们的论坛中进行讨论。我们欢迎大家公布和讨论与 Android 相关的产品、库、出版物和其他有趣的新闻,但请不要同时在多个论坛中发帖。请仅在与您的内容最相关的论坛中发帖。我们甚至欢迎讨论批判 Android 的文章和想法(但请保持礼貌!)- 毕竟,如果我们不听取意见,就无法改进。
</li>
-<li>工作论坛:我们的某些论坛被视为“工作论坛”(旨在为特定任务提供支持)。<em></em>在这些论坛中,我们不欢迎与主题无关的讨论。如果您要进行一般讨论,我们通常会要求您使用其他论坛。由于人们会利用这些论坛来完成相关工作,因此我们会采取积极的举措来减少无关的内容。我们希望您能够尊重贡献者们的宝贵时间,并使用适当的论坛进行一般讨论。
+<li>工作论坛:我们的某些论坛被视为“工作论坛”(旨在为完成特定任务提供支持)。<em></em>在这些论坛中,我们不欢迎与主题无关的讨论。如果您要进行一般讨论,我们通常会要求您使用其他论坛。由于人们会利用这些论坛来完成相关工作,因此我们会采取积极的举措来减少无关的内容。我们希望您能够尊重贡献者们的宝贵时间,并使用适当的论坛进行一般讨论。
</li>
<li>垃圾内容:我们非常讨厌垃圾内容,这种心情正如我们崇尚礼貌和尊重一样强烈,因此我们保留限制垃圾讨论内容的权利。<em></em>如果有人发布纯属垃圾的内容,我们会立即并永久禁止发布者使用相应论坛。
</li>
</ul>
-<p>友善是最重要的规则。请谨记:在任何情况下,我们的社区都不欢迎不尊重他人和粗鲁的行为。我们没有制定正式的政策来对付捣乱者,也希望永远都不需要制定这样的政策。也就是说,我们承诺会尽最大努力保证公平,并且我们始终会先尝试警告对方,警告无果后再禁止其使用相应论坛。</p>
+<p>友善是最重要的规则。请谨记:在任何情况下,我们的社区都不欢迎不尊重他人和粗鲁的行为。我们没有制定正式的政策来对付捣乱者,也希望永远都不需要制定这样的政策。不过,我们承诺会尽最大努力保证公平,并且我们始终会先尝试警告对方,警告无果后再禁止其使用相应论坛。</p>
<h3 id="contacting">与管理员联系</h3>
<p>如果您发现有人言行粗鲁,请制止他们。您也是相应论坛的一份子,因此您不必因为他人的无礼行为不是针对您而予以容忍。切记要有礼有节!请勿火上浇油。</p>
diff --git a/zh-cn/setup/initializing.html b/zh-cn/setup/initializing.html
index 76d57fa7..dbeb220b 100644
--- a/zh-cn/setup/initializing.html
+++ b/zh-cn/setup/initializing.html
@@ -49,11 +49,11 @@
<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>
-<p>从 <a href="http://archive.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/">archive.ubuntu.com</a> 下载适用于 64 位架构的 <code>.deb</code> 软件包:</p>
+<p>从 <a href="http://old-releases.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/">old-releases.ubuntu.com</a> 下载适用于 64 位架构的 <code>.deb</code> 软件包:</p>
<ul>
-<li><a href="http://archive.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://archive.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://archive.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>
+<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>
diff --git a/zh-cn/setup/read-bug-reports.html b/zh-cn/setup/read-bug-reports.html
index 167e9f6f..1ee6b19b 100644
--- a/zh-cn/setup/read-bug-reports.html
+++ b/zh-cn/setup/read-bug-reports.html
@@ -682,7 +682,7 @@ ACTIVITY MANAGER BROADCAST STATE (dumpsys activity broadcasts)
</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>错误报告中还包含关于唤醒锁定的统计信息,唤醒锁定是应用开发者采用的一种机制,用于表明其应用需要设备保持开启状态。(要详细了解唤醒锁定,请参阅 <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>
diff --git a/zh-cn/setup/requirements.html b/zh-cn/setup/requirements.html
index c250e6df..7d7f8c2a 100644
--- a/zh-cn/setup/requirements.html
+++ b/zh-cn/setup/requirements.html
@@ -99,6 +99,8 @@
<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>
+ <p><b>注意</b>:请考虑在 GNU/Linux(而不是其他操作系统)上进行编译。Android 编译系统通常使用编译设备上运行的 ART 来预编译系统 dex 文件。由于 ART 只能在 Linux 上运行,因此编译系统会在非 Linux 操作系统上跳过这个预编译步骤,从而导致 Android 编译的性能下降。</p>
+
<h4 id="jdk">JDK</h4>
<p>有关较低 Android 版本的预编译路径和安装说明,请参阅<a href="initializing.html#installing-the-jdk">安装 JDK</a>。</p>
diff --git a/zh-cn/setup/site-updates.html b/zh-cn/setup/site-updates.html
index 41dbf2bb..678b2c0f 100644
--- a/zh-cn/setup/site-updates.html
+++ b/zh-cn/setup/site-updates.html
@@ -442,10 +442,10 @@ Android 8.0 利用 EXT4 文件系统的“配额”支持,近乎即时地提
<p>随着人们越来越关注 Android 的安全性,我们将<a href="/security/">安全性</a>标签向前移到了<a href="/setup/">源代码</a>旁边,以体现其重要性。</p>
<h3 id="reference-materials">更好的参考资料</h3>
-<p>您可以直接从顶层的<a href="/reference/hal/">参考资料</a>标签获得<a href="/reference/tradefed/packages">硬件抽象层</a>和 <a href="/reference/">Trade Federation</a> 参考资料。</p>
+<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>在每个页面中,您只需点击一下右上角的<a href="https://android.googlesource.com/">转到源代码</a>按钮,即可访问 <strong>AOSP 代码库</strong>。</p>
+<p>在每个页面中,您只需点击一下右上角的<strong>转到源代码</strong>按钮,即可访问 <a href="https://android.googlesource.com/">AOSP 代码库</a>。</p>
<h3 id="comprehensive-footers">包罗广泛的页脚</h3>
<p><em></em><em></em><em></em>除了已有的“关于”、“社区”和“法律”页脚之外,现在您还可以在每个页面的底部找到完整的链接列表。这些链接对应的页面中提供了编译 Android、与 Android 生态系统建立联系以及操作系统使用帮助等方面的信息。</p>