Ubuntu下载android 源码

来源:互联网 发布:网络交友的危害英语 编辑:程序博客网 时间:2024/05/06 12:40

Ctrl + Alt + T 开启终端

安装git

sudo apt-get install git
安装curl
sudo apt-get install curl

curl https://android.git.kernel.org/repo > ~/bin/repo 

更改为:

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

chmod a+x ~/bin/repo 
PATH=~/bin:$PATH  
cd myfolder
repo  init  -u  git://codeaurora.org/platform/manifest.git -b gingerbread
repo sync  
//下載制定的源碼
 repo init -u git://android.git.linaro.org/platform/manifest.git -bandroid-2.3.4_r1

repo sync 過程中出現各種斷網的問題。

通過執行sh 腳本文件來實現重復sync 操作,

在代碼目錄,新建xxx.sh ,鍵入下列代碼段。然後 sh xxx.sh 。到此,只有等待。



    #!/bin/bash             echo ¨================start repo sync===============¨             repo sync -f -j10             while [ $? == 1 ]; do       echo ¨================sync failed, re-sync again=============¨       sleep 3       repo sync -f -j10       done  

另付其他博客方法,如果我的方法還不行,我就試試。還有我發現早上的時候,榖歌屏蔽的不算厲害。可以打開,因此一大早可以sync可以提高成功率。


終于下載完成了,但是卻出現下列的錯誤

 Syncing work tree:  29% (60/204)  error: revision gingerbread in platform/external/grub not found

再次重新sync 下。


0 0
原创粉丝点击