https://www.xda-developers.com/flash-generic-system-image-project-treble-device/

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e7f6e721-acaa-4170-b6ae-e0fcf0160ce1/Generic-System-Image-810x298_c.jpg

If you’ve only heard of Project Treble in passing but haven’t looked into it all that much, then you may have heard that it’s supposed to help major Android updates roll out more quickly. At XDA, there’s another benefit that we’ve spoken about at length: the ability to boot an AOSP Generic System Image (GSI) on any supported device. This means that devices that were once running heavily customized Android versions like Samsung Experience on the Samsung Galaxy S9 or EMUI 8 on the Huawei Mate 10 Pro can alternatively run software closer to that of the Google Pixel 2.

After-market custom ROMs (customized versions of Android software that are made by independent developers usually not affiliated with a company) are a big draw to the XDA forums, and thanks to the changes in Android that Project Treble require, Treble-supported devices will have an easier time flashing custom ROMs based on the Android Open Source Project (AOSP). Without Project Treble, developers have to employ a lot of tricks and hacks to get their custom ROMs working, and while Treble support doesn’t solve everything, it certainly helps kickstart the process.

Devices like the Huawei Mate 9, Honor View 10, Huawei Mate 10 Pro, Honor 7X, Exynos Samsung Galaxy S9, or Allview V3 Viper would have had either no AOSP-based custom ROMs available due to lack of developer interest or ROMs lacking some basic hardware functionality. But as we’ve seen with the in the case of each of these devices, the ROMs that are available thanks to Treble support are mostly functional (there are some differences in terms of what works and what doesn’t, and the community has put together a wiki page you should check out to find that information).

Since Treble is so new to users and the process to flash them is a little different compared to the usual custom ROMs, there’s been a lot of confusion about how to flash a GSI onto a Treble-compatible device. This tutorial will broadly walk you through how to flash such a ROM. There may be a few different steps involved depending on the device, but in general, the process should be similar. Here’s how to flash a GSI on a Treble-compatible Android device.

How to flash a Generic System Image on a Project Treble-supported device

Requirements:

Devices such as the Samsung Galaxy S8/S8+ (Exynos or Snapdragon), Samsung Galaxy Note 8 (Exynos or Snapdragon), LG V30, Sony Xperia XA1 series, and more do not meet any of these criteria and thus cannot follow this guide. While 2018 Nokia-branded devices and the Snapdragon Samsung Galaxy S9 launched with Android Oreo and are Treble-supported, they do not have unlockable bootloaders and hence cannot flash GSIs.

Please be sure that, even if your device is listed as Treble-compatible, that you do not follow this guide unless you have actually received the Android Oreo update either officially or unofficially. If your device meets the above criteria, then you’re almost ready to flash a GSI. The last thing that we need to say is that flashing a GSI will require you to factory reset your device, so be sure you’re prepared to lose app data before you proceed with this! We recommend you make an off-device backup (such as on your PC or an SD Card) in case anything goes wrong.

Guide to flash GSI on devices that support Project Treble

Preparation for devices that officially support Treble

  1. Unlock the bootloader of your device. The steps you take here are different depending on your device. We have many guides available both on the Portal and in our forums for you to peruse. Just do a quick Google search for “XDA unlock bootloader” + your device name and you should find many guides.
  2. Download the GSI of your choice onto your PC. You can either flash a pure AOSP ROM such as phh-Treble, or if you prefer more features you can grab other ROMs like LineageOS 15.1 or Resurrection Remix GSIs. I have linked the threads as follows. Download the right image for your device type (ARM64 for most of you) and partition type. If your device supports seamless updates (a list of such devices can be found here), then download the A/B image, otherwise download the A-only image.

Preparation for devices that unofficially support Treble

  1. Unlock the bootloader of your device. The steps you take here are different depending on your device. We have many guides available both on the Portal and in our forums for you to peruse. Just do a quick Google search for “XDA unlock bootloader” + your device name and you should find many guides.