2

I'm curious to know what changes are made to the Android Common Kernel before the final version of a device's kernel is built.

Secondly, I'd like to know if there are any devices that could run an unmodified Common Kernel.

MD Naseem Ashraf
  • 1,030
  • 2
  • 9
  • 22
Uclydde
  • 1,414
  • 3
  • 16
  • 33

2 Answers2

0

1)Any changes the OEM wants. This can range from nothing, to bug fixes, to feature additions. Years ago it was common for them to patch RTL text so it would work, but only on models that they knew were going to those regions. Modern examples would be custom support for split screen before Google added it, or folded devices, or notches

In short- this question is unanswerable. An OEM can add anything they want.

2)If you really want that, build your own. That's the only way to be sure.

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127
  • Since you said "This can range from nothing" in your first part, that implies that theoretically there is some device that could run the Common Kernel, right? What I'm ultimately trying to understand is whether the Common Kernel is a complete, working kernel, or just a foundation that absolutely requires modifications to be a working kernel. – Uclydde Mar 18 '19 at 22:01
  • Assuming you have all the drivers, yes. People make custom roms, after all. – Gabe Sechan Mar 18 '19 at 22:25
0
  1. The changes made to the Android Common Kernel before being shipped on a device are typically done by two organizations: the SoC manufacturer (most commonly Qualcomm) and the device manufacturer. The SoC manufacturer adds drivers for the SoC, and may modify the kernel in other ways to use these drivers. The device manufacturer modifies the kernel to add any additional drivers (such as for the display, touchscreen, etc.) and also to create device tree source files that specify what hardware is in the device, and how the hardware in the device is connected. Additionally, the manufacturer can modify the kernel however they want to. Typically this is done to add support for special software "features" (which certain OEMs like Samsung are known for), or to add support for new kinds of hardware - which may have been necessary for the first Android devices with things like fingerprint readers, display cutouts, or foldable screens.

  2. Yes, there are devices that can run the Android Common Kernel. The Android Common Kernel is just a fork of the mainline Linux kernel. Therefore, if a device's drivers and device tree are in mainline Linux, then the Android Common Kernel should run on it. Let's be more specific though. When it comes to Qualcomm SoCs, the Snapdragon 410, 450, 625, 630, 632, 636, 808, 810, 820, 835, 845, 850, 855, and 865 all have some amount of support in Linux kernel v5.12 (though this is not a conclusive list). This means that any Android device with one of those SoCs and a device tree in mainline Linux could theoretically boot the mainline kernel, and thus the Android Common Kernel. So, which Android devices actually have device trees in Linux 5.12? There are too many to list here, but here are a few: Google Nexus 6P, Samsung Galaxy A5, Xiaomi Poco F1, OnePlus 6T, Sony Xperia Z5. The device tree source files for these devices and their SoCs can be found in linux/arch/arm64/boot/dts/qcom/.

Uclydde
  • 1,414
  • 3
  • 16
  • 33