Google is considering letting users test Android Q before its AOSP release
Ahead of Google I/O 2017, Google unveiled Project Treble: a major rearchitecting of Android to separate the Android framework code from the hardware vendor implementation. The goal was to make it easier for device makers to provide Android software updates, combating fragmentation and making Android devices more secure in the process. Every device launching with Android 8.0 Oreo and above is required to support Project Treble out-of-the-box. We’ve already seen how Treble made it possible for Android device makers to release Android Pie betas alongside the Google Pixel devices, but another benefit of Treble could be earlier access to future versions of Android such as Android Q.
A key part of Project Treble is the Generic System Image, or GSI. A GSI is a pure, unmodified build of Android from the Android Open Source Project (AOSP). That means there are no device maker customizations (such as feature additions from the Pixel team or other OEMs like Samsung, Huawei, LG, Sony, Motorola, etc.) or carrier customizations. To maintain Treble compliance, Google mandates that all Treble-compatible devices be able to boot a GSI on top of the existing vendor implementation. Google requires device makers run a series of tests such as CTS-on-GSI (Compatibility Test Suite on Generic System Image) and VTS (Vendor Test Suite) to make sure that basic hardware functionality works when running a GSI. Beyond testing for Treble compliance, however, Google wants to make GSIs more useful for the general public.
The custom ROM community on the XDA forums is well aware of the usefulness of GSIs. We have a whole forum dedicated to installing GSIs on Treble-compatible devices after we discovered the impact that Treble has on porting AOSP to non-Google devices. We have been in contact with Google’s Project Treble team a few times to discuss community uses of GSIs, and we believe that GSIs are not only useful for enthusiast modders like us but also for developers interested in testing their apps on newer versions of Android with their existing hardware. That’s why at Google I/O 2018 we requested Google to provide early access to updated versions of Android in the form of a pre-built GSI, and it seems that Google is now exploring this possibility.
At this year’s Android Dev Summit, Hung-ying Tyan from Google’s Project Treble team held a talk titled “Understand the impact of Generic System Images (GSI).” During his talk, he discussed the importance of the GSI in Treble compliance but he also said that the team has plans to make GSIs more useful for the general public—developers and consumers alike.
“GSI is the central piece in Treble compliance. We feel that it has a lot more potential than that. We set out a goal to make GSI be more accessible and useful, not just for device makers but also the general public including app developers like you and even consumers. An important first step toward that goal is to make GSI available in AOSP. So for this, we have published pie-gsi in AOSP*. So now you can download and build pie-gsi today. We are also exploring ways to make future GSI available earlier than the release of next Android version. So you will be able to try out next Android version earlier over GSI. And at the same time we can also get early feedback from you, so the benefit is mutual. So please stay tuned for our further announcement on this.” – Hung-ying Tyan, Google
*pie-gsi refers to a branch in AOSP, as seen here.
What does this mean for us? It means that we might be able to test out Android Q before the source code is made available on AOSP. That’s huge because it would let enthusiastic users try out the new platform features earlier than usual, but it would also let developers test their apps against a newer API level without using an emulator or getting new hardware. Android P Developer Preview 1 was released on March 7th for the Google Pixel and Google Pixel 2. Android P Developer Preview 2 (beta 1) was released on May 8th for the Pixels and a handful of non-Google devices. If Google had provided an Android P GSI, any Project Treble-compatible device would have been able to test Android P before the official release of Android Pie and its source code on August 6th. That’s because Google has the ability to build a GSI from source months before anyone else can, so users and developers alike won’t have to rely on so-called “semi-GSIs” which are hacked images from the Pixel devices. In contrast, XDA Recognized Developer phhusson’s first source-built Android Pie GSI was released on August 20th, 14 days after Android Pie was uploaded to AOSP.
Google has also recognized that flashing a GSI can be tricky for users. We have detailed instructions on how to flash a GSI available here, but it’s admittedly lengthy and involves the use of fastboot commands or TWRP (if available). That means you must have an unlocked bootloader to proceed, something which isn’t possible on most HMD Global Nokia-branded devices or Huawei/Honor devices (on the latter, there’s an unofficial way to do so but it’ll cost you). To get around this, Hung-ying Tyan says that they’re working on a way for users to “[try] out GSI without actually flashing GSI onto a device.” He couldn’t share details on exactly how that would work, but we’re definitely interested in learning more and will update you once we have more information.