[Motorola Edge 20 Pro] LSS4181:
First of all, thanks to ilia3367 for his Pure Edition ROM which contains some very useful stuffs for flashing and booting GSI.

/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in the GSI
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

What you need

1. Unlocked bootloader

Follow this guide to unlock bootloader. In overall, the unlock process is not as difficult compared to other brands, provided your device is eligible to unlock.

WARNING: The following steps assume you have already unlocked your bootloader. If you haven't unlocked your bootloader yet, or your device isn't eligible, DO NOT PROCEED.

2. fastboot

The process utilizes fastboot exclusively, so make sure you have fastboot installed.

3. A Magisk patched boot.img.

You can either patch it yourself using Magisk Manager, or use boot_magisk.img from Pure Edition ROM.

Although you should be able to use GSI without Magisk, you'll probably need to patch vbmeta (or vbmeta_system) so the stock kernel won't refuse to boot the GSI in this case. This guide does not cover non-Magisk scenario for now, as I'm not entirely sure. With Magisk, patching vbmeta is not needed.

4. A backup of factory images in case something goes wrong.

The factory image (both S and 20 Pro) can be found in the Pure Edition ROM thread as well.

Steps to flash GSI

1. Enter fastboot

Hold down both POWER and VOL- to enter fastboot mode.

Or you can use the following adb command to do so.

adb reboot bootloader

2. Enter fastbootd

Enter the following command to enter fastbootd, where you can actually access the system partitions, as this phone uses Dynamic Paritions.

fastboot reboot fastboot

WARNING: The following steps will actually modify your system partitions and may leave your phone unbootable. Make sure you have backed up everything before proceeding.

3. Flash Magisk patched boot.img

Assume you have the Magisk patched boot.img as boot_magisk.img, enter the following command.

fastboot flash boot boot_magisk.img

Note that you can also flash boot.img directly from fastboot, before entering fastbootd.

4. Remove the product partition

The phone's system partition is very small (about 1GB), but has a very big product partition (about 2.7GB). You'll get an error if you try to flash the GSI right away, as the super partition does not have enough room to resize the system partition to hold the GSI image if it's too large.

As the product partition is not useful for GSIs, it can be safely removed. Enter the following commands.

fastboot erase product
fastboot resize-logical-partition product_a 0x0

This will erase the stuffs in the product partition and set its size to zero, so the system partition would be able to claim its space when resizing.

You can always use the following command to check bootloader variables.

fastboot getvar all

In this case, check if the product_a partition has indeed been resized to zero. If yes, you can proceed.

(bootloader) partition-size:product_a:0x0

5. Flashing the GSI

Enter the following commands.

fastboot erase system
fastboot flash system gsi.img

Note that the erase command is optional. Replace gsi.img with the actual GSI image file of your choice.

6. Wipe userdata if needed

You don't need to wipe userdata if you are dirty flashing newer build of a same GSI over the existing one.

In case you need to do so (such as flashing a different GSI, or factory reset), enter the following commands.

WARNING: These commands will erase everything in the internal storage, not just app data! Make sure you have everything in the internal storage backed up before doing this. You may try this unofficial TWRP for this device if you want to perform factory reset while keeping your files, as well as creating a nandroid backup.

fastboot erase userdata
fastboot erase metadata

7. Reboot

Enter the following command to reboot.

fastboot reboot

If nothing goes wrong and the GSI doesn't have any major issue that might prevent it from successfully booting, you should be able to boot the GSI and further configure it yourself.