Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Build overview
Stay organized with collections
Save and categorize content based on your preferences.
AOSP uses the Soong build system to build Android. Soong leverages the
kati GNU
Make clone tool and Ninja build system
component to speed up builds of Android.
Soong build files are called blueprint files and are named Android.bp
. These
files are similar in syntax and
sematics to Bazel BUILD files.
For a detailed description of the Android.bp
file format, see
Android.bp file format.
For information on converting your Make files to Android.bp
files, see
Make and Soong comparison.
Feature launch flags and build flags
Feature launch flags are binary flags used to isolate untested code from
tested code. If you have your own mirror of the AOSP external development
branch, you can use these flags to keep your mirrored code stable. Additionally,
if you intend on contributing code to the public external development branch,
you might be asked by your change's reviewer to implement a flag for your code.
Build flags are build-time constants (strings) used to modify your build, such
as optionally including a code library.
For an explanation of the different code branches, see
Release lifecycle.
Feature launch flags and build flags require changes to build files. For
additional information on these flags, including their use in a build, see
the Feature launch flags overview and
adjacent pages.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[],[],null,["# Build overview\n\nAOSP uses the *Soong* build system to build Android. Soong leverages the\n[kati](https://github.com/google/kati/blob/master/README.md) GNU\nMake clone tool and [Ninja](https://ninja-build.org/) build system\ncomponent to speed up builds of Android.\n\nSoong build files are called *blueprint files* and are named `Android.bp`. These\nfiles are similar in syntax and\nsematics to [Bazel BUILD files](https://bazel.build/reference/be/overview).\n\nFor a detailed description of the `Android.bp` file format, see\n[Android.bp file format](/docs/setup/reference/androidbp).\n\nFor information on converting your Make files to `Android.bp` files, see\n[Make and Soong comparison](/docs/setup/build/make-to-soong).\n\nFeature launch flags and build flags\n------------------------------------\n\n*Feature launch flags* are binary flags used to isolate untested code from\ntested code. If you have your own mirror of the AOSP external development\nbranch, you can use these flags to keep your mirrored code stable. Additionally,\nif you intend on contributing code to the public external development branch,\nyou might be asked by your change's reviewer to implement a flag for your code.\n\n*Build flags* are build-time constants (strings) used to modify your build, such\nas optionally including a code library.\n\nFor an explanation of the different code branches, see\n[Release lifecycle](/docs/setup/contribute/release-lifecycle).\n\nFeature launch flags and build flags require changes to build files. For\nadditional information on these flags, including their use in a build, see\nthe [Feature launch flags overview](/docs/setup/build/feature-flagging) and\nadjacent pages."]]