Project Treble, something that you might read in some of our reviews and comment sections, is an important shift in Android as we know it. One of the pieces of Oreo, Treble was Google's attempt to improve the terrible update situation we see on many third-party phones, especially from Samsung, Asus, and Huawei. So far, only a few manufacturers have implemented it to any noticeable degree, with others outright ignoring it until the last possible minute.
In many circles, however, Project Treble is most exciting from a custom ROM perspective. Long gone are my days of flashing several in a very short span of time – a practice that prepared me well for switching between phones and review units so frequently – but I still pay attention to this community. And while I professionally appreciate Treble from an update standpoint, my personal interest lies in if/how it can improve the life of regular ROMers and developers.
Treble stands to have a major impact on Android, but has Treble made flashing custom ROMs easier? Has it made development less taxing, or has it introduced new difficulties while solving old ones?
What is Project Treble?
Before diving too far in, let's take a step back and talk about what Project Treble actually is. A year ago, Corbin wrote up a short explainer; you can go back and look at that if you want, but I will reiterate it here.
The point of Treble is to modularize updates, decreasing the amount of time that OEMs need to update their devices. From Oreo on, the Vendor Interface sits on top of the low-level hardware drivers and other software elements; Google also works with chipset manufacturers to make sure that it is forwards-compatible, meaning that SoCs will hopefully have longer lifespans (so we can avoid the Snapdragon 800/801 incident).
All of this means that hardware manufacturers like Samsung and Huawei can update the operating system without having to wait for Qualcomm or MediaTek to update their code — side note, Samsung and Huawei also use in-house chips, but that hasn't meant that either company has excelled at updates in the past. If you're interested in the nitty-gritty, then I recommend checking out the Android Developer's page on Treble.
Treble and flashing custom ROMs
Beyond more consistent updates from OEMs, Treble also offers a unique benefit to tinkerers. Long-time custom ROM users will remember the days of shopping specifically for phones that you could unlock and flash something AOSP-based, sometimes waiting to see if a community developed around that device you wanted. Even with Treble, though, that's still a consideration since flashing anything requires an unlocked bootloader. Some OEMs will still fight this battle, citing concerns for "security" — even though that argument, while valid at its heart, is most often lazy.
But since Treble allows users to flash new system images without touching the vendor partition, custom ROM users are typically in a better spot than in previous years because the ROM can still use the phone's proprietary drivers and Hardware Abstraction Layers (HALs). The most prominent example of this is the camera, though my experience has thus far shown that photography is still inferior versus stock. Nonetheless, you're not necessarily consigned to terrible photos, just not as good as the factory firmware.
The big change for me was the actual flashing process. On the Honor View10, my so-called Treble test device, I had to use the fastboot flash system command instead of installing the ROM in TWRP. It's still possible to flash in recovery, but whether you're installing an image or zip file depends on the developer. Other than that, the process was exactly the same as what I was used to and in no time at all, I had LineageOS running on a Huawei device.
From a user's perspective, Treble theoretically offers a better aftermarket software experience. In years past, ROMs had a lot of trade-offs — most of us were fine with horribly inferior camera performance in exchange for stock software. And while there are still things you give up in order to have what you might consider a better user experience, they seem to be fewer than before and more easily rectified. I have faith in the community that it will sort things out and become the strongest proponent of Treble.
Developing with Treble
I reached out to some ROM developers to ask about Treble and its impact on their workflow. Most didn't get back to me, but I had a great conversation with those who did. The big takeaway is that Treble really doesn't add much more work to a dev's already full plate.
For devices that support Treble, according to developer Surge Raval, it all comes down to simply enabling the full flag set. "From the viewpoint of someone just building," he told me, "you wouldn't notice a difference at all. I build the same ROM that runs on both."
Harsh Shandilya, another developer I spoke to, said that Treble doesn't really change much for devices that already have a strong ROM community around them. If anything, Treble will help the devs get the custom ROMs out a few days or so faster. The benefit, he said, was to devices from manufacturers like Huawei and Vivo, who only need a simple bootloader unlock to get a viable AOSP image up and running. As we've seen thus far, Huawei is doing quite well on that front; getting a bootloader unlock code is a simple process.
But so far, one of the biggest challenges with having a solid ROM experience has come down to how OEMs handle /vendor, whether it's because they have dm-verity enabled on it or they have used some hacky partition label renaming (as is the case with Xiaomi). This is problematic when the ROM needs to add something to /vendor, or if you're trying to mount it in recovery. As Surge said, "Treble devices have seen numerous recoveries because a standard has not been set on how to deal with partitions, such as /vendor and others, while trying to flash a ROM."
We're still in the early stages of Treble, since Oreo itself is just past six months old (despite it being in the Developer Previews, but you get my point). The custom ROM community as a whole is still ironing out the kinks as they try to settle on the best practices, but the sense of excitement with the whole concept is quite obvious. Still, adoption has been slow, and Harsh and Surge both agreed that the slow uptake, by OEMs and developers alike, could be Treble's ultimate downfall.
- +Char G
At the end of the day, Treble stands to have a powerful impact on Android. Every phone that launches with Oreo and later must support it in order to be Google certified, but it'll be up to the manufacturers to actually utilize it. We've already seen how Treble can improve the ecosystem; seven non-Pixel devices are eligible to install the latest Android P beta, including Xiaomi's Mi Mix 2S. It's thanks to Treble that these phones are able to try out what those of us on Pixels get to.
Not only does it stand to drastically improve the abysmal update situation in the Android ecosystem, but it also opens the door for new devices to get solid custom ROMs. Treble lowers some of the barriers to entry, for users and developers alike; though as I mentioned, it's not without its problems. My test device, for instance, still has a few things not working; with that being said, however, the progress in the last month or so has resolved many of the more pressing issues. Treble doesn't mean that you'll get a fully functioning AOSP ROM running out of the box with no issues. Hardware interaction is still a challenge in some cases, and therefore requires time and effort to get working right.
Time will tell how well OEMs and devs take advantage of Treble, but I have high hopes. Perhaps this rare bit of optimism from me is doomed to be crushed – since many of Google's previous Android initiatives have failed us – but I stand firm in my belief that Treble might be one of the best things Google has done for Android.