Downloading and Building

The Android build is routinely tested in-house on recent versions of Ubuntu LTS (12.04), but most distributions should have the required build tools available. We welcome reports of successes or failures on other distributions.

Before you download and build the Android source, ensure your system meets the following requirements:

  • A Linux or Mac system. It is also possible to build Android in a virtual machine on unsupported systems such as Windows. If you are running Linux in a virtual machine, you need at least 16GB of RAM/swap and 30GB or more of disk space in order to build the Android tree.
  • A 64-bit environment is required for Gingerbread (2.3.x) and newer versions, including the master branch. You can compile older versions on 32-bit systems.
  • 30GB of free disk space to complete a single build and up to 100GB or more for a full set of builds. The source download is approximately 8.5GB in size.

  • Python 2.6 -- 2.7, which you can download from python.org.

  • GNU Make 3.81 -- 3.82, which you can download from gnu.org,

  • JDK 7 to build the master branch of Android in the Android Open Source Project (AOSP); JDK 6 to build Gingerbread through KitKat; JDK 5 for Cupcake through Froyo. See Initializing a Build Environment for installation instructions by operating system.

  • Git 1.7 or newer. You can find it at git-scm.com.