Alright guys I finally flashed a GSI on my Infinix Smart 5 X657C yesterday. It's Lineage OS 19 (a64 bvS), Android 12 (I'd been on XOS 6.2 Android 10 previously). I got screenshots
View attachment 5642989 View attachment 5642991 View attachment 5642999 View attachment 5643001 View attachment 5643003 View attachment 5643005Is the Gsi rooted? Or do will i still need to root it?
to prove that it's possible to root the device, if done correctly. I'm yet to flash phh-Magisk and orange-state disabler anyway (I wasn't sure A12 would even work in the first place)
You will need to provide more info. Firstly, on what Lineage OS build did you flash it (Vanilla or GApps?). What GApps package exactly did you flash? And what was your procedure in details?Help please! I flashed a gapps zip file using flashify on my infinix smart 5 x657 (Running on lineageos gsi android 12) then the phone just went off. and it not turning on. but it shows the charging indicator light when i connect it to power.
I've tried disconnecting the battery still nothing
what possible solution is there for this?
*Installed it on the vanilla buildYou will need to provide more info. Firstly, on what Lineage OS build did you flash it (Vanilla or GApps?). What GApps package exactly did you flash? And what was your procedure in details?
*Flashed the vanilla build, booted and ensured that root was working properly*Installed it on the vanilla build
*I flashed Bitgapps
*I tried to use flashify app to flash it but as soon as the process started the device just went off
Exactly all the steps I took.I
*Flashed the vanilla build, booted and ensured that root was working properly
*Downloaded the appropriate Flashify app, as well as the appropriate BitGApps package for your device
*Flashed the BitGApps package using Flashify
Be sure these are the steps you followed.
By the way, have you been able to recover from the brick?
Probably. You should try to reinstall the latest version of USB, VCOM & adb drivers (probably MTK Drivers too)I had usb driver installed
but I forgot to install Vcom driver
could this be the reason why it was not detected by the pc?
Was developer options & USB debugging enabled before the brick? If not, adb/fastboot commands won't work and SP Flash tool would be your only option. So you'd want to get your PC recognize the device, you could try to remove & reinstall all the USB drivers.Exactly all the steps I took.
And no I have not been able to recover from the brick.
The phone does not turn on neither does it boot into recovery and bootloader but the charging led comes on when I connect to the charger but nothing show on the screen!
I wanted to use Sp flash tool to flash the stock rom back but the device was not detected by the pc
I had usb driver installed
but I forgot to install Vcom driver
could this be the reason why it was not detected by the pc?
there no way to access fastboot nowProbably. You should try to reinstall the latest version of USB, VCOM & adb drivers (probably MTK Drivers too)
Was developer options & USB debugging enabled before the brick? If not, adb/fastboot commands won't work and SP Flash tool would be your only option. So you'd want to get your PC recognize the device, you could try to remove & reinstall all the USB drivers.
Someone once told me that he had a similar problem (of his device not being recognized by his PC), he waited for the battery to die out, then tried again.
If you flashed the GApps package on phh-Superuser (rather than Magisk) it's possible there was a compatibility problem. adb/fastboot remains the safest place to flash zips imo [given the device is rooted] because it usually either succeeds or fails. Anyway, you possibly CAN recover the device because it's not hard-bricked (you can tell since it shows the charging indicator light).
A very big thanks to you for this, VicKrypt 🫡. Thanks to you, I'm running on Lineage OS 19.1 currently.Method to root the Infinix Smart 5 X657C and/or install a custom OS
The following is a procedure to root this device and flash a GSI. I did this on the X657C model (on a PC), and the method to root should work on other models, as well as other similar Infinix/Tecno devices. To flash a GSI on other Infinix/Tecno devices, the device must have been shipped with Android 9 Pie or higher.
Remeber that I won't be held responsible for your actions. By reading this post in the first place I assume that you are an advanced user who has at least a basic understanding of rooting, custom ROMS & Generic System Images, the Command Line and some tech knowledge, so this won't be the most beginner-friendly. Proceed at your own risk!
This is a list of stuff you will need before you start messing with your phone:
1. Stock Firmware.
I got my device's complete ROM in a .zip format, which had to be extracted. And it must have the exact same model number as the phone, else a hardbrick!
2. Latest Platform Tools.
For running the commands that would do all the good stuff. Extract it to an easily accessible folder (I prefer to use C:\platform_tools)
3. Latest Magisk .apk
[You wouldn't ask what that's for, would you?]
4. Latest SP Flash tool
Finally, the Smartphone Flash Tool. This would come in handy if you eventually brick your phone
If you are looking to change the OS, you'd also need to download 2 additional things:
1. Treble Info checker app
2. The custom ROM (a GSI) you would install. It depends on the info you get from the Treble Info app above. I'll explain in details later on.
Let's start with the steps to root the device. I actually flashed the GSI before rooting with Magisk, and I'd rather you did that first if you want to get a rooted custom ROM.
In a nutshell, you would
1. Unlock the bootloader
2. Use magisk to patch the phone's boot image
3. Flash the patched boot image
Unlocking the bootloader
[This will erase all your data]
Go into your device's Settings > About Device > Build Number.
Tap on Build Number about 8 times to enable developer options.
Return to Settings > System > Developer Options.
In developer options, enable USB Debugging and OEM Unlocking.
Next, connect your device to your PC, open cmd in the platform tools folder and run the following commands (obviously without the '$', and you should understand the meanings of these commands!)
$ adb devices
Your device should show up
$ adb reboot bootloader
$ fastboot devices
Again, your device should show up before you continue.
$ fastboot flashing unlock
$ fastboot reboot
Your device comes up unlocked, and you go through the setup.
After that, re-enable Developer Options again as well as USB debugging and OEM Unlocking.
Using magisk to patch the phone's boot image
Install the Magisk.apk on your phone and copy your device's boot image from your stock ROM to your device's internal storage.
Open Magisk app on your phone, navigate to Install > Select and Patch a File > (Select the boot.img you copied).
Magisk patches the file and places it in your downloads folder.
Now it's time to place some files in the Platform Tools folder. The files will be:
1. Patched boot.img
Copy that patched file to your PC's Platform Tools folder and rename it to boot.img (pay attention to file extensions: not boot.img.img).
2. vbmeta files
Copy the vbmeta.img from your stock ROM into the Platform Tools folder. In my case, I had 3 files: vbmeta, vbmeta_system and vbmeta_vendor. I copied the 3 files.
Once you're done copying, connect your phone again to your PC, open up cmd in the platform tools folder and run the following commands:
$ adb devices
$ adb reboot bootloader
$ fastboot devices
Your device should show up before you proceed
Then you'd want to disable AVB
$ fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
As I said, in my case I had 2 other vbmeta files so I flashed 'em all too
$ fastboot --disable-verity --disable-verification flash vbmeta_system vbmeta_system.img
$ fastboot --disable-verity --disable-verification flash vbmeta_vendor vbmeta_vendor.img
Then you flash the patched image
$ fastboot flash boot boot.img
I'm not sure it was necessary, but I wiped data and cache just to be safe before rebooting
$ fastboot -w
$ fastboot reboot
Since I wiped data, I had to go through the process of setting up the phone and installing Magisk APK again. And ta-da, your phone would be rooted by now.
If for some reason the phone didn't boot up after wiping user data and cache, you can revert the changes by reflashing the stock boot.img.
To flash the GSI:
1. Make sure your device is Project Treble supported, and identify it's architecture all using the Treble Info app. As I stated earlier, if it it came with Android 9 Pie or higher it's probably certainly Project Treble supported.
2. The Treble Info app will also indicate the kind of GSI your device supports. In my case, it was an a64 vndk. So downloaded it and renamed it as 'system.img'.
You'd ensure you've unlocked your bootloader using the steps above.
After all that, place the system.img in the Platform Tools folder.
Connect your phone and start up cmd in the same folder and run the commands below to flash your new OS:
$ adb reboot bootloader
$ fastboot reboot fastboot
$ fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
Disable AVB on vendor and system, if you have those:
$ fastboot --disable-verity --disable-verification flash vbmeta_vendor vbmeta_vendor.img
$ fastboot --disable-verity --disable-verification flash vbmeta_system vbmeta_system.img
Boot into userspace fastboot
$ fastboot reboot fastboot
Delete product partition to free space
$ fastboot delete-logical-partition product
Wipe and flash the system partition with GSI
$ fastboot erase system
$ fastboot flash system system.img
Erase user data and cache, and reboot
$ fastboot -w
$ fastboot reboot
If anything goes wrong and it doesn't boot up, you can reflash the GSI again, or try another. I tested the Android 12 builds of LineageOS, AOSP and crDroid. I got a lotta issues with AOSP, and crDroid was a little heavy, so I stuck with Lineage OS and we remained happy ever after.
If you still get bootloops, flash the original system.img.
Else, you can now go ahead and root!
Give a thumbs up if this helps and Good luck!
at least drop the ROM link, thanksAlright guys I finally flashed a GSI on my Infinix Smart 5 X657C yesterday. It's Lineage OS 19 (a64 bvS), Android 12 (I'd been on XOS 6.2 Android 10 previously). I got screenshots
View attachment 5642989 View attachment 5642991 View attachment 5642999 View attachment 5643001 View attachment 5643003 View attachment 5643005
to prove that it's possible to root the device, if done correctly. I'm yet to flash phh-Magisk and orange-state disabler anyway (I wasn't sure A12 would even work in the first place)
Download & try out any ROM of your choice from the link
How did you create or get your boot.img drop link plsMethod to root the Infinix Smart 5 X657C and/or install a custom OS
The following is a procedure to root this device and flash a GSI. I did this on the X657C model (on a PC), and the method to root should work on other models, as well as other similar Infinix/Tecno devices. To flash a GSI on other Infinix/Tecno devices, the device must have been shipped with Android 9 Pie or higher.
Remeber that I won't be held responsible for your actions. By reading this post in the first place I assume that you are an advanced user who has at least a basic understanding of rooting, custom ROMS & Generic System Images, the Command Line and some tech knowledge, so this won't be the most beginner-friendly. Proceed at your own risk!
This is a list of stuff you will need before you start messing with your phone:
1. Stock Firmware.
I got my device's complete ROM in a .zip format, which had to be extracted. And it must have the exact same model number as the phone, else a hardbrick!
2. Latest Platform Tools.
For running the commands that would do all the good stuff. Extract it to an easily accessible folder (I prefer to use C:\platform_tools)
3. Latest Magisk .apk
[You wouldn't ask what that's for, would you?]
4. Latest SP Flash tool
Finally, the Smartphone Flash Tool. This would come in handy if you eventually brick your phone
If you are looking to change the OS, you'd also need to download 2 additional things:
1. Treble Info checker app
2. The custom ROM (a GSI) you would install. It depends on the info you get from the Treble Info app above. I'll explain in details later on.
Let's start with the steps to root the device. I actually flashed the GSI before rooting with Magisk, and I'd rather you did that first if you want to get a rooted custom ROM.
In a nutshell, you would
1. Unlock the bootloader
2. Use magisk to patch the phone's boot image
3. Flash the patched boot image
Unlocking the bootloader
[This will erase all your data]
Go into your device's Settings > About Device > Build Number.
Tap on Build Number about 8 times to enable developer options.
Return to Settings > System > Developer Options.
In developer options, enable USB Debugging and OEM Unlocking.
Next, connect your device to your PC, open cmd in the platform tools folder and run the following commands (obviously without the '$', and you should understand the meanings of these commands!)
$ adb devices
Your device should show up
$ adb reboot bootloader
$ fastboot devices
Again, your device should show up before you continue.
$ fastboot flashing unlock
$ fastboot reboot
Your device comes up unlocked, and you go through the setup.
After that, re-enable Developer Options again as well as USB debugging and OEM Unlocking.
Using magisk to patch the phone's boot image
Install the Magisk.apk on your phone and copy your device's boot image from your stock ROM to your device's internal storage.
Open Magisk app on your phone, navigate to Install > Select and Patch a File > (Select the boot.img you copied).
Magisk patches the file and places it in your downloads folder.
Now it's time to place some files in the Platform Tools folder. The files will be:
1. Patched boot.img
Copy that patched file to your PC's Platform Tools folder and rename it to boot.img (pay attention to file extensions: not boot.img.img).
2. vbmeta files
Copy the vbmeta.img from your stock ROM into the Platform Tools folder. In my case, I had 3 files: vbmeta, vbmeta_system and vbmeta_vendor. I copied the 3 files.
Once you're done copying, connect your phone again to your PC, open up cmd in the platform tools folder and run the following commands:
$ adb devices
$ adb reboot bootloader
$ fastboot devices
Your device should show up before you proceed
Then you'd want to disable AVB
$ fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
As I said, in my case I had 2 other vbmeta files so I flashed 'em all too
$ fastboot --disable-verity --disable-verification flash vbmeta_system vbmeta_system.img
$ fastboot --disable-verity --disable-verification flash vbmeta_vendor vbmeta_vendor.img
Then you flash the patched image
$ fastboot flash boot boot.img
I'm not sure it was necessary, but I wiped data and cache just to be safe before rebooting
$ fastboot -w
$ fastboot reboot
Since I wiped data, I had to go through the process of setting up the phone and installing Magisk APK again. And ta-da, your phone would be rooted by now.
If for some reason the phone didn't boot up after wiping user data and cache, you can revert the changes by reflashing the stock boot.img.
To flash the GSI:
1. Make sure your device is Project Treble supported, and identify it's architecture all using the Treble Info app. As I stated earlier, if it it came with Android 9 Pie or higher it's probably certainly Project Treble supported.
2. The Treble Info app will also indicate the kind of GSI your device supports. In my case, it was an a64 vndk. So downloaded it and renamed it as 'system.img'.
You'd ensure you've unlocked your bootloader using the steps above.
After all that, place the system.img in the Platform Tools folder.
Connect your phone and start up cmd in the same folder and run the commands below to flash your new OS:
$ adb reboot bootloader
$ fastboot reboot fastboot
$ fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
Disable AVB on vendor and system, if you have those:
$ fastboot --disable-verity --disable-verification flash vbmeta_vendor vbmeta_vendor.img
$ fastboot --disable-verity --disable-verification flash vbmeta_system vbmeta_system.img
Boot into userspace fastboot
$ fastboot reboot fastboot
Delete product partition to free space
$ fastboot delete-logical-partition product
Wipe and flash the system partition with GSI
$ fastboot erase system
$ fastboot flash system system.img
Erase user data and cache, and reboot
$ fastboot -w
$ fastboot reboot
If anything goes wrong and it doesn't boot up, you can reflash the GSI again, or try another. I tested the Android 12 builds of LineageOS, AOSP and crDroid. I got a lotta issues with AOSP, and crDroid was a little heavy, so I stuck with Lineage OS and we remained happy ever after.
If you still get bootloops, flash the original system.img.
Else, you can now go ahead and root!
Give a thumbs up if this helps and Good luck!
hey bro how do you do infinix smart 5 custom Rom without Twrp can you tell me? or send your telegram name for more details.I WOULD LIKE A CUSTOM ROMAlright guys I finally flashed a GSI on my Infinix Smart 5 X657C yesterday. It's Lineage OS 19 (a64 bvS), Android 12 (I'd been on XOS 6.2 Android 10 previously). I got screenshots
View attachment 5642989 View attachment 5642991 View attachment 5642999 View attachment 5643001 View attachment 5643003 View attachment 5643005
to prove that it's possible to root the device, if done correctly. I'm yet to flash phh-Magisk and orange-state disabler anyway (I wasn't sure A12 would even work in the first place)
You'd get it from your stock ROM. Download your stock ROM, making sure it has the exact model number as that of your phone. The boot.img will be found in the downloaded zip.
You have to search online for the specific build that has (last) build number of the phone's stock OS. "X657B MTK6721" isn't the build number.While rooting my Infinix hot 10 lite, the phone stuck at the logo.
I have tried by all possible means to make a new flash of the rom but all the ones that I have tried have not worked for me.
The processor is X657B MTK6721
Are you talking about making a custom ROM, or just flashing already-made custom ROMs (GSIs in this case)? For the former, I have no experience in making a custom ROM, you'd have to do some serious research on that.
system-squeak-arm32_binder64-ab-vndklite-gogapps.img.xzMethod to root the Infinix Smart 5 X657C and/or install a custom OS
The following is a procedure to root this device and flash a GSI. I did this on the X657C model (on a PC), and the method to root should work on other models, as well as other similar Infinix/Tecno devices. To flash a GSI on other Infinix/Tecno devices, the device must have been shipped with Android 9 Pie or higher.
Remeber that I won't be held responsible for your actions. By reading this post in the first place I assume that you are an advanced user who has at least a basic understanding of rooting, custom ROMS & Generic System Images, the Command Line and some tech knowledge, so this won't be the most beginner-friendly. Proceed at your own risk!
This is a list of stuff you will need before you start messing with your phone:
1. Stock Firmware.
I got my device's complete ROM in a .zip format, which had to be extracted. And it must have the exact same model number as the phone, else a hardbrick!
2. Latest Platform Tools.
For running the commands that would do all the good stuff. Extract it to an easily accessible folder (I prefer to use C:\platform_tools)
3. Latest Magisk .apk
[You wouldn't ask what that's for, would you?]
4. Latest SP Flash tool
Finally, the Smartphone Flash Tool. This would come in handy if you eventually brick your phone
If you are looking to change the OS, you'd also need to download 2 additional things:
1. Treble Info checker app
2. The custom ROM (a GSI) you would install. It depends on the info you get from the Treble Info app above. I'll explain in details later on.
Let's start with the steps to root the device. I actually flashed the GSI before rooting with Magisk, and I'd rather you did that first if you want to get a rooted custom ROM.
In a nutshell, you would
1. Unlock the bootloader
2. Use magisk to patch the phone's boot image
3. Flash the patched boot image
Unlocking the bootloader
[This will erase all your data]
Go into your device's Settings > About Device > Build Number.
Tap on Build Number about 8 times to enable developer options.
Return to Settings > System > Developer Options.
In developer options, enable USB Debugging and OEM Unlocking.
Next, connect your device to your PC, open cmd in the platform tools folder and run the following commands (obviously without the '$', and you should understand the meanings of these commands!)
$ adb devices
Your device should show up
$ adb reboot bootloader
$ fastboot devices
Again, your device should show up before you continue.
$ fastboot flashing unlock
$ fastboot reboot
Your device comes up unlocked, and you go through the setup.
After that, re-enable Developer Options again as well as USB debugging and OEM Unlocking.
Using magisk to patch the phone's boot image
Install the Magisk.apk on your phone and copy your device's boot image from your stock ROM to your device's internal storage.
Open Magisk app on your phone, navigate to Install > Select and Patch a File > (Select the boot.img you copied).
Magisk patches the file and places it in your downloads folder.
Now it's time to place some files in the Platform Tools folder. The files will be:
1. Patched boot.img
Copy that patched file to your PC's Platform Tools folder and rename it to boot.img (pay attention to file extensions: not boot.img.img).
2. vbmeta files
Copy the vbmeta.img from your stock ROM into the Platform Tools folder. In my case, I had 3 files: vbmeta, vbmeta_system and vbmeta_vendor. I copied the 3 files.
Once you're done copying, connect your phone again to your PC, open up cmd in the platform tools folder and run the following commands:
$ adb devices
$ adb reboot bootloader
$ fastboot devices
Your device should show up before you proceed
Then you'd want to disable AVB
$ fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
As I said, in my case I had 2 other vbmeta files so I flashed 'em all too
$ fastboot --disable-verity --disable-verification flash vbmeta_system vbmeta_system.img
$ fastboot --disable-verity --disable-verification flash vbmeta_vendor vbmeta_vendor.img
Then you flash the patched image
$ fastboot flash boot boot.img
I'm not sure it was necessary, but I wiped data and cache just to be safe before rebooting
$ fastboot -w
$ fastboot reboot
Since I wiped data, I had to go through the process of setting up the phone and installing Magisk APK again. And ta-da, your phone would be rooted by now.
If for some reason the phone didn't boot up after wiping user data and cache, you can revert the changes by reflashing the stock boot.img.
To flash the GSI:
1. Make sure your device is Project Treble supported, and identify it's architecture all using the Treble Info app. As I stated earlier, if it it came with Android 9 Pie or higher it's probably certainly Project Treble supported.
2. The Treble Info app will also indicate the kind of GSI your device supports. In my case, it was an a64 vndk. So downloaded it and renamed it as 'system.img'.
You'd ensure you've unlocked your bootloader using the steps above.
After all that, place the system.img in the Platform Tools folder.
Connect your phone and start up cmd in the same folder and run the commands below to flash your new OS:
$ adb reboot bootloader
$ fastboot reboot fastboot
$ fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
Disable AVB on vendor and system, if you have those:
$ fastboot --disable-verity --disable-verification flash vbmeta_vendor vbmeta_vendor.img
$ fastboot --disable-verity --disable-verification flash vbmeta_system vbmeta_system.img
Boot into userspace fastboot
$ fastboot reboot fastboot
Delete product partition to free space
$ fastboot delete-logical-partition product
Wipe and flash the system partition with GSI
$ fastboot erase system
$ fastboot flash system system.img
Erase user data and cache, and reboot
$ fastboot -w
$ fastboot reboot
If anything goes wrong and it doesn't boot up, you can reflash the GSI again, or try another. I tested the Android 12 builds of LineageOS, AOSP and crDroid. I got a lotta issues with AOSP, and crDroid was a little heavy, so I stuck with Lineage OS and we remained happy ever after.
If you still get bootloops, flash the original system.img.
Else, you can now go ahead and root!
Give a thumbs up if this helps and Good luck!
Sorry for the late reply. Following the attached screenshot the GSI is supported.system-squeak-arm32_binder64-ab-vndklite-gogapps.img.xz
Does it support infinix smart 6 x657B, please help, thank you
I have been searching for it's twrp but have not been able to get it so incase you do inform me pleaseAny one working on a twrp recovery for infinix smart 5 x657?
I need of it.thanks
A very big thanks to you for this, VicKrypt 🫡. Thanks to you, I'm running on Lineage OS 19.1 currently.Method to root the Infinix Smart 5 X657C and/or install a custom OS
The following is a procedure to root this device and flash a GSI. I did this on the X657C model (on a PC), and the method to root should work on other models, as well as other similar Infinix/Tecno devices. To flash a GSI on other Infinix/Tecno devices, the device must have been shipped with Android 9 Pie or higher.
Remeber that I won't be held responsible for your actions. By reading this post in the first place I assume that you are an advanced user who has at least a basic understanding of rooting, custom ROMS & Generic System Images, the Command Line and some tech knowledge, so this won't be the most beginner-friendly. Proceed at your own risk!
This is a list of stuff you will need before you start messing with your phone:
1. Stock Firmware.
I got my device's complete ROM in a .zip format, which had to be extracted. And it must have the exact same model number as the phone, else a hardbrick!
2. Latest Platform Tools.
For running the commands that would do all the good stuff. Extract it to an easily accessible folder (I prefer to use C:\platform_tools)
3. Latest Magisk .apk
[You wouldn't ask what that's for, would you?]
4. Latest SP Flash tool
Finally, the Smartphone Flash Tool. This would come in handy if you eventually brick your phone
If you are looking to change the OS, you'd also need to download 2 additional things:
1. Treble Info checker app
2. The custom ROM (a GSI) you would install. It depends on the info you get from the Treble Info app above. I'll explain in details later on.
Let's start with the steps to root the device. I actually flashed the GSI before rooting with Magisk, and I'd rather you did that first if you want to get a rooted custom ROM.
In a nutshell, you would
1. Unlock the bootloader
2. Use magisk to patch the phone's boot image
3. Flash the patched boot image
Unlocking the bootloader
[This will erase all your data]
Go into your device's Settings > About Device > Build Number.
Tap on Build Number about 8 times to enable developer options.
Return to Settings > System > Developer Options.
In developer options, enable USB Debugging and OEM Unlocking.
Next, connect your device to your PC, open cmd in the platform tools folder and run the following commands (obviously without the '$', and you should understand the meanings of these commands!)
$ adb devices
Your device should show up
$ adb reboot bootloader
$ fastboot devices
Again, your device should show up before you continue.
$ fastboot flashing unlock
$ fastboot reboot
Your device comes up unlocked, and you go through the setup.
After that, re-enable Developer Options again as well as USB debugging and OEM Unlocking.
Using magisk to patch the phone's boot image
Install the Magisk.apk on your phone and copy your device's boot image from your stock ROM to your device's internal storage.
Open Magisk app on your phone, navigate to Install > Select and Patch a File > (Select the boot.img you copied).
Magisk patches the file and places it in your downloads folder.
Now it's time to place some files in the Platform Tools folder. The files will be:
1. Patched boot.img
Copy that patched file to your PC's Platform Tools folder and rename it to boot.img (pay attention to file extensions: not boot.img.img).
2. vbmeta files
Copy the vbmeta.img from your stock ROM into the Platform Tools folder. In my case, I had 3 files: vbmeta, vbmeta_system and vbmeta_vendor. I copied the 3 files.
Once you're done copying, connect your phone again to your PC, open up cmd in the platform tools folder and run the following commands:
$ adb devices
$ adb reboot bootloader
$ fastboot devices
Your device should show up before you proceed
Then you'd want to disable AVB
$ fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
As I said, in my case I had 2 other vbmeta files so I flashed 'em all too
$ fastboot --disable-verity --disable-verification flash vbmeta_system vbmeta_system.img
$ fastboot --disable-verity --disable-verification flash vbmeta_vendor vbmeta_vendor.img
Then you flash the patched image
$ fastboot flash boot boot.img
I'm not sure it was necessary, but I wiped data and cache just to be safe before rebooting
$ fastboot -w
$ fastboot reboot
Since I wiped data, I had to go through the process of setting up the phone and installing Magisk APK again. And ta-da, your phone would be rooted by now.
If for some reason the phone didn't boot up after wiping user data and cache, you can revert the changes by reflashing the stock boot.img.
To flash the GSI:
1. Make sure your device is Project Treble supported, and identify it's architecture all using the Treble Info app. As I stated earlier, if it it came with Android 9 Pie or higher it's probably certainly Project Treble supported.
2. The Treble Info app will also indicate the kind of GSI your device supports. In my case, it was an a64 vndk. So downloaded it and renamed it as 'system.img'.
You'd ensure you've unlocked your bootloader using the steps above.
After all that, place the system.img in the Platform Tools folder.
Connect your phone and start up cmd in the same folder and run the commands below to flash your new OS:
$ adb reboot bootloader
$ fastboot reboot fastboot
$ fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
Disable AVB on vendor and system, if you have those:
$ fastboot --disable-verity --disable-verification flash vbmeta_vendor vbmeta_vendor.img
$ fastboot --disable-verity --disable-verification flash vbmeta_system vbmeta_system.img
Boot into userspace fastboot
$ fastboot reboot fastboot
Delete product partition to free space
$ fastboot delete-logical-partition product
Wipe and flash the system partition with GSI
$ fastboot erase system
$ fastboot flash system system.img
Erase user data and cache, and reboot
$ fastboot -w
$ fastboot reboot
If anything goes wrong and it doesn't boot up, you can reflash the GSI again, or try another. I tested the Android 12 builds of LineageOS, AOSP and crDroid. I got a lotta issues with AOSP, and crDroid was a little heavy, so I stuck with Lineage OS and we remained happy ever after.
If you still get bootloops, flash the original system.img.
Else, you can now go ahead and root!
Give a thumbs up if this helps and Good luck!
Download & try out any ROM of your choice from the link