0

I'm trying to understand how Treble will affect custom ROM development.

I imagine by separating out the parts of the operating system it would make it easier for manufacturers to issue updates fixing any root pathways.

2

From XDA-Developers:

The reason why unofficial Android Oreo ports are slowly being worked on rather than just something developers can compile, boot up, and run is simple. In order to bring up a new Android version on an existing device, the kernel and the device tree need to be heavily reworked in order to make an existing Android phone work with a newer Android release. That’s because the current vendor implementation, including all proprietary binary blobs, is made to work with a single Android version, and thus need to be reworked and ported to the new Android version for the device to work properly.

Almost all components inside the phone use an independent, proprietary blob, and requires to be patched and worked on independently so that the newer software can use it, also making sure the other ones don’t break in the process. This is truly a time-consuming task, and the main reason why most stable custom ROMs (like LineageOS weeklies or other, officially supported ROMs) don’t appear until 2-3 months after the final Android release drops to AOSP. All this effort also means that the resulting ROM will only work on one device or, in the best case, a handful of identically or similarly specification devices.

This seems to be changing with Project Treble, according to Ron Amadeo of ArsTechnica and independently corroborated by custom ROM developer SultanXDA.

Malchev says that Treble standardizes Android hardware support to such a degree that generic Android builds compiled from AOSP can boot and run on every Treble device. In fact, these “raw AOSP” builds are what will be used for some of the CTS testing Google requires all Android OEMs to pass in order to license the Google apps—it’s not just that things should work, they are required to work. To drive this point home, it means that because of the way the lower layer of Android was modularized, all Treble devices in the market will be able to boot a generic stock, AOSP Android build. This takes away most of the hassle of porting custom ROMs to an older device since a single, generic Android build can run on many devices. This moves Android devices way closer to something like a personal computer, where you can boot up the latest, cutting edge Windows 10 build or any Linux distribution on a 10-12-year-old computer.

You won’t be able to boot up flawlessly-working generic Android 9.0 builds on your Treble device just yet, though – device trees and kernels will still require being worked on. It’s still a great start: thanks to the modularized HALs, the workload for bringing up the next Android version should be greatly reduced, and we could see stable 9.0 builds in a matter of days/weeks instead of months. We should have in mind that Project Treble, while it’s now rolling out, is still a work in progress as it’s still receiving changes in AOSP, and the vendor layer could eventually be standardized to the point installing a new Android version will be the same as installing Windows on a computer.

This is a huge technical advancement, and it has the potential to significantly improve AOSP-based custom ROM development on our forums. But then, this only applies to devices with Project Treble, and currently the only Treble phones available out there are the Google Pixel, Google Pixel XL, Sony Xperia XZ1, and XZ1 Compact.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.