2) unlock bootloader:
- allow bootloader unlocking (developer options => OEM unlocking option)
- then:
$ adb reboot bootloader
$ fastboot flashing unlock
$ fastboot reboot
note:
On some devices Android Verified Boot (AVB) is enabled. This means that installing TWRP or swiping to allow system modifications will prevent you from being able to boot. To disable AVB grab the vbmeta image from the ROM you are on, and flash it with the following command:
$ fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
3) install TWRP:
$ adb reboot bootloader
$ fastboot flash recovery twrp.img
$ fastboot reboot
note: Many devices will replace custom recovery automatically during first boot.
After typing
fastboot reboot, hold the key combo and boot to TWRP.
Once TWRP is booted, TWRP will patch the stock ROM to prevent the stock ROM from replacing TWRP.
If you don't follow this step, you will have to repeat the install.
4)
- mount => check
data,system, vendor, nvdata [,MicroSD card]- Advanced - File Manager => delete
/system_root/system/recovery_fromboot.p-
Advanced => Close AVB2.0
5) root:
- install MagiskManager .apk
- run it and update
- patch boot.img from the original Firmware (magisk manager => install magisk => open and patch file)
- flash the patched file:
$ adb reboot bootloader
$ fastboot flash boot patched_boot.img
$ fastboot reboot
- run Magisk Manager and finish Magisk instalation
6) install GSI via TWRP:
- wipe => advanced wipe
- install => image => system image
7) install open gapps .zip via TWRP