How to flash a GSI on an Android device

In 2017, Google’s Project Treble was introduced, bringing a major architectural change to Android. In particular, the Android operating system, which is the same for all devices, has been separated from the low-level software that is specific to each device. As a result, Android smartphone manufacturers (OEMs) and custom ROM developers can now process Android upgrades faster than before on devices running Android 9 and later.


Project Treble also spawned GSIs. A GSI (Generic System Image) has an Android-only implementation and includes customized configurations to make it work on any Project Treble compatible device. With a GSI, you can experience a new version of Android before your OEM releases the over-the-air upgrade to your phone.

Here we guide you to flash a GSI on supported Android devices.


Requirements before flashing a GSI

Flashing a generic system image on an Android device is a simple process. But still, there are a few points to check before you start. These prerequisites will guarantee you a smooth experience, so don’t skip any of them:

Once everything is verified, you can proceed to install Android GSI below.

Step 1: Make sure your device supports Project Treble

Before doing anything else, make sure your Android device is Trebalized (Project Treble compatible). Google has a general rule of thumb that any device that launches Android 8 (Oreo) or later will ship with Project Treble compatibility, but there’s no harm in confirming this for your device.

An easy way to do this is to download the Treble Info app from the Google Play Store. Start the app, go to the Heights and VNDK If you see a green checkmark on the left, your Android device supports Project Treble. The summary provides more information, including the VNDK Veion number (Vendor Native Development Kit) that corresponds to the Android version of your device.

Step 2: Confirm the CPU architecture and partition information

Android GSIs target multiple CPU architectures including ARM, ARM64, x86, and x86-64. So make sure you get the correct GSI for your device’s CPU. To find your device’s CPU architecture, open the altitude info app again. You can find the CPU variant of the device under the Architecture Section.

Excerpt from the Treble Info app with information on architecture, seamless upgrades and dynamic partitions

Before closing the app, under the Dynamic partitions In the section, check if your device uses dynamic partitions. You need this information to determine if you want to flash the GSI Quick Start or fastbootd mode later.

Fastboot or Fastbootd mode is available when Android OS is not running and helps you read or write to your phone’s flash memory. Use extreme caution when using any of these modes.

Step 3: Download a GSI

Now that you know the CPU architecture information of your device, go to Google’s GSI version page on your PC to find a suitable GSI. Remember to download a GSI that matches your Android version or higher.

If you want a GSI with Google Play Services, choose the one with grams in the file name. After a successful download you will find system.img and vbmeta.img Files in the GSI zip folder.

WinRAR app with contents of a GSI zip file

Now extract the system.img and vbmeta.img files and put them in the platform tools Folder you set up in the Prerequisites section above. Placing these files in the same folder as the platform tools guarantees that all following commands will run successfully.

Step 4: Boot into Fastboot or Fastbootd mode

Before running any commands, you need to connect your Android device to Windows PC and enable USB debugging. After that, open a command prompt Window in the Platform Tools folder. A simple way to do this is to type the word cmd in the folder address bar and click Enter on the keyboard.

Next, type the following command in the resulting Command Prompt window and press Enter to boot your Android device fastboot Mode.

 adb reboot bootloader 
Windows terminal with the command

If you found that your device supports Dynamic partitions in step 2 above, you need to run the following additional command to boot the Android device fastbootd Mode. If you don’t do this, you will see missing partition errors when trying to install the GSI. Skip this command if your device does not have dynamic partitions.

 fastboot reboot fastboot 

At this point, your device is now ready to be flashed with the GSI files you extracted.

Step 5: Flash the Android GSI via Fastboot or Fastbootd

To avoid problems booting the GSI, you must disable it AVB (Android Verified Boot) by running the following command. OEMs use AVB to ensure the integrity and authenticity of the Android system running on your smartphone. Skip this command if your device doesn’t come with AVB. You will know this when the command throws an error that the partition does not exist on your device.

 fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img 
Windows terminal with AVB command

Next, wipe the system partition to remove the currently installed Android OS using the following command. Installing GSI over the existing Android system leads to issues like endless boot loops where your device won’t finish booting no matter how long you wait.

 fastboot erase system 

Flash or install the downloaded GSI into the system partition using the following command. Keep in mind that the flashing process can take a while, so be patient.

 fastboot flash system system.img 
Windows terminal with fastboot flash system command

It is now time to format or wipe user data to remove all data associated with the previous system. If this is not deleted, it can cause startup problems or other problems. Run the following command to factory reset your device:

 fastboot -w 

You have now successfully installed the GSI. All that remains is to boot your device into the new Android OS by running this quick command:

 fastboot reboot 

The first boot process after flashing a new Android OS usually takes some time. A successful launch means you have the GSI installed as expected and you can now explore all the goodies that come with the new GSI on your device.

Remember that a GSI aims to support as many devices as possible. Therefore, device-specific features such as the default camera are not available. Luckily, you can mitigate some of these camera issues with popular workarounds like Google Camera ports.

GSIs in custom ROMs

We’ve only linked Google’s GSI versions in this guide, but there are more. Thanks to Android custom ROM developers, you can usually get a GSI based on your favorite custom ROM like LineageOS, Pixel Experience, /e/ OS and more.

Therefore, not only can you experience new features or a pure Android experience through a GSI, but you can also expand your device coverage for custom ROMs. Even better, if your OEM stops providing security patches or version upgrades, the GSIs are still there for you.

Leave a Reply

Your email address will not be published. Required fields are marked *