Android源碼下載2

來源:互聯網
上載者:User

標籤:

因國內網路被牆的原因,按照Google提供的下載Android源碼的方式很難下載到,所以寫下這篇文章。

1. 下載並配置repo資訊
mkdir ~/binPATH=~/bin:$PATHgit clone git://aosp.tuna.tsinghua.edu.cn/android/git-repo.git
2. 步驟中得到的git-repo中的repo檔案拷貝到bin目錄 
cp git-repo/repo ~/bin/
3. 修改repo檔案
sudo vim ~/bin/repoREPO_URL = ‘git://aosp.tuna.tsinghua.edu.cn/android/git-repo‘

4. 準備下載Android原始碼
mkdir anroidcd androidgit config --global user.email "[email protected]"git config --global user.name "Your Name"repo init -u git://aosp.tuna.tsinghua.edu.cn/android/platform/manifest -b android-5.0.2_r1

註:查看源碼分支:http://source.android.com/source/build-numbers.html#source-code-tags-and-builds

5. 正式下載原始碼

repo sync指令碼(在源碼目錄下建立指令碼:vi down.sh):

#!/bin/sh
repo sync -j16
while [ $? -ne 0 ]
do
repo sync -j16
done

執行下載命令:sh down.sh




Android源碼下載2

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.