用git下载android源码

  电脑连续开了三天,终于下载完。说下我的过程。

1.新建一个文件夹用来放源码,准备足够的空间,我下载完后10G多一点

2.下载git

3.前往http://android.git.kernel.org/

4.(打开http://android.git.kernel.org/对照着看)要一次性下载的话,我是这样做的,把那些路径(就是"project"下面的)全都复制下来放到一个文本里(我把DescriptionOwnerLast Change都复制下来了,可以都放在文本里,然后应该可以用正则表达式删掉,不过我没想出来这个正则表达式怎么写),然后在每行前面都加上git clone git://android.git.kernel.org/,就成了下面这样

  git clone git://android.git.kernel.org/device/common.git

  git clone git://android.git.kernel.org/device/google/accessory/arduino.git

  git clone git://android.git.kernel.org/device/google/accessory/demokit.git

  git clone git://android.git.kernel.org/device/htc/common.gitgit clone

  。。。。。

  。。。。。

5.打开git,配置一下先(看6),用命令cd进入存放android的文件夹目录,复制文本里的全部路径,粘贴到git里,就会自动下载了,等待。。。

6.我下载过程中遇到下面这样警告

  warning: Your console font probably doesn't support Unicode. If you experience strange characters in the output, consider switching to a TrueType font such as Lucida Console!

应该是字符不对,所以在粘贴之前先修改一下字符,用这个命令:$ git config --global core.autocrlf true,完了就可以下载成功

7.我下载完后,源码的大小:

  大小:10.2 GB (11,041,115,838 字节)

  占用空间:11.4 GB (12,247,085,056 字节)

posted @ 2011-05-31 13:38  thinkYeah  阅读(5290)  评论(0编辑  收藏  举报