1

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?

Vadim Kotov
8,2848 gold badges51 silver badges63 bronze badges
asked Sep 27, 2011 at 17:17
1

4 Answers 4

2

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
answered Feb 26, 2012 at 7:07
Sign up to request clarification or add additional context in comments.

Comments

2

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
Sergei Glotov
20.4k11 gold badges87 silver badges100 bronze badges
answered Apr 10, 2012 at 11:39

Comments

0

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
Vadim Kotov
8,2848 gold badges51 silver badges63 bronze badges
answered Sep 27, 2011 at 17:29

Comments

0

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
T.Rob
31.9k9 gold badges65 silver badges105 bronze badges
answered Nov 27, 2011 at 15:35

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.