codereviewanskquestions codereviewanskquestions - 3 years ago 127
Android Question

Android kernel source code

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?

Answer Source

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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download