I downloaded Android 2.2 source code a long time ago but it didn't have the kernel source code. I looked online and it seems like there is a separate Android kernel source I should download.
Someone gave me this address
git clone https://android.googlesource.com/kernel/common
but I think I should specify the version and branch. So what is the full command to download Android 2.2 froyo kernel source code?
-
possible duplicate of How to sync just android 2.2 froyo code?eldarerathis– eldarerathis2011年09月27日 17:22:10 +00:00Commented Sep 27, 2011 at 17:22
4 Answers 4
For other kernels you could use any of these:
git clone https://android.googlesource.com/kernel/common.git
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
Comments
git clone https://android.googlesource.com/kernel/common.git is not enough !
cd common
List all the branches:
git branch -a
Checkout one of them:
git checkout android-2.6.39
Comments
Get tools:
$ sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
Get repo tool:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Get source code:
$ repo init -u https://android.googlesource.com/platform/manifest
OR
$ repo init -u https://android.googlesource.com/platform/manifest -b release-1.0
OR
$ repo init -u https://android.googlesource.com/platform/manifest -b android-sdk-1.5_r2
$ repo sync`
Sync single project:
$ repo sync {project_name}
Get common kernel:
$ git clone https://android.googlesource.com/kernel/common
Comments
To add to @Aloongs answer ->
Get the source using Git:
git checkout -b android-2.6.35 origin/android-2.6.35
where -b = branch name and start point is android-2.6.35
To list the remote branches use the following command:
git branch -r