Google plans to take Android back to ‘mainline’ Linux kernel
Credit to Author: John E Dunn| Date: Fri, 22 Nov 2019 13:59:36 +0000
Better late than never, momentum seems to be building inside Google to radically overhaul Android’s tortured relationship with its precious Linux-based kernel.
It’s a big job and has been a long time coming, arguably since the mobile operating system was unveiled in 2007.
The company hasn’t made any firm announcements on this but journalists this week noticed a low-key video posted to YouTube of a presentation given by Android Kernel Team chief Sandeep Patil, at September’s Linux Plumbers Conference.
The problem? The development model that underpins how Android uses the Linux kernel leads to a lot of complexity that slows updates, raises costs, and makes life difficult for both Google and the device makers downstream in all sorts of ways.
Today, the Linux kernel used by an Android device can be slightly different for every maker, model and at different moments in time.
Device makers start with the LTS (Long Term Support) kernel, before ‘out of tree’ Android common kernel customisations are added. According to Patil, there are a lot of these – as of February 2018, it was adding 355 changes, 32,266 insertions, and 1,546 deletions on top of LTS 4.14.0, and even that is said to be an improvement over the past.
Then major system on chip (SoC) companies such as Qualcomm add numerous hardware customisations before, finally, manufacturers add even more vendor and device-specific software.
These layers of customisation require that each device use a single Linux kernel as its starting point, which has knock-on effects for all the subsequent modifications. Over time, that can lead to Google and device makers supporting several forks of Linux at the same time across numerous devices.
It’s one reason why Android devices have a defined shelf life but it also makes it much more time-consuming to apply security patches.
The new Android
Google’s alternative seems to be to get the mainstream Linux kernel to do as much of the heavy lifting as possible, reducing or even removing the need for the Android kernel modifications.
Essentially, this would take Android back into the Linux kernel fold it once seemed happy to abandon in search of improvements that turned out to come at a price.
In this new and improved world, each generation of devices would then use the same kernel supplied by Google with their own modifications turned into modules applied on top.
That regularises the way the kernel and the manufacturer code relate to one another, with the kernel now the defining component.
It makes for a superb diagram – one kernel and lots of modules on top of this. It also chimes perfectly with Google’s largely successful 2018 Project Treble API initiative to speed up device patching.
Can it really be that easy to fix more than a decade of slow software rot?
Reportedly, Tom Gall of the director of the Linaro Consumer Group showed off a Xiaomi smartphone running Android on top of the mainline Linux kernel, which shows that the goal is achievable in principle.
Doing the same for the forest of other Android devices will take a lot longer. If this is a fix, it isn’t a quick one.
There might be another problem – a completely new operating system that Google is said to be working on, called Project Fuchsia – which it’s claimed could replace Android and possibly the Chrome OS.
This wouldn’t just integrate the development layers of Android but would work across multiple devices, including desktop computers.
At worst, this implies that Android’s days are numbered. Or perhaps they aren’t, and Google is just toying with us while stoking some competition within its development teams.
For sure, Android won’t go away quickly. There’s too much invested in it right now and it does a decent job despite all the pitfalls. If Google devs have their way, it won’t go away quietly either.