您的位置:首页 > 移动开发 > Android开发

目前还可以使用的android 源码下载

2014-11-20 16:38 295 查看


1. 安装curl


2. git工具的安装

上面两步有各种方式。可能大部分人电脑本身就已经有了


3. repo工具的下载

curl http://git-repo.googlecode.com/files/repo-1.12 > ~/bin/repo
chmod a+x ~/bin/repo


在上面中如果不能够curl,在/etc/hosts 中加入下面一句
203.208.46.146 git-repo.googlecode.com



4. repo init创建仓库

$ mkdir work_dirctory
$ cd ./work_dirctory
$ ~/bin/repo init -u https://android.googlesource.com/platform/manifest


如果要获取每个tag,譬如android-4.4.4_r2.0.1,则可以执行:
$ ~/bin/repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.4_r2.0.1



如果不知道具体tag可以在这个网址上查看 https://android.googlesource.com/platform/manifest/+refs。这个是通过镜像去下载android源码的


5. repo sync 下载

$ ~/bin/repo sync


之后就是等待下载,出现连接中断什么的,重新上面的命令,也可以参考网上有人写过的脚本,连接中断后,自动重新sync
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android 源码