Android 源码环境搭建配置与问题解析(二)

1、初始化Repo

$ mkdir ~/bin $ PATH=~/bin:$PATH
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

2、初始化Repo client

      1.创建你的工作目录rom

$ mkdir rom
$ cd rom

       2.初始化Repo ,确保Url(源)可用

$ repo init -u https://android.googlesource.com/platform/manifest
可以用-b参数来指定一个分支

$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1

3、配置用户名和邮箱

$ git config --global user.email "[email protected]"

$ git config --global user.name  "xxx"

4、开始下载

$ repo sync


Google下载源码参考文档:http://source.android.com/source/downloading.html

你可能感兴趣的:(源码,android)