close

Android 原始碼下載方法

 

因為Android是由kernelDalvikBionicprebuiltbuild等多個Git項目組成,所以Android項目編寫了一個名為RepoPythonscript來統一管理這些專案的倉庫,使得Git的使用更加簡單。而GitLinux Torvalds為了幫助管理Linux內核開發而開發的一個開放源碼的分散式版本控制軟體.

 

一.  準備

Linux 環境須先安裝幾個必要的套件,我上在 Ubuntu CENTOS 兩個平台實測過,將過程記錄如下:

   1. curl 安裝

(1)   Ubuntu : apt-get install curl

(2)   CENTOS : yum install curl

   2. git 安裝

(1)   Ubuntu : apt-get install git

(2)   CENTOS :因為 yum install git 會找不到套件,所以我去官網自行 download compile,理論上這個方法應該是通用的

wget http://www.kernel.org/pub/software/scm/git/git-1.7.6.1.tar.bz2

tar -jxvf git-1.7.6.1.tar.bz2

cd git-1.7.6.1

./configure

make

make install

   3. repo 安裝

cd ~

mkdir –p android_dev/bin

cd  android_dev

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

chmod a+rx bin/repo

 

 

二.  下載原始碼

cd  ~/android_dev

./bin/repo init -u git://android.git.kernel.org/platform/manifest.git –b fyoyo

 

說明 : -b 後面的參數是版本代號,以下為各版本有趣的代號,都是由甜點名稱而來!如果不接這個參數預設是全部的檔案,但建議指定某個版號下載,否則檔案下載會很久的,因為太大了!執行的過程也會提示輸入帳號及mail 這只是一個 log 記錄,不需驗證隨便你輸入!

1.5 :Cupcake紙杯蛋糕 ,09年4月。

   1.6 :Donut甜甜圈,09年9月

   2.0/2.1:Eclair 法式奶油夾心甜點,09年10月,這一版本的瀏覽器支援了HTML 5,介面也有所更新。

                   也因為Nexus One 的出世而聞名。

    2.2:Froyo即是 Frozen Yogurt(霜凍優格)的縮寫,

2.3:Gingerbread (薑餅)

3.0:Honeycomb (蜂窩)

 

./bin/repo sync #開始下載

如此會下載15個目錄約4.5GB檔案,看到檔案後就完工了!

arrow
arrow
    文章標籤
    android source repo git
    全站熱搜

    Jason0615 發表在 痞客邦 留言(0) 人氣()