Requirements

Before you download and build the Android source, ensure your system meets the following requirements then see Establishing a Build Environment for installation instructions by operating system.

Hardware requirements

Your development workstation should meet or exceed these hardware requirements:

  • A 64-bit environment is required for Android 2.3.x (Gingerbread) and higher versions, including the master branch. You can compile older versions on 32-bit systems.
  • At least 250GB of free disk space to checkout the code and an extra 150GB to build it. If you conduct multiple builds, you will need even more space.
  • If you are running Linux in a virtual machine, you need at least 16GB of RAM/swap.

Software requirements

The Android Open Source Project (AOSP) master branch is traditionally developed and tested on Ubuntu Long Term Support (LTS) releases, but other distributions may be used. See the list below for recommended versions.

Your workstation must have the software listed below. See Establishing a Build Environment for additional required packages and the commands to install them.

These requirements apply to the AOSP master branch. For Android versions 8.0 (Oreo or O) through 5.0 (Lollipop or L), consider using the included Dockerfile to ease installation of all required packages. For the manual method, see Supporting Older Versions.

OS

If you are developing against the AOSP master branch, use one of these operating systems: Ubuntu 14.04 (Trusty) or the latest versions of Mac OS and Xcode with Command Line Tools installed.

JDK

The master branch of Android in AOSP comes with a prebuilt version of OpenJDK, so no additional installation is required.

Older versions of Android require a separate installation of the JDK. On Ubuntu, use OpenJDK. See Supporting Older Versions for precise versions and instructions.

Key packages

The AOSP master branch comes with a prebuilt version of Make, so no additional installation is required.

Device binaries

Download previews, factory images, drivers, over-the-air (OTA) updates, and other blobs below. For details, see Obtaining proprietary binaries.

Build toolchain

Android 8.0 and higher support only Clang/LLVM for building the Android platform. Join the android-llvm group to pose questions and get help. Report NDK/compiler issues at the NDK GitHub.

For the Native Development Kit (NDK) and legacy kernels, GCC 4.9 included in the AOSP master branch (under prebuilts/) may also be used.