Android源码下载同步指导

来源:互联网 发布:windows平板刷机 编辑:程序博客网 时间:2024/05/04 04:51

Step 1. 安装Curl命令,从网页服务器上下载相关资源。

         Curl是利用URL语法在命令行方式下工作的文件传输工具,支持很多协议,如HTTP、FTP、TELNET等。在PHP等语言开发的实例中经常使用的到。那么在Lamp服务器上如何安装呢?

以Ubuntu为例,只需一条命令即可:

        1. sudo apt-get install curl libcurl3 libcurl3-devphp5-curl

     2.重启或者log out再login

step2. 安装repo命令

repo是基于git基础开发,便于git资源管理的一个工具,所以在安装repo之前我们先要安装git

sudo apt-get installgit gitcore

curl http://commondatastorage.googleapis.com/git-repo-downloads/repo>~/bin/repo

可能repo命令执行不正确,然后执行下面语句

curl http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo"> ~/bin/repo

chmod a+x ~/bin/repo

操作完成后,执行:

repo init -ugit://codeaurora.org/platform/manifest.git -b release -m LA.BR.1.2.3-10210-8x09.0.xml --repo-url=git://codeaurora.org/tools/repo.git--repo-branch=caf-stable

参数解析:

$ repo init -u git://codeaurora.org/platform/manifest.git -b [branch] -m [manifest] --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable
$ repo sync

-b 参数选择可以根据https://www.codeaurora.org/xwiki/bin/QAEP/列表去选择临时版本还是release版本。

-m 参数选择可以根据https://www.codeaurora.org/xwiki/bin/QAEP/release列表去选择相应的Android版本。

参数:–repo-url=URL
repo 工具本身的 git 库地址。缺省为:git://android.git.kernel.org/tools/repo.git

参数:–repo-branch=REVISION
使用 repo 的版本库,即 repo git 库的分支或者里程碑名称。缺省为caf-stable

Step 3. repo sync开始下载代码

Your Name  [root]:输入你的name

Your Email:输入你的email

看到类似下面的信息式,代表下载完成.

Fetching projects:100% (162/162), done.

...

Checking out files:100% (641/641), done.g out files:  17%(111/641) 

...

Syncing work tree:100% (449/449), done.

0 0