[Moto G40 / G60] lofi2op:
I'M NOT AT ALL RECOMMENDING Y'ALL TO TRY THIS OUT ! CUSTOM ROMS WILL COME SOON WHICH IS FAR BETTER THAN GSIs

PLEASE FOLLOW THIS GUIDE AT YOUR OWN RISK !, THIS GUIDE MIGHT BE THE SAME FOR MOST DEVICES BUT IM SPECIFICALLY MAKING THIS FOR G40 FUSION / G60

GSI IS NOT MADE SPECIFICALLY FOR A DEVICE THEREFORE IT MAY DAMAGE YOUR DEVICE AND IM NOT RESPONSIBLE FOR ANY DAMAGE TO YOUR DEVICE, SO DON'T BLAME ME IN THE END !

TO FLASH GSI THROUGH FASTBOOT BOOTLOADER NEEDS TO BE UNLOCKED AND YOU WILL NEED A PC/LAP WITH PLATFORM-TOOLS (ADB & FASTBOOT)

IF UR RUNNING A CMD FROM 'PLATFORM-TOOLS' FOLDER, YOU MIGHT WANT TO ADD ./ BEFORE TYPING ADB/FASTBOOT FOR EVERY COMMAND

GET THE LATEST PLATFORM-TOOLS FROM HERE.

OK, So First Step will be to download a GSI, and for that my go-to places will be NipponGSI or GSITutorials.

Try not to go for MIUI or OOS GSI because they never booted when i tried them ( it will be a waste of time, but u can still try if u want to )

Now the files from NipponGSI will be in a img.gz, just extract it using rar/7zip whereas when extracting the downloaded file from GSITutorials, it shall come as a folder. just take the system.img and vbmeta.img

Store the .img files inside the 'platform-tools' folder & rename it something that u can type easily so that u wont have to worry later. ( For Users who downloaded the GSI from GSITutorials, copy both the system.img and vbmeta.img to platform-tools and u wont need to rename it since its already in a easy-to-type manner )

Now that you have all the files set up, reboot your mobile phone to fastboot by powering off your phone then pressing both Power Button + Volume Down Button together until a fastboot until a "belly-open android" image comes with many text below it.

Open your 'platform-tools', if you're in Windows ( which presumably most ppl would be ) just run Command Prompt as Admin and type cd "path to your platfrom-tools folder" and click enter and now type ur adb/fastboot commands. ( this should be done everytime u want to use adb )

Now that you have opened platform-tools and have it all ready, connect ur mobile to the computer/laptop via USB Cable and then type fastboot reboot fastboot.

( ik, you might think this step is silly but in G40F/G60 and many other devices there's a fastboot and a fastbootd. and the one we are in now is fastboot and the one we will go to after entering the command will be fastbootd )

Now that you're in fastbootd, just type and enter fastboot --disable-verification flash vbmeta vbmeta.img reboot fastboot, ( ppl who used GSI from NipponGSI need to have a vbmeta.img for this command to work, which i'll have attached below. just download and copy that file to platform-tools directory )

Now after the fastboot has rebooted back to fastboot, type fastboot erase system flash system "name of the gsi/img file".img reboot recovery ( for GSIs from GSITutorials, it should be system.img, for GSIs from NipponGSI it would be a long name which you can rename like said in 3rd step ), Edit : You've must type this command " fastboot delete-logical-partition product_a " before you do the above command when you do this for the first time, else you'll get an error saying " FAILED (remote: 'Not enough space to resize partition') "

You will end up in a screen with an image of an "Android with belly open with a warning symbol" and a text saying "No Command", this is the recovery. Just hold the power button and press volume up button once to get all the options in the recovery, now use ur volume buttons and navigate to Wipe data/factory reset and press power button once, again navigate to Factory data reset and press power button once. ( You have now done the alternative for fastboot -w, which doesnt work in motorola devices as their partitions are not supported by platform-tools )

After you've did the above step, navigate to Reboot system now and press power button once and then your phone would reboot to your installed GSI, if it fails to boot then you dont have to worry, you can always revert back to the stock rom using LMSA which unfortunately wouldn't be applicable to users in OS other than Windows

USING LMSA TO REVERT BACK TO STOCK ROM

Just install LMSA and connect ur device to computer while ur phone is in fastboot mode ( power + volume down ), and the device will be automatically recognized and just click on "Rescue my Device" and follow their instructions and ur device will be back to stock rom ( Internet connection needed with capacity to download 2/3gb of firmware )

HOPE IT HELPS,