http://source.android.com/source/downloading.html
1、安裝git
android的linux核心可以從http://android.git.kernel.org/下載,但下載需要使用git,windows版的git可以從http://code.google.com/p/msysgit/下載,有完整安裝版和便攜版(portable)兩個版本可供選擇,不常用git的話選portable版就可以了。
下載portable版的git後,解壓縮,然後運行git-bash,會出現一個console視窗。
2、android的kernel有多個部分,可根據需要運行以下命令下載需要的內容。
在git的console視窗中執行以下命令即可下載核心:
$ git clone https://android.googlesource.com/kernel/common.git //這個是linux核心,也可以是git clone http://android.git.kernel.org/kernel/common,網上許多地方介紹的命令是git clone git://android.git.kernel.org/kernel/common,但現在似乎是不能用了。
$ git clone https://android.googlesource.com/kernel/goldfish.git
$ git clone https://android.googlesource.com/kernel/msm.git
$ git clone https://android.googlesource.com/kernel/omap.git
#git clone https://android.googlesource.com/kernel/samsung.git
$ git clone https://android.googlesource.com/kernel/tegra.git
3、checkout出對應的核心
進入samsung目錄
$git branch -a //列出所有可用的核心版本
$git checkout remotes/origin/android-samsung-3.0-ics-mr1 //checkout出想要使用的核心
如果要下載所有的android源檔案,下載方法見http://source.android.com/source/downloading.html