Google will focus on developing innovations for Android primarily in the Linux kernel.

At the recent Linux Plumbers Conference 2021, Google discussed the achievements of its initiative to transition the Android platform to using a standard Linux kernel instead of its own kernel variant, which includes Android-specific modifications.

The most significant change in development was the decision to adopt the 'Upstream First' model after 2023, which implies that all new kernel features needed for the Android platform will be developed directly in the main Linux kernel, rather than in separate branches (functionality will first be promoted to the main kernel and then utilized in Android, rather than the other way around). In 2023 and 2024, it is also planned to merge all additional patches that remain in the Android Common Kernel branch into the main kernel.

As for the near future, for the anticipated Android 12 platform expected in early October, kernel builds known as 'Generic Kernel Image' (GKI) will be offered, closely aligned with the standard kernel 5.10. These builds will receive regular updates, which will be posted in the ci.android.com repository. In the GKI kernel, Android-specific enhancements, as well as hardware support handlers from OEM manufacturers, have been modularized separately. These modules are not tied to the main kernel version and can develop independently, significantly simplifying maintenance and the transition of devices to new kernel branches.

Google will focus on developing innovations for Android primarily in the Linux kernel.

The necessary interfaces for device manufacturers are implemented as hooks, allowing for kernel behavior modification without code changes. The android12-5.10 kernel offers a total of 194 standard hooks, similar to tracepoints, and 107 specialized hooks that allow invoking handlers in a non-atomic context. In the GKI kernel, manufacturers are prohibited from applying specific patches to the main kernel, and hardware support components must be provided by suppliers only as additional kernel modules, which must ensure compatibility with the main kernel.

It should be noted that Android is developing its own branch of the kernel — the Android Common Kernel, on the basis of which separate specific builds are created for each device. In each Android branch, manufacturers are provided with several variants of kernel configurations for their devices. For example, in Android 11, three base kernels were available for selection — 4.14, 4.19, and 5.4, while Android 12 will offer base kernels 4.19, 5.4, and 5.10. The 5.10 option is presented as a Generic Kernel Image, where the features necessary for OEM manufacturers have been transitioned upstream, modularized, or incorporated into the Android Common Kernel.

Before the introduction of GKI, the kernel for Android underwent several preparation stages:

  • A branch called 'Android Common Kernel' was created based on the main LTS kernels (3.18, 4.4, 4.9, 4.14, 4.19, 5.4), which included Android-specific patches (previously, the size of changes reached several million lines).
  • Based on the 'Android Common Kernel', chip manufacturers such as Qualcomm, Samsung, and MediaTek created 'SoC Kernels' that included enhancements for hardware support.
  • From the 'SoC Kernel', device manufacturers created the 'Device Kernel', incorporating changes related to supporting additional hardware, screens, cameras, audio systems, etc.

This approach significantly complicated the delivery of updates addressing vulnerabilities and the transition to new kernel branches. Although Google regularly releases updates to its Android kernels (Android Common Kernel), suppliers often delay providing these updates or use the same kernel throughout the entire device lifecycle.

Play video


Source: opennet.ru
Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster