How to install Android's repo on my Ubuntu system?

后端 未结 5 1130
被撕碎了的回忆
被撕碎了的回忆 2020-12-30 07:56

I want to install repo for working with the Android source files. How to install repo?

相关标签:
5条回答
  • 2020-12-30 08:14

    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

    0 讨论(0)
  • 2020-12-30 08:16

    The location changed to http://commondatastorage.googleapis.com/git-repo-downloads/repo:

    curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    
    0 讨论(0)
  • 2020-12-30 08:27

    Repo is included in phablet-tools package which is available from official package repository for Ubuntu releases starting from 14.04

    0 讨论(0)
  • 2020-12-30 08:27

    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/

    0 讨论(0)
  • 2020-12-30 08:29

    If you are using Ubuntu 16.04, just use this command line:

    sudo apt-get install repo -y

    0 讨论(0)
提交回复
热议问题