Zygote
How Android works

HALs, Treble & Mainline

The decade-long project to make Android updatable.

6 pages71 min6 interactive9900 words
  1. 01What a HAL isA hardware abstraction layer is a contract between the framework and a piece of hardware. It says what you can ask for, not how the chip does it — and that distinction is worth billions of dollars of hardware support.beginner11 mininteractive
  2. 02The update problemBefore 2017 an Android update had to pass through Google, the SoC vendor, the OEM and sometimes the carrier. Understanding that chain explains why phones shipped with year-old software, and what Treble actually fixed.intermediate11 mininteractive
  3. 03Project TrebleAndroid 8.0 drew a line through the platform. On one side the system image, on the other the vendor image, and between them a versioned, declared, testable interface that neither side could silently break.nerd12 mininteractive
  4. 04From HIDL to AIDL HALsAndroid built a bespoke interface language for HALs, used it for five years, then replaced it with the one it already had. The reasons are a lesson in what happens when an interface has to live for a decade.nerd12 mininteractive
  5. 05Mainline and APEXTreble made the vendor side replaceable. Mainline made the platform side replaceable too. The container is the APEX, and the delivery channel is the Play Store.nerd14 mininteractive
  6. 06The three-axis modularity storyTreble split vendor from system, Mainline split the system from itself, and GKI split the kernel from the device. Three axes, one idea: find the boundary, formalise it, and make it cheap to cross.nerd11 mininteractive

Test yourself

Test yourself: HALs, Treble & Mainline

1 / 8

Which three mechanisms together make up Treble's vendor interface? Select all that apply.

0 answered · 0 correct