Google Plans A Single Linux Kernel For All Android Devices


The Android platform is built on the Linux kernel but the kernel that runs on your Android device is very different from the LTS version Google picks up as.

It has to go through three stages of modifications from Google, the chip makers, and the device makers before ending up as the Device Kernel on a smartphone. In fact, in February 2018, the LTS kernel sent to OEMs has over 32,000 insertions and over 1,500 deletions.

LTS Kernel forked by Google for Android common kernel

This, in turn, leaves every device with a different kernel and a kernel designed for one device won’t work on another. The entire process of creating different forks and dealing with millions of lines of code slows down the development.

Upstream the Linux kernel

Now, Google is making efforts to narrow the gap between the mainline kernel and kernels used in multiple Android devices.

During the Linux Plumbers Conference, Google talked about the company’s efforts to upstream all the Android modifications into the mainline kernel. This would not only save Google a lot of time and effort, but also it will radically boost the speed of Android updates.

To show the current progress, Tom Gall, the director of the Linaro Consumer Group showed off a Poco F1 running Android 10 based on the mainline Linux kernel.

According to AndroidPolice, some of the phone features were non-functional, implying that a lot of work needs to be done before it becomes a reality.

“There are major, major props to be given to the Google Kernel Team in particular for getting their code upstream so that we can boot devices with a mainline kernel,” Gall told the audience.

Using Project Treble-like working

Project Treble inspired stable ABI for Android Kernels

Google is trying to replicate the working of Project Treble in order to bring Android closer to the mainline Linux kernel.

For those who don’t know, Project Treble is responsible for creating a stable interface between Android and the HAL (Hardware Abstraction Layer).

With the latest project, Google plans on stabilizing Linux’s in-kernel ABI, thus making it easy for hardware vendors to insert code. This would ultimately eliminate the need for having device-specific kernels.

In simple words, the extra device-specific drivers previously added to the kernel itself will be available as attachable kernel modules.

Theoretically, Google would be able to provide kernel updates to devices as well. This is one thing that sounds almost impossible right now, given the technical barriers and diversity of the Android ecosystem. For instance, the recently released Pixel 4 runs Linux kernel 4.14 that was released in November 2017.

Anyway, bringing Android Linux kernel to the mainline Linux Kernal would certainly benefit everyone – Android users, smartphone manufacturers, and the Linux community. However, it’s still a long shot and Google is yet to set a timeline for the project and a title as well.

Also Read: How To Get Android Q Features On Your Old Smartphone Right Now?
Charanjeet Singh

Charanjeet Singh

Charanjeet owns an iPhone but his love for Android customization lives on. If you ever ask him to choose between an iPhone, Pixel or Xiaomi; better if you don't.
More From Fossbytes

Latest On Fossbytes

Find your dream job