The repo tool is a source code configuration management tool used by the Android project. The repo tool is a front end to git written in Python. It uses a manifest file to help download code organized as a set of projects that are stored in different git repositories.
To install repo, do the following:
- Create a ~/bin directory in your home directory, or, if you have root or pseudo access, install for all system users under a common location, such as /usr/local/bin or somewhere under /opt.
- Download the repo script.
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
- Set the repo script attributes to executable.
$ chmod a+x ~/bin/repo
- Include the installed directory location for repo in your PATH.
$ export PATH=~/bin:$PATH
- Run repo –help to verify the installation.
$ repo –help
You should see a message similar to the following:
usage: repo COMMAND [ARGS]
repo is not yet installed. Use “repo init” to install it here.
The most commonly used repo commands are as follows:
init -> Install repo in the current working directory
help -> Display detailed help on a command
NOTE: For access to the full online help, install repo (repo init).