AOSP code moves through different branches before it is combined into an official release. Figure 1 shows the various steps of this release lifecycle.
Figure 1. AOSP release lifecycle.
Following are the steps in the lifecycle:
Upstream project code flows into the external development branch, called
main
.An upstream project is an open source project from which the AOSP pulls code. In addition to projects such as the Linux kernel and WebKit, Google migrates some semi-autonomous Android projects such as ART, the Android SDK tools, and Bionic to AOSP. You can contribute directly to some upstream projects. For details, see Contribute to an upstream project.
The external development branch is what you download and modify for your device. This branch is where you might contribute code to the next version of AOSP.
Changes that are uploaded and approved for inclusion in main are automatically available to everyone using the main branch.
Approved changes to main automatically flow to Google's internal development branch. This branch is only accessible within Google and is where Google adds new features for the next release.
Approximately every quarter, an internal release branch is created from the internal development branch. This branch represents all of the code for the next release to AOSP. Google may cherry pick changes into this release branchto address bug fixes and performance improvements .
At some point, the code in the internal release branch is pushed upstream to merge back with the external development branch (
main
) and is used to create a read-only copy of a release branch on the public AOSP host.