最近需要下载android4.0源码,但是根据android官网上的方式,在下载repo工具的时候连接超时(好像是被河蟹了)。所以只能另寻他法。
- curl http://git-repo.googlecode.com/files/repo-1.13 > ~/bin/repo
- chmod a+x ~/bin/repo
- PATH=~/bin:$PATH
- mkdir WORKING_DIRECTORY
- cd WORKING_DIRECTORY
- repo init -u git://codeaurora.org/platform/manifest.git
- repo sync
- repo init -u git://codeaurora.org/platform/manifest.git -b android-4.0.4_r2.1 (可选)
- repo sync(可选)
在进行第8步的时候会出现一个error:revision android-4.0.4_r2.1 in manifests not found
错误原因是远程代码库不包含 android-4.0.4_r2.1分支,所以可以使用下面命令来下载
repo init -u git://codeaurora.org/platform/manifest.git -b refs/tags/android-4.0.4_r2.1