Why should I use a GSI ? Mojito already have custom ROMs ¯\_(ツ)_/¯
Yes. But this thread exists due to the following reasons:- You don't wanna fear about devs stop shipping updates.
- You don't wanna re-flash your custom recovery / kernel after each update.
- Unlike some ROMs, no clean flashes necessary after you update.
- You don't wanna be a flashoholic / beta tester of a ROM maintainer.
- GSIs are like Linux Distros. Flexible, hasslefree & minimal.
- All GSIs support signature spoofing out of the box.
- ROM updates modify all the partitions (boot, recovery, kernel, system, vendor, etc). A GSI update is just a system partition that updates "only" the system, that runs upon stock firmware.
- ROMs might pass safetynet out of the box. But for GSIs, you must root & use magisk modules to achieve that.
- You can't flash gapps on vanilla GSIs, as you do on vanilla ROMs. You must use bgS/bgN GSI variants.
- For now, GSIs have to be installed via fastbootd, as recoveries still yet to support logical partitions. So you need computer available when you update or change them.
PREREQUISITES
- Stock ROM (fastboot)
- MicroG (for vanilla)
- vbmeta.img (from google)
- SafetyNet Fix (thanks to kdrag0n)
- TrebleDroid (thanks to phhusson)
- Pixel Experience (thanks to ponces)
- More to test from here
INSTALLATION
NOTE:
I'm assuming you've already unlocked bootloader, backed up your data & know all the technical consequences of flashing & modding.- Download / extract all prerequisites in one place.
- From stock firmware, edit
flash_all_except_data_storage.bat/sh
& modify last line tofastboot reboot fastboot
- Enter fastboot mode
{vol_down+power},
connect to PC & flash firmware using above edited script. When device enters fastbootd, from terminal/cmd execute : fastboot erase userdata
fastboot flash vbmeta vbmeta.img
fastboot flash system <gsi-file.img>
(ignore INVALID SPARSE warning)fastboot reboot
& make sure your GSI boots up. Power off & return to fastboot again.fastboot boot <twrp-file.img>
, head to Advanced & run flash current TWRP to make recovery persistent across reboots.- Finally Magisk (for root, safetynet fix, additional modding, etc).
BUG_1:
Don't touch the screen while booting to avoid touch issues after you boot (this bug occurs only on custom kernels).BUG_2:
Don't set up password on startup wizard. Instead, set it up later & then disable Android Setup app if it exists. Else it'll crash fingerprint settings.UPDATE / DIRTY FLASH HOW ?
fastboot reboot fastboot
fastboot flash system <new-gsi.img>
& reboot twice
POST CONFIGURATION
- Enable the following Settings > Phh Treble Settings:
- Qualcomm features / Use alternate camera profile & audio policy
- Misc features / Disable audio effects
- IMS features / Force the presense of 4G calling & Install IMS Apk for Qualcomm vendor from notification panel.
- Setup magisk, hide the app, enable Zygisk & Enforce Denylist.
- Use SafetyNet-Fix module to pass safetynet. Still won't pass? Try Pixel-Props (redfin) that ensures fingerprinting.
- microG module if you chose vanilla variant (Safetynet works. Most of the banking apps work except gpay).
NOTE:
Flash custom kernels only through your custom recovery. Flashing through kernel managers (FKM, SPKM, etc) is not suggested.MAGISK NOT WORKING ?
In this case, the GSI you selected isn't securized (comes with su bydefault). Through TWRP, domount -o rw /dev/block/mapper/system_a /system_root
from terminal-
Code:
rm /system_root/system/xbin/su rm /system_root/system/bin/phh-su rm /system_root/system/etc/init/su.rc
- Or instead, you can use recovery's file manager to delete the above files. Then reboot.
EXTRAS
My Recommendations for great experience:- SPKM to set
GPU > GPU Governor > Performance
(fixes UI lags) - Lawnchair / Quickswitch for launcher customization with gesture navigation support.
- Lineage Dialer for built-in call recording (push into
/product/priv-app/Dialer/Dialer.apk
). - ANXCam for MIUI camera's post processing.
- GCam for google camera's post processing.
- Aurora Store / Droid for microg users.
- Kiwi Browser for chrome extensions support.
- Migrate to backup / restore user apps & data, incase you lose your setup.
Last edited: