Language Selection

English French German Italian Portuguese Spanish

Google outlines plans for mainline Linux kernel support in Android

Filed under
Android
Linux
Google

This is an extremely long journey that results in every device shipping millions of lines of out-of-tree kernel code. Every shipping device kernel is different and device specific—basically no device kernel from one phone will work on another phone. The mainline kernel version for a device is locked in at the beginning of an SoC's initial development, so it's typical for a brand-new device to ship with a Linux kernel that is two years old. Even Google's latest and, uh, greatest device, the Pixel 4, shipped in October 2019 with Linux kernel 4.14, an LTS release from November 2017. It will be stuck on kernel 4.14 forever, too. Android devices do not get kernel updates, probably thanks to the incredible amount of work needed to produce just a single device kernel, and the chain of companies that would need to cooperate to do it. Thanks to kernel updates never happening, this means every new release of Android usually has to support the last three years of LTS kernel releases (the minimum for Android 10 is 4.9, a 2016 release). Google's commitments to support older versions of Android with security patches means the company is still supporting kernel 3.18, which is five years old now. Google's band-aid solution for this so far has been to team up with the Linux community and support mainline Linux LTS releases for longer, and they're now up to six years of support.

Last year, at Linux Plumbers Conference 2018, Google announced its initial investigation into bringing the Android kernel closer to mainline Linux. This year it shared a bit more detail on its progress so far, but it's definitely still a work in progress. "Today, we don't know what it takes to be added to the kernel to run on a [specific] Android device," Android Kernel Team lead Sandeep Patil told the group at LPC 2019. "We know what it takes to run Android but not necessarily on any given hardware. So our goal is to basically find all of that out, then upstream it and try to be as close to mainline as possible."

Read more

Google wants to unfork Android back to the Linux kernel

  • Google wants to unfork Android back to the Linux kernel

    GOOGLE HAS SAID it wants to bring Android into line with the main Linux kernel.

    Although Android already works on a Linux kernel, it's been so heavily modified over the years, it's almost unrecognisable, and certainly no longer compatible with the main Linux operating system.

    Now, however, Google has expressed its desire to right that wrong and bring Android back into line with the regular fork of Linux.

    The advantages are manifest. For a start, it would save thousands of hours of work to maintain a separate fork for years at a time.

Google Wants to Bring Android Closer to the Mainline LinuxKernel

  • Google Wants to Bring Android Closer to the Mainline Linux Kernel

    This noble goal, reported by Android Police, was expanded on by Google engineers speaking at the Linux Plumbers Conference 2019.

    Though Android is built on top of a Linux kernel, it’s not built atop the same Linux kernel that most desktop Linux distributions use.

    Instead, it uses something called the Android common kernel. This is heavily modified LTS version that incorporates a bunch of “out of tree” code from chip makers, hardware partners, and Google itself, as well as firmware drivers, quirk workarounds, and other miscellaneous patches.

    Repeat the process for every Android phone out there and you can an idea of how divergent things currently are.

Google wants Android to use regular Linux kernel

  • Google wants Android to use regular Linux kernel, potentially improving updates and security

    Android is built on top of the Linux kernel, but it has always used a heavily-modified version with changes from OEMs, chip manufacturers like Qualcomm and MediaTek, and Google. There have been efforts over the years to close the gap between the two kernels, but now Google is getting more serious about it.

    At this year's Linux Plumbers Conference, Google engineers held talks about the company's efforts to get Android as close as possible to the mainline Linux kernel. Not only would this reduce technical overhead for Google and other companies, because they would no longer have to merge thousands of changes into each new Linux kernel version (and Google would no longer have to support Linux kernel versions for six years), but it could also benefit the Linux project as a whole. For example, the growing number of ARM-based Linux phones and computers could see improved performance and battery life.

  • Google Wants Android To Use Regular Linux Kernel

    Android is built on top of the Linux kernel, but it has always used a heavily-modified version with changes from OEMs, chip manufacturers like Qualcomm and MediaTek, and Google. There have been efforts over the years to close the gap between the two kernels, but now Google is getting more serious about it.

Google Plans A Single Linux Kernel For All Android Devices

  • 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.

Google wants to use the Linux kernel

  • Google wants to use the Linux kernel

    Google has been talking about getting Android as close as possible to the mainline Linux kernel.

    Android is built on top of the Linux kernel, but it has always used a heavily-modified version with changes from OEMs, chip manufacturers like Qualcomm and MediaTek, and Google. There have been efforts over the years to close the gap between the two kernels, but now Google is getting more serious about it.

    At this year's Linux Plumbers Conference, Google engineers held talks about the company's efforts to get Android as close as possible to the mainline Linux kernel.

    The big idea is to reduce technical overhead for Google and other companies because they would no longer have to merge thousands of changes into each new Linux kernel version and Google would no longer have to support Linux kernel versions for six years.

Android will never be supported by the 'regular' Linux kernel...

  • Android will never be supported by the 'regular' Linux kernel, but that won't stop Google from trying

    Google once again had a major presence at the yearly gathering of top Linux developers known as the Linux Plumbers Conference. This is where all the smart people who work hard to make the framework that most of the world's computers run on gather so they can iron out all the problems that any project this big is bound to have.

    Since Android is by far the most popular operating system that runs atop of Linux, having it be more "standard" and comparable to the rest is really important. Regrettably, it's not even close because of the way vendors support components and manufacturers put them all together.

    Much has been done and Google has some plans to make things even better. Ron Amadeo at Ars Technica has done a great job at trying to make sense of it all in a way everyone can understand, so if reading about forking, how to prevent it, and user-space application binary interfaces are your thing it's a definite read. Even if they aren't your thing, you might learn something by giving it a look.

Google plans to take Android back to ‘mainline’ Linux kernel

  • Google plans to take Android back to ‘mainline’ Linux kernel

    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.

A unified kernel won’t necessarily solve Android fragmentation

  • A unified kernel won’t necessarily solve Android fragmentation

    Android fragmentation is a constant issue for the world’s most popular operating system. While high-end consumers are treated to a fresh Android version each year, another version comes along before it can even hit the top spot for market share. In the more affordable tiers, it’s still all too common to be a year out of date, along with infrequent updates and missing security patches.

    Google has put plenty of effort into addressing the issue over the years, although it’s doubtful that Android fragmentation can ever be truly solved. Project Treble paid dividends for the adoption of Android Pie. Pie was running on many more devices in its first year than its predecessors. We’re hopefully looking at even quicker adoption of Android 10, given that a number of manufacturers were quick to offer beta programs.

Google to Add Mainline Linux Kernel Support to Android

  • Google to Add Mainline Linux Kernel Support to Android

    Before it reaches you, the Linux kernel on your cellphone goes through three major steps.

    First, Google takes the LTS (Long Term Support) version of the Linux kernel and adds all of the Android-specific code. This becomes the “Android Common kernel”.

    Google then sends this code to the company that creates the System on a Chip (SoC) that runs your phone. This is usually Qualcomm.

    Once the SoC maker finishes add code to support the CPU and other chips, the kernel is then passed on to the actual device maker, such as Samsung or Motorola. The device maker then adds code to support the rest of the phone, such as the display and camera.

    Each of these steps takes a while to complete and results in a kernel that won’t work with any other device. It also means that the kernel is very old, usually about two years old. For example, the Google Pixel 4, which shipped last month, has a kernel from November 2017, which will never get updated.

    Google has pledged to create security patches for older devices, which means they’re stuck keeping an eye on a huge hodge-podge of old code.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

More in Tux Machines

today's howtos

Events: KVM Forum 2019 and "Bar Charts for Diversity"

  • A recap of KVM Forum 2019

    The 13th KVM Forum virtualization conference took place in Lyon, France in October 2019. One might think that development may have finished on the Kernel Virtual Machine (KVM) module that was merged in Linux 2.6.20 in 2007, but this year's conference underscored the amount of work still being done, particularly on side-channel attack mitigation, I/O device assignment with VFIO and mdev, footprint reduction with micro virtual machines (VMs), and with the ability to run VMs nested within VMs. Many talks also involved the virtual machine monitor (VMM) user-space programs that use the KVM kernel module—of which QEMU is the most widely used.

  • Enhancing KVM for guest protection and security

    A key tenet in KVM is to reuse as much Linux infrastructure as possible and focus specifically on processor virtualization. Back in 2007, this meant a smaller code base and less friction with the other kernel subsystems, especially when compared with other virtualization technologies such as Xen. This led to KVM being merged into the mainline with relative ease. But now, in the era of microarchitectural vulnerabilities, the priorities have shifted, and the KVM's reliance on other kernel subsystems can be a liability. For one thing, the host kernel widens the TCB (Trusted Computing Base) and makes for a larger attack surface. In addition, kernel data structures such as the direct memory map give Linux access to guest memory even when it is not strictly necessary and make it impossible to fully enforce the principle of least privilege. In his talk "Enhancing KVM for Guest Protection and Security" (slides [PDF]) presented at KVM Forum 2019, long-time KVM contributor Jun Nakajima explained this risk and suggested some strategies to mitigate it.

  • Bar charts for diversity

    At the Linux App Summit I gave an unconference talk titles Hey guys, this conference is for everyone. The “hey guys” part refers to excluding people from a talk or making them feel uncomfortable – you can do this unintentionally, and the take-away of the talk was that you, (yes, you) can be better. I illustrated this mostly with conversational distance, a favorite topic of mine that I can demonstrate easily on stage. There’s a lot of diversity in how far people stand away from strangers, while explaining something they care about. The talk wasn’t recorded, but I’ve put the slides up. Another side of diversity can be dealt with by statistics. Since I’m a mathematician, I have a big jar of peanuts and raisins in the kitchen. Late at night I head down to the kitchen and grab ten items from the jar. Darn, all of them are raisins. What are the odds!? Well, a lot depends on whether there are any peanuts in the jar at all; what percentage is peanuts; whether I’m actually picking things randomly or not. There’s a convenient tool that Katarina Behrens pointed me to, which can help figure this out. Even if there’s only a tiny fraction of peanuts in the jar, there’s an appreciable chance of getting one (e.g. change the percentage on that page to 5% and you’ll see).

Linux on the MAG1 8.9 inch mini-laptop (Ubuntu and Fedora)

The Magic Ben MAG1 mini-laptop is a 1.5 pound notebook computer that measures about 8.2″ x 5.8″ x 0.7″ and which features an 8.9 inch touchscreen display and an Intel Core m3-8100Y processor. As I noted in my MAG1 review, the little computer also has one of the best keyboards I’ve used on a laptop this small and a tiny, but responsive trackpad below the backlit keyboard. Available from GeekBuying for $630 and up, the MAG1 ships with Windows 10, but it’s also one of the most Linux-friendly mini-laptops I’ve tested to date. [...] I did not install either operating system to local storage, so I cannot comment on sleep, battery life, fingerprint authentication, or other features that you’d only be able to truly test by fully installing Ubuntu, Fedora, or another GNU/Linux-based operating system. But running from a liveUSB is a good way to kick the tires and see if there are any obvious pain points before installing an operating system, and for the most part the two operating systems I tested look good to go. Booting from a flash drive is also pretty easy. Once you’ve prepared a bootable drive using Rufus, UNetbootin, or a similar tool, just plug it into the computer’s USB port, hit the Esc key during startup to bring up the UEFI/SETUP utility. Read more Also: Top 10 technical skills that will get you hired in 2020

Android Leftovers