Repo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see Version Control.
To install, initialize, and configure Repo, follow these steps:
Make sure you have a bin directory in your home directory, and that it is included in your path:
$ mkdir ~/bin $ PATH=~/bin:$PATH
Download the Repo script and ensure it is executable:
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo $ chmod a+x ~/bin/repo
After installing Repo, set up your client to access the android source repository, create an empty directory to hold your working files. Give it any name you like, for example SuperOSR
$ mkdir -p $HOME/src/SuperOSR $ cd $HOME/src/SuperOSR
Run repo init to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest, which specifies where the various repositories included in the Android source will be placed within your working directory.
$ repo init -u git://github.com/SuperJB/android -b jellybean
When prompted, please configure Repo with your real name and email address.
A successful initialization will end with a message stating that Repo is initialized in your working directory. Your client directory should now contain a .repo directory where files such as the manifest will be kept.
To pull down files to your working directory from the repositories as specified in the default manifest, run
$ repo sync
The Android source files will be located in your working directory under their project names. The initial sync operation will take an hour or more to complete. For more about repo sync and other Repo commands, see Version Control.
Guideline created by AOSP project, to see the original please, visit Downloading the Source Tree