SDK 6.0.1r31 (GNU/Linux, Windows)

Recreate matching build environment

The current reference build environment for this version is Ubuntu 14.04.

Source code was pushed between 2015-10-05 (manifest commit) and 2015-10-08 (starting this page).

Build dependencies

# http://source.android.com/source/initializing.html + fixes
dpkg --add-architecture i386
apt-get update
apt-get -y install openjdk-7-jdk
apt-get -y install bison git gperf libxml2-utils make python-networkx zip unzip
apt-get -y install g++-multilib lib32ncurses5 zlib1g-dev:i386

# Windows dependencies
# https://sites.google.com/a/android.com/tools/build  2015-07-23
apt-get -y install mingw32 tofrodos

Prepare source tree

Install repo:

sudo apt-get install curl ca-certificates git python
mkdir ~/bin/
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

# avoid prompts
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global color.ui true

Checkout the source:

mkdir ~/wd/
cd ~/wd/
~/bin/repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r31
time ~/bin/repo sync
# 1h30 with fiber connection
# 44GB (inc. 28GB .repo, from scratch)

Build the SDK

# Optional: reserve 10GB for ccache if you're investigating how to build or patching something
# Cf. https://source.android.com/source/initializing.html#ccache
export USE_CCACHE=1
prebuilts/misc/linux-x86/ccache/ccache -M 10G

. build/envsetup.sh
lunch sdk-eng
time make sdk -j$(nproc) showcommands
# 80GB (inc. 25GB .repo), 7.5GB cache size, 8GB RAM direly needed during the 'docdroid' phase
# => out/host/linux-x86/sdk/sdk/android-sdk_eng.android_linux-x86.zip
# rebuilt in N/Amn using N/AGB ccache

time make win_sdk -j$(nproc)
# 95GB (inc. 28B .repo), ccache untouched
# => out/host/windows/sdk/sdk/android-sdk_eng.android_windows.zip

TODO

Rebuild the prebuilts/ sub-directories.

Error messages and resolutions

No new errors, see SDK 6.0.0.

Notes

Build result recap

  • Tools/
    • [missing] Android SDK Tools
    • Android SDK Platform-tools 23 (update available r23.1??)
    • Android SDK Build-tools 23.0.2
  • Android 6.0.1 (API 23)/
    • Documentation for Android SDK 23r1
    • SDK Platform 23r1 (update available r23r2??)
    • Samples for SDK 23r3
    • ARM EABI v7a System Image 23r4
  • Extras/
    • [missing] Android Support Repository 22
    • Android Support Library 23.0.1 (update available r23.1.1??)

ccache usage

N/A

build time

Using i7-4500U (2x1.80GHz + HT), SSD disk:

  • make sdk: 03h25mn
  • make win_sdk: 0h50mn

Automated build recipe

https://gitlab.com/android-rebuilds/auto/tree/master/sdk-6.0.1