DSU(Dynamic System Updates)是Android 10引入的一个feature。先了解下GSI。

GSI

GSI(Generic System Image)看字面就是通用的系统镜像了,就是Google官方Android,没有设备制造商(如某米)的自定义修改。

Android 9开始就能用了,是for app开发。官方给的说明是:

The GSI project helps improve the Android ecosystem by providing more ways to improve app and OS quality before the next release of the OS.

改善生态!9上使用还有两个条件:

  1. Bootloader要解锁
  2. Fully Treble-compliant

要unlock bootloader? Google提供了GSI image下载方法,安装方法可以手动刷(flashing) or via DSU。Treble-compliant是啥?

Project Treble

就是Android 8.0 re-architected the Android OS framework。

On the Android team, we view each dessert release as an opportunity to make Android better for our users and our ecosystem partners. One thing we’ve consistently heard from our device-maker partners is that updating existing devices to a new version of Android is incredibly time consuming and costly.

With Android O, we’ve been working very closely with device makers and silicon manufacturers to take steps toward solving this problem, and we’re excited to give you a sneak peek at Project Treble, the biggest change to the low-level system architecture of Android to date.

加速设备(米啊,OV啊。。)更新新系统。在系统实现上就是OS framework不要依赖vendor,模块化Android。so,官方blog给treble的另一个定义就是:

A modular base for Android

DSU

顾名思义,是系统更新了,还是动态的。这里的更新是更新的GSI image。动态是说不干扰当前运行系统,你不喜欢可以切回原系统。依赖动态分区(super分区)。

DSU方式安装GSI不用解锁bootloader,更方便些。

multiple DSU partitions

一开始DSU仅仅for Google GSI,那厂商的img也要做DSU怎么办?so:

The idea is to allow OEMs install OTA packages on /data, then using "DSU" [1] flow to mount product.img, system.img, vendor.img from /data.

After using it for a while, the user can decide if they want to "commit" those images to /super or not.

Note that currently DSU is exclusive for GSI.
However, this change allows DSU to boot either GSI or OEM system.img, product.img, vendor.img, etc.

既然有generic system(GSI),那也应该有generic kernel(kernel.org/GKI)? 有的哈,后面看。

kernel的修改path:

upsteam kernel (kernel.org) -> AOSP kernel -> vendor kernel(like QCOM/MTK…) -> OEM/device custom kernel (like mi, OV…)

refer doc