Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 4.0 kernel source code? [closed]

Where can I get the Android 4.0 (Ice Cream Sandwich) kernel source code?

While this might be a stupid question that some people have asked before, I can't seem to find a suitable answer anywhere because:

  • Google decided to be really useful and redirect android.kernel.org to http://source.android.com/source/downloading.html, which includes every single part of Android apart from the kernel. I do not understand the logic behind that.

  • git clone https://android.googlesource.com/kernel/common.git does something weird and creates a massive (600 MB+) .git folder without creating the source tree. I don't give two shits about the git repo, I just need the source tree.

  • All the kernel forks on GitHub are horribly outdated.

like image 792
Kristina Brooks Avatar asked Dec 09 '11 15:12

Kristina Brooks


People also ask

How can I open source code in Android?

Importing into Android StudioOpen Android Studio and select Open an Existing Android Studio Project or File, Open. Locate the folder you downloaded from Dropsource and unzipped, choosing the “build. gradle” file in the root directory. Android Studio will import the project.

Does Android still use Linux kernel?

The Android kernel is based on an upstream Linux Long Term Supported (LTS) kernel. At Google, LTS kernels are combined with Android-specific patches to form what are known as Android Common Kernels (ACKs).

What is GKI Android?

A Generic Kernel Image (GKI) has a unique identifier called the kernel release. The kernel release consists of the kernel module interface (KMI) version and the sub-level. The kernel release is specific to the image being released, whereas the KMI version represents the interface that a release is built from.

What is GKI image?

The GKI kernel is a single-kernel binary plus associated loadable modules per architecture, per LTS release (currently only arm64 for android11-5.4 and android12-5.4 ). The GKI kernel is tested with all Android Platform releases that are supported for the associated ACK.


2 Answers

In his Nov 30, 2011 post, Jean-Baptiste Queru explains why the kernel source is invisible after cloning. This post describes the kernel source branches that exist for the various hardware flavors of ICS.

And in general, here's how to make a specific branch visible:

git clone https://android.googlesource.com/kernel/common.git # clone the repo
git branch -a # lists branches, both local and remote
git checkout -b android-3.0 remotes/origin/android-3.0 # create local branch
# android-3.0 that tracks the named remote branch
like image 111
JohnnyLambada Avatar answered Sep 24 '22 06:09

JohnnyLambada


Watch the android source code hosted on Github.

like image 33
Suresh Avatar answered Sep 26 '22 06:09

Suresh