| <html devsite><head> |
| <title>OTA 更新</title> |
| <meta name="project_path" value="/_project.yaml"/> |
| <meta name="book_path" value="/_book.yaml"/> |
| </head> |
| <body> |
| <!-- |
| Copyright 2017 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <p> |
| 正常使用的 Android 设备可以接收和安装系统和应用软件的无线 (OTA) 更新。本部分介绍了更新包的结构以及构建更新包时所用的工具。它适用于希望将 OTA 更新系统用于新的 Android 设备以及正在编译更新软件包以用于已发布设备的开发者。<em></em>OTA 更新旨在升级基础操作系统和系统分区上安装的只读应用;这些更新不会影响用户从 Google Play 安装的应用。 |
| </p> |
| |
| <p>Android 开源项目 (AOSP) 包含 <a href="https://android.googlesource.com/platform/bootable/recovery/+/master/updater_sample/" class="external">SystemUpdaterSample</a> 应用,该应用可提供关于如何使用 Android 系统更新 API 来安装 OTA 更新的示例。示例应用提供了关于如何使用 <code>update_engine</code> 进行 A/B 更新的示例。有关详情,请参阅 <a href="https://android.googlesource.com/platform/bootable/recovery/+/master/updater_sample/README.md" class="external"><code>updater_sample/README.md</code></a>。 |
| </p> |
| |
| <h2 id="ab_updates">A/B(无缝)系统更新</h2> |
| |
| <p> |
| 现代 A/B 设备中的每个分区都有两个副本(A 和 B)。当系统运行但处于空闲状态时,设备会将更新应用到当前未使用的分区。A/B 设备不需要空间来下载更新软件包,因为它们可以在从网络中读取更新时应用该更新。这被称为“流式传输 A/B”。A/B 更新也被称为“无缝更新”。<em></em><em></em>要详细了解有关 A/B 设备的 OTA 更新,请参阅 <a href="/devices/tech/ota/ab/index.html">A/B(无缝)系统更新</a>一文。 |
| </p> |
| |
| <h2 id="nonab_updates">非 A/B 系统更新</h2> |
| |
| <p> |
| 老款设备可在特殊的恢复分区中使用软件解压缩下载的更新包并将其应用于其他分区。有关详细信息,请参阅<a href="/devices/tech/ota/nonab/index.html">非 A/B 系统更新</a>一文。 |
| </p> |
| |
| </body></html> |