自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
版本生命周期
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
AOSP 代码会在不同的分支之间移动,然后才会合并到官方版本中。图 1 显示了此版本生命周期的各个步骤。
图 1. AOSP 版本生命周期。
以下是生命周期中的步骤:
上游项目代码流入称为 main
的外部开发分支。
上游项目是指 AOSP 从中提取代码的开源项目。除了 Linux 内核、WebKit 等项目以外,Google 还会将一些半自主性 Android 项目(如 ART、Android SDK 工具和 Bionic)迁移到 AOSP。您可以直接为某些上游项目做贡献。如需了解详情,请参阅为上游项目做贡献。
外部开发分支是您为设备下载和修改的内容。您可以通过此分支为下一个版本的 AOSP 贡献代码。
已上传并获批纳入 main 的更改会自动提供给使用 main 分支的所有人。
对 main 的已获批更改会自动流向 Google 的内部开发分支。此分支仅在 Google 内部可访问,Google 会在此分支中为下一个版本添加新功能。
大约每季度,都会根据内部开发分支创建一个内部发布分支。此分支代表下一个版本的 AOSP 的所有代码。Google 可能会择优挑选此版本分支中的更改,以修复 bug 并提升性能。
在某个时间点,内部发布分支中的代码会向上游推送,以便与外部开发分支 (main
) 反向合并,并用于在公共 AOSP 主机上创建发布分支的只读副本。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-26。
[null,null,["最后更新时间 (UTC):2025-03-26。"],[],[],null,["# Release lifecycle\n\nAOSP code moves through different branches before it is combined into an\nofficial release. Figure 1 shows the various steps of this release lifecycle:\n\n**Figure 1.** AOSP release lifecycle.\n\nFollowing are the steps in the lifecycle:\n\n1. External contributors can download and modify the latest release\n branch for their device, as well as propose code changes for the next version\n of AOSP on this branch.\n\n | **Note:** The [Download the Android source](/docs/setup/download) document explains how to download and sync to the latest release branch. To view all of the code in the latest release branch within Android code search, navigate to [`https://cs.android.com/android/platform/superproject`](https://cs.android.com/android/platform/superproject).\n\n For information on the lifecycle of upstream projects, see\n [Upstream projects lifecycle](#up-life).\n2. Google reviews and, if accepted, cherrypicks proposed changes on\n the latest release branch into Google's *internal development branch*. This\n branch is accessible only within Google and is where Google adds new features\n for the next release.\n\n3. Periodically, an internal release branch is created from the\n internal development branch. Google might cherry pick changes into this release\n branch to address bug fixes and performance improvements .\n\n4. At some point, Google pushes code from the internal release branch to the\n latest release branch (specified in the `android-latest-release` manifest)\n to create a read-only copy of a release branch on the public AOSP host.\n\n### Upstream projects lifecycle\n\n*Upstream project* code flows into the internal development branch and\nfollow steps 3 and 4 in the preceding diagram. The upstream code is published in\nthe next release branch. An upstream project is an open source project from\nwhich the AOSP pulls code. In addition to projects such as the Linux kernel and\nWebKit, Google migrates some semi-autonomous Android projects such as ART, the\nAndroid SDK tools, and Bionic to AOSP. You can contribute directly to some\nupstream projects. For details, see\n[Contribute to an upstream project](/docs/setup/contribute/contribute-upstream)."]]