Android L下載

來源:互聯網
上載者:User

標籤:android   原始碼   網路   branch   伺服器   

Android L千呼萬喚終於出來了,那麼我們先下載下來一睹為快,那麼怎麼去拿到最新的L的分支
那按照傻瓜步驟總結下(Linux Ubuntu)
1.擷取repo檔案
(1).curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
(2).chmod a+x ~/bin/repo
(3).export PATH=~/bin:$PATH


curl 是linux下面用命令發起網路請求的工具,拿到repo檔案找到位置直接加入到系統PATH中


2.利用repo擷取擷取原始碼
(1).mkdir src && cd src
(2).repo init -u https://android.googlesource.com/platform/manifest
(3).repo sync
上面代碼擷取的是master代碼


如果想單獨擷取某個分支的代碼
(1).mkdir src && cd src
(2).repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r2
(3).repo sync


如果已經有android倉庫但是還不是最新的,想切換到AndroidL分支分支
(1).cd .repo/manfiests && git branch -a | cut -d / -f 3
android-4.4.4_r2.0.1
android-4.4_r1
android-4.4_r1.0.1
android-4.4_r1.1
android-4.4_r1.1.0.1
android-4.4_r1.2
android-4.4_r1.2.0.1
android-4.4w_r1
android-5.0.0_r1
android-5.0.0_r2
(2).根據上面列表的選取android-5.0.0_r2 
repo init -b android-5.0.0_r2
(3). repo sync
(4).全部切換到android-5.0.0_r2分支
repo start android-5.0.0_r2 --all
(5). repo branches
*  android-5.0.0_r2          | in all projects
(6).cd external/jsmn && git branch
* android-5.0.0_r2


3.如何搭建本地倉庫方便周圍的人一塊使用
在從伺服器擷取代碼建立本地倉庫
(1).mkdir -p ~/aosp/mirror
(2).cd ~/aosp/mirror
(3).repo init -u https://android.googlesource.com/mirror/manifest --mirror
(4).repo sync


從本地mirror擷取代碼
(1). mkdir -p ~/aosp/master
(2). cd ~/aosp/master
(3). repo init -u /home/username/aosp/mirror/platform/manifest.git
(4). repo sync


同步本地mirror以及本地代碼倉庫
(1).cd ~/aosp/mirror
(2).repo sync
(3).cd ~/aosp/master
(4).repo sync



連絡方式:
[email protected]
QQ:390012381
轉載請註明出處:http://blog.csdn.net/lihui130135

Android L下載

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.