The kernel in Android

Rasmus Nørgaard
Masters on Mobile
Published in
2 min readFeb 26, 2015

As a continuation of my introduction to the Android layered architecture below I touch upon some of the functionality the kernel provides to the AOSP (Android Open Source Project) also know as the Android platform, which sits atop the kernel. These first chapters will be short as they are really not the focus of my project, but rather an introduction to the reader.

The Linux kernel is the bottom layer of the Android stack, and its main purposes, is to provide hardware access through its driver modules. Not unlike Fedora, and Ubuntu the Linux kernel used in Android is a special forked version of Linux. It is however even more specialized than most forks off of the mainline Linux kernel with optimizations such as wakelocks for power management and optimized memory management features. These are needed for embedded devices such as smartphones which hold limited memory and power. Smartphones may have grown a lot more powerful in recent years but as battery technology has been unable to keep up with processor speed, powermanagement still remains a considerable issue.

Apart from providing access to various hardware drivers such as Bluetooth and GPS, the kernel also provide the upper system layers with access to the Binder driver, which is a kernel module that facilitates communication between processes. Binder is an IPC (inter-process communication) framework, which facilitates communication between processes and without which Android would basically fall apart. Because of the sand-boxed nature of Android, once two components are authenticated and allowed to communicate, messages are marshalled and sent through the kernel, to then be unmarshalled and “read” by the receiving process. We’ll return to the Binder at a later point, and also introduce the AIDL (Android Interface Definition language) which defines how we communicate to the Binder through the native libraries in the libraries layer.

--

--