[LG G8 Guides, News, & Discussion] BrandonB1218:
Step 4A, Magisk Flashing:

The next step is to flash the appropriate Magisk patched boot image for your firmware version. The following commands needs to be changed based on which slot your 20[a,b,c,d,e] firmware is located, and which patched image you’re flashing. For example, if 20d is in slot A, you will use “boot_a”, if it’s in slot B, you will use “boot_b”. Likewise, if 20d is in slot A, you will use “fastboot --set-active=a”, if it’s in slot B, you will use “fastboot --set-active=b”. Note: That’s a double dash before “set”.

fastboot flash boot_a sprint20d_magisk_patched.img

fastboot --set-active=a

Select power off, press the power button to confirm selection. It may take upwards of 10 – 20 seconds to get the phone to turn back on after powering off. This is normal. Boot to Android. If you have a successful boot, skip the initial setup and proceed to “Step 5, Finishing Up”.

Step 4B, Flashing 20d:

I’m leaving this step here in case it is needed. After some testing, we have determined that no stability problems occur as long as you flash a patched boot image that matches your current firmware version. Currently we have patched 20d and 20e boot images available.

For this step, you will need the 20d backup found in “Step 3A, Bootloader Unlocking”. As mentioned before, the _a images are 20d, the _b images are pie. You will only need the _a 20d images for this step.

This cannot be skipped if you are on anything other than 20d. You will have severe system problems IF it even boots at all. The process is straight forward, just slightly time consuming. Lets begin.

Extract the _a 20d images in the g820um20d.zip to your root Android folder containing your platform tools. Each and every image will need to be flashed, in no particular order. Just sort by file type and start from the top. The image file names directly correlate to the partition you are flashing to, for example: abl_a.img will be flashed to abl_a, and so on.

The following fastboot flash commands will need to be changed based on your primary slot letter (the slot that does NOT contain the engineering bootloader). For example, if that happens to be slot B, you will use fastboot flash abl_b abl_a.img, and so on.

fastboot flash abl_a abl_a.img

fastboot flash akmu_a akmu_a.img

And so on, it’s that simple. The only exception is the boot image. You will NOT flash the boot_a image, you will flash the Sprint20D magisk patched image instead.

Once complete execute the following:

fastboot erase userdata

fastboot --set-active=a or --set-active=b based on your primary slot letter.

Select power off, press the power button to confirm selection. It may take upwards of 10 – 20 seconds to get the phone to turn back on after powering off. This is normal. Boot to Android. If you have a successful boot, skip the initial setup and proceed to “Step 5, Finishing Up”.

Step 5, Finishing Up:

In this step we will flash TWRP, reboot to recovery, flash Magisk and dm-verity disabler. An SD card is recommended but not required for this step.

Copy the Disable_Dm-Verity zip, Magisk-v20.4.zip, and the twrp-installer zip to your SD card. Preferably to the Download folder. If you’re using internal storage only, you will move these files to the phone after you data wipe in TWRP.

Download the latest version of the Magisk Manager APK and install it.

Once installed, open Magisk Manager. It will ask you to perform additional setup. Allow it. The phone will reboot automatically. After the reboot, open Magisk Manager once more, tap on the 3 horizontal bars on the top left, and select Modules.

Tap the Plus sign and select the twrp-installer zip. This will flash TWRP. Note that in doing so, this will remove Magisk from the boot image. This is fine.

Shut down the phone and boot to recovery via the key combination. Hold volume down and power until you see Recovery mode flash on screen, you may release the buttons after you see this. You should now be in TWRP. Tap cancel when it asks for a password. Go to Wipe > Advanced > Select data (and only data), and wipe. Reboot the phone back to recovery. Do not let the system boot after data wiping. Go directly back to TWRP. You will NOT brick, however you will have to data wipe and reboot again.

After you’re back in TWRP, it should no longer be asking you for a password. This is good, it means we have removed the encryption.

Next, tap Install. Flash in this order Magisk-v20.4.zip, followed by a reboot directly to TWRP. Next, flash Disable_Dm-Verity. Reboot to system. Continue setup as normal.

Congratulations! You are now bootloader unlocked and rooted.

Bonus: Pie Slot:

As mentioned in “Step 3A, Bootloader Unlocking”, if you do not have a Pie slot, you can flash the Pie images in the zip mentioned in the same step via fastboot flash, the same way you (may have) flashed 20d in “Step 4B, Flashing 20d”. The only difference is you will be flashing all of the _b images except for abl, xbl, and xbl_config to the slot containing the engineering bootloader. You must fastboot erase userdata after flashing the Pie images. Once complete, simply reboot and you should have a bootable Pie slot. Please note that the V50 engineering bootloader prevents the touch screen from working in Pie.