How to download Android source code
April 28, 2012
· Admin
Android
Source code of Android can be downloaded by following these steps:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
$ repo sync
android-4.0.1_r1 can be replaced by any version displayed in the previous step. The download process will take a while.
Copyright 2012–2026, Claude "Tryphon" Théroux