A HELP GUIDE TO GSIs
Skip to Topic
What is a GSI?
Simply put, A GSI is a system image (.img) that can be run on treble enabled devices.
GSIs became the solution for the lack of custom ROM support for Mediatek powered devices. This method of customization has many perks, with few disadvantages. GSIs, not intended to be daily driven, were mainly for testing purposes for the development of a fully functional ROM. Passionate android developers decided to work on them, making them less buggy, large support and more features with little to no utility impacts (some cases). GSIs began from Android 8 till the already developing 15. A determining factor of support is kernel version and Vendor compatibility.
GSIs are primarily based on Google's Pixel Experience Software. Very light, yet effective with beautiful "pill" themed UI.
Types of GSis
GSIs:
Can boot on all devices, may contain bugs.S-GSIs:
Semi-GSIs (usually Ports from official builds) are GSis but not for all devices, they have requirements that must be met in order to successfully boot into system such as Modified Vendors, A Permissive Kernel, Manufacturer Specific etc.Modified GSIs:
These are GSIs that are improved on to accommodate missing features or to add new ones to a specific device model. This can be maintained by a single developer, or a group.
How can i flash a GSI?
To Flash a GSI, you need:
- Your Android Device
- A Computer/Laptop
- Proper setup of necessary drivers and adb recognition. Refer to this Guide on how to get things working.
- A stable internet connection.
- Your 'system.img' ready for flashing. (Make sure the file ends with ".img" and not ".xz" as most GSIs are compressed)
Now, you're ready to flash!
To flash the image, you must successfully boot into fastbootd. To avoid conflicts, you must erase the already existing system image from your previous OS, be it stock or custom. now, to flash the image, for windows users, make sure the file is renamed to 'system.img' for easy use and in the adb/fastboot folder. For linux users, make sure the file is in the directory you open the terminal in.
Commands
- To erase /system, run 'fastboot erase system' and it will do as mentioned.
- To flash the .img file, run 'fastboot flash system system.img'. If you run into the "not enough space to resize the partition" error, then you will have to run 'fastboot delete-logical-partition product' and 'fastboot delete-logical-partition system_ext'. Don't worry, these commands are totally safe.
- After all the packets have successfully been written to the device, you must run 'fastboot -w' to wipe data (doesn't automatically format) then reboot recovery and factory reset to properly format /data
- Once done, you can now reboot system and enjoy. It's that simple!
Now that your device is all booted up, Are you rooted? If no, then refer to this guide on how to root
Things NOT to do and their Consequencies
The following are common mistakes made by rookies in this field:
Do not dirty flash!
Dirty Flashing basicaly flashing a "system.img" update to system right on top of the already existing older build. This new build will contain new security patches which will update upon flashing. The Problem is this is also a form of an Incremental Update which means your device is now updated to a newer security patch of e.g. April Patch > May Patch. While this is a good thing, as a GSI user, it's not all fun and Games. Apparently, flashing directly ontop of the previous build results in an irreversible incremental update (so far irreversible on some Transsion devices) and prevents you from booting a GSI with an older Android Version or Security Patch. This takes effect in mainstream system flashing and DSU booting respectively. Any attempt to flash an older build will result in triggering the Anti-Rollback protocol which prevents older builds from booting. To prevent this from happening, it is advised to run fastboot erase system and then flashing your desired build. It is best to make a Backup of your data as you may need to wipe /data in some scenarios. It is recommended to perform a clean flash!