In this post, we will show you how to install Generic System Image on Project Treble supported devices.
Advertisement
Android Oreo brought a plethora of new changes and features, of which, one vital inclusion that wasn’t discussed initially is Project Treble. Google’s new architectural rework mostly influences manufacturers and helps them roll out software updates more quickly. This is done by separating the complete Android OS framework from the vendor implementations. According to Google, every new device that comes with Android Oreo out-of-the-box must support Project Treble. However, it is up to the manufacturer to add support to existing devices running Android 7.x Nougat. Anyhow, you can easily flash Generic System Image on Project Treble supported devices.
Page Contents
Guide to Install Generic System Image on Project Treble Devices
There’s another side to Project Treble that gives it due importance in the Android customization scene. Devices that support it can easily install Generic System Image (GSI) based on the AOSP code. These are simply system (.img) partition files. The moniker “Generic” implies that such software images could be installed on any Treble-enabled device, irrespective of the manufacturer they belong to. Independent developers at XDA forums have already started compiling GSI of some popular custom ROMs including LineageOS and Resurrection Remix. With time, more and more custom ROMs will be added.
Advertisement
Note that Seamless updates (A/B partition system) and Project Treble are two different things, do not confuse them with one another. For example, there are devices like Honor 9 Lite, Galaxy S9 (Plus) and more, that use the A-only partition system and are officially supported by Treble.
Since the concept is new, users might often feel lost on how to flash a GSI on their device. That’s because the process is different than flashing a regular custom ROM, which is what we have been following for years. There are two methods to install Generic System Image on Project Treble devices. You can either use TWRP or Fastboot to flash the system.img. While the process is broadly same for all supported phones, there might be some additional device-specific steps.
Prerequisites
- A factory reset is required during the process, which will erase the data (excluding internal storage). So make sure to take a complete backup beforehand. You can follow our extensive guide on how to backup Android.
- This tutorial will only work on Project Treble-enabled devices. If you’re unsure, you can easily check it or refer to our list of Project Treble supported devices.
- In order to flash a GSI, your phone must have an unlocked bootloader.
- If you wish to use Method 1, then you should have the latest TWRP recovery installed as well.
- For method 2, it is imperative to install Android SDK tools on your PC.
- Make sure that your phone is using the stock boot/ramdisk image. You can look for your device-specific image here.
- Unofficially supported devices must perform the extra steps first, as stated in the threads linked here.
Once you have fulfilled the requirements stated above, you shall be ready to install Generic System Image on Project Treble devices.
Downloads
You will first need to grab a GSI that you wish to flash onto your device. If you’re looking for a clean AOSP experience, we’d recommend downloading phh-Treble by phhusson. For those aspiring for additional customizations and features can download LineageOS 15.1 or Resurrection Remix 6.0.
Make sure to grab the correct GSI image for your device. On a broad scale, there are A/B and A-only variants, along with GApps or without them.
As told earlier, there are two methods to install Generic System Image on Project Treble devices. You can choose whichever suits you the best.
Method 1: How to Flash GSI using TWRP
- Download Generic System Image and transfer it to the phone’s storage/SD card.
- Power off the device completely.
- Use the device-specific special buttons combination to enter TWRP recovery mode.
- Alternatively, you can also use the following ADB command:
adb reboot recovery
- In TWRP, go to ‘Wipe’ and swipe the ‘Swipe to Factory Reset’ button.
- Go back to the main screen.
- Tap on the ‘Install’ button.
- Select the ‘Install Image’ button at the bottom. This will shift TWRP installer from ZIP to IMG.
- Navigate to the storage and select the IMG file.
- On the next screen, select ‘System Image’.
- Finally, swipe the button on the screen to install Generic System Image on Project Treble devices.
- Once complete, press the ‘Reboot System’ button.
That wasn’t much difficult, was it? For users who want to do this without TWRP can follow the next method.
Method 2: How to Flash GSI using Fastboot
- First, factory reset your Android device from the device settings or stock recovery.
- Next, download Generic System Image of your choice.
- Transfer it to the folder containing the ADB and fastboot binaries. If you have followed our tutorial, it should be C:\adb.
- While holding the SHIFT on the keyboard, right-click on an empty space inside the folder.
- Select ‘Open PowerShell window here’.
- Enable USB debugging on your device and connect it to the PC.
- Reboot into Bootloader/Fastboot mode using the given ADB command:
adb reboot bootloader
- Finally, install Generic System Image on Project Treble devices using:
fastboot flash system system-image-name.img
- Here “system-image-name.img” will be replaced by the actual filename of the GSI you downloaded. Example:
fastboot flash system system-arm64-ab-gapps-su.img
- Once complete, reboot your phone using:
fastboot reboot
Your device shall now boot into the OS. If it fails to boot, then take a look at the pointers in the section below.
Troubleshooting
- Some devices like the Razer Phone, for instance, may fail due to dm-verity. To fix, you can simply install Magisk to disable dm-verity.
- It is also observed that a few devices also need a full factory reset including the internal storage, in order to boot. So, if the above isn’t aiding your situation, you can try this.
You can further root their Android phone using SuperSU or Magisk. Note that, you should only use rooting solutions for LineageOS/Resurrection Remix. phh-Treble doesn’t support it as it could mess with the SELinux policy. You may even further avail the opportunity and install mods like Xposed Framework, ViPER4Android, and Dolby Atmos.
Now that you have been able to install Generic System Image on Project Treble supported devices, let us know how easy or difficult it was compared to a regular flashing process.