Lizzie
Warren

Android Project Mainline: Everything you need to know

Lizzie Warren

Dec 13, 2022

7 min read

The release of new Android OS versions always catches our attention. As part of the Android Q Beta 3 announcements, Google revealed Project Mainline to accelerate Android updates. This Project Mainline will directly update core OS components with “critical code changes” from Google Play. With Android 12, Google is expanding the scope of Project Mainline to include support for Google Play-based Android Runtime (ART) updates.

Project Mainline is an advancement of Project Treble. Well, if you’re a tech enthusiast or have an Android phone, you will be curious to know more about this (if that’s the case, this blog is perfect for you😉). So, let’s dive deep into them without wasting time.

Project Treble

To understand more about Project Mainline, let’s briefly review about its predecessor “Project Treble”.

Project Treble was launched with Android 8.0 Oreo and implied a significant restructuring of the OS framework. Its ultimate goal was to make device updates for the original equipment manufacturers (OEM) faster and simpler. It separates the primary Android OS framework from the lower-level code created by silicon suppliers. Through this, the device manufacturers can update OS without waiting for silicon vendors to update lower-level code with each new version.

Two major concepts of Treble that became effective are:

  • It provided a division of code into areas of responsibility. The incorporation of Project Treble allowed Google to update the higher-level AOSP operating system code to the most recent version while OEMs updated the lower-level hardware-related components.
  • With its reliable vendor interface that gives access to the hardware-specific components of Android, device manufacturers could deliver a new Android release to consumers by updating the Android OS framework, without requiring further work from the silicon manufacturers.

What is Android Project Mainline?

Project Mainline was introduced in Android 10 to speed up the distribution of security updates of vital system components to Android users. It helps to distribute new Android features to users of various Android versions without requiring them to perform a complete OS update.

While Treble reduced OEMs’ reliance on SoC (system-on-a-chip) vendors for every OS update, Mainline mitigated Google’s reliance on OEMs for delivering security upgrades to important OS components.

The main goal of this project is to update Android’s internal components entirely in the background through the Play Store without even forcing a reboot or risking security due to a software update lag.

The procedure is distinct from monthly security patches and system version updates, which would usually require a system reboot. By this way Google can keep essential OS components secure and up to date, without having to depend on the OEM vendors.

How does Android Project Mainline work?

Project Mainline helps update the essential OS components, similar to how we update apps through Google Play. This intends to relieve OEMs from managing framework elements and system applications essential for security and upholding development consistency.

The delivery format for each Mainline module is either an APK file, an APEX file, or an APK-in-APEX. The choice of format is mostly dictated by how sooner the component needs to be launched in the boot process, as APEX modules can be utilized considerably sooner in the startup process than APK-based modules can. Due to the focus on Android apps, the APK format is also less adaptable when it comes to system modules. The user receives a “Google Play System Update” (GPSU) message when a Mainline module updates.

Additional info 📖

  • Android Pony EXpress (APEX) is a new file format similar to APK. It is a container format introduced in Android 10, which is used in the install flow for lower system update-modules.
  • The main difference between the two file formats is that the APEX is loaded much earlier in the booting process. As a result, essential security and performance improvements that previously needed to be a part of complete OS updates can be downloaded and installed easily.
  • Verifying, installing and uninstalling APEX files are performed by the APEX manager (apexd).
  • APEX files are usually pre-installed on the devices under /system/apex, while the new files will be downloaded to /data/apex.

There were thirteen Project Mainline components with the release of Android 10. As of Android 13, this number has more than doubled or tripled if you take into account undocumented modules. Nevertheless, only some Mainline modules will be available on all Android-powered devices.

Android project mainline
Figure illustrating the modular arrangement of Project Mainline
 

As depicted in the figure, Mainline makes Android’s system components a bit more modular. Let’s see how Google categorizes these 12 elements into three categories in the following session.

Featured resource

Hexnode Android Management Solution

Get started with Hexnode’s Android Management solution to improve efficiency, increase productivity, save time and overhead costs of managing your corporate devices.

Download the datasheet

What does Android Project Mainline cover?

The primary goal of Project Mainline is to upgrade Android’s twelve fundamental parts. These elements were previously inaccessible without a significant software upgrade because they are crucial to operating other OS components.

With Android Project Mainline, Google categorizes the modules into three categories:

  • Security: This provides quicker solutions for serious security flaws. Media Codecs, Media Framework Components, DNS Resolver, and Conscrypt are some of the security modules.
  • Privacy: This boosts the privacy standard and better safeguard user data. Some modules of this category include the Documents UI, Permission Controller, and ExtServices.
  • Consistency: This addresses problems that impair the stability, compatibility, and consistency of developers. Some modules under this category are Timezone data, ANGLE (developers opt-in), Module Metadata, Networking components, Captive Portal Login, and Network Permission Configuration.

Android security in the enterprise: Myths debunked

Where to check for this system update on your phone?

We all enjoy using the knowledge we have gained. So, grab your phone and let’s see how this system upgrade performs in your phone.

Navigate to Settings > Security > Google Play system update.

Android project mainline
Figure illustrating the interface of system security
 

There you can see the latest available update. Just click on download and install. Within seconds, the latest update from Google will be downloaded and installed. With this feature, you can improve the device’s stability easily and quickly.

Android project mainline
Figure illustrating the interface of updating page
 

The role of Hexnode in Android updates

Hexnode UEM assists businesses with scheduling OS updates for Android devices enrolled as “Device Owners” in the Android Enterprise program. Hexnode UEM streamlines the distribution of extensive OS upgrades to Android devices. The software updates can be provided to a specific group at any time to prevent bandwidth overuse since numerous devices exist in the company. Additionally, Hexnode UEM gives IT administrators a choice between automatic updating, delaying updates for up to 30 days, and updating during inactive hours.

Additional info 📖

What are the device owner and profile owner modes? 🤔

  • The two primary management modes that the Android Enterprise provide include Device owner (Fully managed device) and Profile owner mode (Work profile).
  • The organization will have total authority over the device in device owner mode.
  • The profile owner mode stores the work apps and data separately from personal apps and data. The user’s personal space will stay private, and the organization won’t have any authority over the user’s personal information.

The bottom line

The launch of Project Mainline in Android 10 was one of the most significant updates to Android in recent years. Despite being launched several years ago, Project Mainline has grown over time to include a huge number of Android components.

The use of Android Project Mainline is beneficial as new features will reach you more quickly without having waiting for your OEM to provide the same software updates promptly.

Share
Lizzie Warren

A lil clumsy and a whole lot smiley, I'll bump into you with a smile...

Share your thoughts