Let the latest Android Q Beta 3 to force a restart of Project Mainline, in the end is what?

A. Order

The latest version of Android Q, has released Android Q Beta 3, although not officially released, but many users have joined the test program, the first to experience the new features of Android Q.

After the recent experience of a lot of user feedback, upgrade their equipment to Beta 3, touch off guard force restart will occur. Google has confirmed that regard, the Project Mainline run lead in the Android Q newly added features. Google also said in acknowledgment of these problems will be fixed in later versions of the test, it will not appear in the official version.

What is Project Mainline (hereinafter referred to as PM) it? It is doing? But also solve the problem?

二. Project Mainline

2.1 PM solve the problem?

Android to have today's development, thanks to its open source system source code, but precisely because it is open source, resulting in serious fragmentation. So that in the high-speed iterative process Google Android system version, many users Tucao, Q come, O do not spend.

The fragmentation will lead to various problems, such as security, privacy and other issues. Often exposed a problem in the system, Android team to fix it, will have to wait a long time before finally synchronized by the vendor to the client.

Too many intermediate links, will inevitably lead to slow updates, often a security update to go through six months or even a year to eventually upgrade to the client companies, while these steps, there is some overlap in time.

‚

The figure shows the update time between Google and chip manufacturers and mobile phone manufacturers, any overlap between these various stages, are likely to lead to failure updated. This leads to mobile phone manufacturers, using an older version of Android, but more stable, safer approach.

To address these issues, from the Android P began to join the Project Treble program, which is now in the Android Q Project Mainline foundation. By supporting the PM, simplify and accelerate the upgrade update Android ecosystem.

上图为 Project Treble 的计划理想更新时间,在 Android Q 中,谷歌发现与系统级的更新相比,以“模块”为粒度的更新,是一种更有效的方式,这就引入了 Project Mainline 计划。

P-M 可以通过 Google Play,使用一种类似更新应用程序的方式,更新系统的核心组件。这类更新可以无需等待手机制造厂商的 OTA 更新,直接触达用户,同时这些 Mainline 组件,在保证开源的同事,也不允许厂商直接修改,只能由 Google 来更新升级。初期提供的 Mainlin 组件,涉及到安全、隐私、一致性三个方面。

‚

到现在应该都知道 Project Mainline 的作用了吧?

简单来说,Android 的碎片化导致更新困难,而一些重要的功能又迫切的需要及时更新到用户侧,例如安全类、隐私类等,谷歌开启了 Project Mainline 计划。Project Mainline 计划将系统中,重要的“模块”封装成一个个 Mainline 组件,通过 Google Play 的支持,使用一种类似更新应用的方式,在需要的时候,直接更新到用户端,以此来解决碎片化所带来的各种问题

Proejct Mainline 让你手里的设备更安全并且兼容性更强了。

2.2 P-M 更新了那些东西?

初期 Project Mainline 支持的模块,主要涉及到安全、隐私和一致性三个方向。但是这种更新方式是通用的,后期不排除可能会携带一些常规更新。

Project Mainline 包含的更新方向:

  • 安全性:可以对关键的安全漏洞,提供更快的安全修复程序。例如媒体组件漏洞(占最近修补漏洞的近 40%)。
  • 隐私:隐私一直是 Android 关心的焦点,并且在版本更新中,一直投入大量的精力来更好的保护用户数据并提高隐私标准。最主要的表现是对权限系统进行更新升级,更好的保护用户数据。
  • 一致性:一致性主要影响设备稳定性、兼容性和开发人员使用 API 的一致性问题。

在 Android Q 中上,初始支持的组件包含:

  • 安全性:媒体编解码器、媒体框架组件、DNS 解析器、Conscrypt。
  • 隐私:文档 UI、权限控制器、ExtServices。
  • 一致性:时区数据、ANGLE、模块元数据、网络组件、登录组件、网络权限配置。

分模块的好处就可以做到“手疼医手,脚疼医脚,哪里不对点哪里了”,让每次更新更轻量级。

2.3 P-M 是如何运作的?

前面提到 P-M 主要是通过 Google Play,以一种类似更新应用的方式去更新这些 Mainline 组件,那它到底是如何运作的?

Mainline 组件最终以 APK 或者 APEX 文件的形式交付。APK 我们很熟悉,而 APEX 是谷歌开发的一种新的文件格式,类似于 APK。但是其根本区别在与,APEX 在系统启动过程中,加载的更早。

因此,以前需要成为完整操作系统更新一部分的重要安全性和性能的更新,现在可以像更新应用一样轻松的下载和安装。

为了确保 Mainline 更细不会破坏原有的功能,还为此增加了保护机制和增加的测试流程,以确保每次更新都是经过全面测试以及完善的后备方案。

三. 小结时刻

Project Mainline 的本意是为了让更新更快触达用户,以提高安全性、隐私和一致性等问题。虽然现在 Android Q Beta 3 中可能会导致强制重启,但是问题已经暴露出来,后续解决它就很简单了。

可能 P-M 的工程师觉得有更新,立即重启一下就可以生效了,就给用户强制重启了,当然这也可能单纯的就是一个 Bug。理论上如果不是很重要的组件更新,可能和重启应用一样简单,就不需要对系统进行重启,但是一些重要的组件更新,可能就需要重启系统来确保它生效。

不过话说回来,再严重的问题,都已经运行在用户端设备上这么久了,也不差这一天两天的。参考 iOS 系统更新的策略就挺好的,立即更新或者在半夜空闲时更新。

这种单模块的更新,可能会让开发人员和测试人员更迷惑,以前兼容性的问题,只需要问清楚手机型号和系统版本,就可以针对性的做适配。现在好了,还需要弄清楚对应的 Mainline 模块的版本号,也许有些问题已经被谷歌偷偷的修复了,但是在用户侧还没有及时更新。这时开发人员还是蛮尴尬的,你说我改还是不改?

你觉得呢?欢迎在留言区讨论!

本文对你有帮助吗?留言、转发、收藏是最大的支持,谢谢!

references:


公众号后台回复成长『成长』,将会得到我准备的学习资料,也能回复『加群』,一起学习进步;你还能回复『提问』,向我发起提问。

Guess you like

Origin www.cnblogs.com/plokmju/p/android_project_mainline.html