I want to install repo
for working with the Android source files. How to install repo
?
From https://source.android.com/source/downloading#installing-repo:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir working-directory-name
$ cd working-directory-name
$ repo init -u git://android.git.kernel.org/platform/manifest.git
Authoritative instructions
The location changed to http://commondatastorage.googleapis.com/git-repo-downloads/repo:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Repo is included in phablet-tools
package which is available from official package repository for Ubuntu releases starting from 14.04
Many distros include repo, so you might be able to install from there.
# Debian/Ubuntu.
$ sudo apt-get install repo
# Gentoo.
$ sudo emerge dev-vcs/repo
## Linux Mint
$ sudo rm /etc/apt/preferences.d/nosnap.pref
$ sudo apt update
$ sudo apt install snapd
$ sudo snap install git-repo
You can install it manually as well as it's a single script.
$ mkdir -p ~/.bin
$ PATH="${HOME}/.bin:${PATH}"
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
$ chmod a+rx ~/.bin/repo
See Official website: https://gerrit.googlesource.com/git-repo/
If you are using Ubuntu 16.04, just use this command line:
sudo apt-get install repo -y