[Samsung Galaxy Tab A8 (2021)] SamDaaEpic:
Please first of all know that I'm not, in any way, responsible for any bricked device and also know that after you unlock your device's bootloader, your warrenty will be VOID.

Please DO NOT EVER PATCH the AP TARBALL using MAGISK. That will generate a BLANK VBMETA that this Device's bootloader doesn't like and it can SOFT BRICK your device.

If you already flashed a TARBALL Patched with MAGISK and your device got SOFT BRICKED i.e It rebooted 3-4 times to a error screen and then it got completely shutdown with a fully black screen and not turning on, then Just don't plug your device on charge and wait for at least around 7 days for its battery to dry out and then plug it in your computer while holding the VolumeUp+VolumeDown button and it should boot into DL mode and you can recover your Tab From there.

Also Please know that on SM-X205 (Samsung Galaxy Tab A8 LTE) Rooting causes the device to automatically reboot after every 5 minutes of boot up time on Android 13 GSI's. So if you are using SM-X205, only root Android 12 and 12.1 GSI's. (Rooting One UI Doesn't have any rebooting issues)

This issue has been fixed in the Android 14 GSI's.

So there are two ways as of right now to root this device i.e.​

Flash Magisk using TWRP

Patch the Stock boot.img with the Magisk App and flash it with Odin/Heimdall/fastboot

Flash Magisk using TWRP(Recommended)​

Download Magisk APK from github and also MultiDisabler from here.

Move both of them over to a Thumb Drive/sdcard or you can do anything else, we just want to be able to access the Magisk.apk and Multidisabler.zip file in TWRP(because the /data partition is encrypted, So you can't use that in twrp).

Download the TWRP Tar File from here

Flash it in the AP section of Odin with auto-reboot in options tab disabled.

To boot into twrp Hold Down the Power+VolumeDown button while in DL Mode and as soon as the screen goes blank hold the Power-VolumeUp button and the device should boot into TWRP

After booted into twrp, go to INSTALL tab and Click on SELECT STORAGE and select the USB OTG or MICRO SD CARD depending on which thing you put the MultiDisabler.zip and Magisk.apk on.

Now Locate the MultiDisabler.zip file in your thumbdrive/sdcard and flash it. After that's done also locate Magisk.apk and flash it(while flashing it should show some mounting errors, but don't worry about that).

After the flashing is done, click Reboot to System and after the device is booted Open the Magisk App, Click Next and click on DIRECT INSTALL and click next, After the installation is finished, reboot the device. Now your device should be rooted.

Patch the stock boot.img(Not Recommended)​

Get the stock boot.img​

There are two ways to get the Stock boot.img i.e.

Extracting it from the AP TarBall​

Download the exact Firmware Version that your device currently has from SamFw/Frija or any other source.(You Can find that in the About Page In settings).

Extract the zip file and there should be four of five files namely BL, AP, CP, CSC and CSC_HOME. We only need the AP file.

Open the AP file in WinRar or xarchiver in linux. After its opened up extract only the boot.img from the Tar file and keep it in a safe place.

Getting it with adb (A UserDebug GSI REQUIRED)​

If you're running A UserDebug GSI (Which most of the GSI's are) your Device is actually rooted but it can't be used by application but you can use the root with adb.

To get root access enable developer options and in developer options enable rooted debuging and plug your device into your computer.

Then do

adb root

and get into the shell with

adb shell

And to get the Stock boot.img just do

dd if=/dev/block/by-name/boot of=/sdcard/Download/boot.img && exit

Now to get the boot.img on your computer do

adb pull /sdcard/Download/boot.img ./boot.img

Patch and Flash the boot.img​

Download the Magisk APK and install it on your device.

Open up Magisk and click on install, and then it should show select and patch vbmeta, don't do anything in that and click next, now the next option will be select and patch boot file, click on that and then select the Stock boot.img and click next to patch the file. A output file should be generated in your downloads folder named magisk_patched-26100_XXXXX.img.

Now Copy that file over to your computer by any means you can or you can use adb pull to get the file from your device by doing (make sure to replace the file name with yours exactly)

adb pull /sdcard/Download/magisk_patched-26100_XXXXX.img ./

Make a tar file of the Patched boot.img file with WinRAR or any other software.

Now after you've got the file, reboot the device into DL Mode by holding down the VolumeUp+VolumeDown button while the device is powered off and plug it into your computer.

Flash the tar file in AP in odin and now your device should be rooted.

If in case you don't have Odin and to use heimdall on linux just do (Again replace the file name with yours exactly)

heimdall flash --boot magisk_patched-26100_XXXXX.img