[Miscellaneous Android Development] TouchOdeath:
Here is a tutorial on how to root:

1. Burn the ISO provided by OP to a USB stick.

2. Boot to the USB.

3. Now the key thing to know is, after each command you type, you'll have to make sure you let the command finish, or you cancel it correctly, or else you'll have to re-put yourself in brom mode (See J.).

A. Pull up Terminal and navigate to folder:

cd /opt/mtkclient

All commands will be ran from this folder

B. With phone unplugged from USB, type command

python mtk_gui

C. It will keep running a loop in terminal until you plug your phone in and put it in brom mode. So you can take your time.

D. Go to Settings/Additional settings/Developer options, enable "OEM unlock" and "USB Debugging"

E. Power off phone with USB unplugged.

F. Hold both volume buttons, and plug in USB

G. Brom mode takes like.. literally 1 to 2 seconds to actually get into it. The phone screen should not turn on, this is good.

H. You will see the text change in terminal it will say 'Device Detected', then you can let go of the volume buttons.

I. Now that you have figured out how to get into brom mode with the terminal, the command:

python mtk_gui

is now trash. you will never use it again.

J. To close out of the mtk_GUI properly, click the 'X' in the upper right part of the GUI. If you do this, your brom should be good.

K. If the command finishes, brom mode should be back to normal. If brom gets out of wack, run a valid command in terminal, unplug USB, plug USB + Volume keys for 1 to 2 seconds and you should see 'Device Detected' in Terminal to tell you your in brom mode..

L. To summarize: open terminal, run command, plug in phone, watch it connect, run command, wait for command to finish. Repeat.

4. Now actual rooting.

A. ALERT!! ALERT!! DRAGONS!! Backup partitions we are going to be messing with just incase something goes wrong. Make sure you save it in a partition location thats NOT apart of the USB (otherwise it won't be saved. You'll reboot and the saved files will be gone)

python mtk r boot,lk,vbmeta boot.img,lk.img,vbmeta.img

B. This will create boot.img, lk.img, and vbmeta.img in /opt/mtkclient directory. You'll need to copy those somewhere else, as anything in the /opt/mtkclient directory will not be saved on reboot (or any other USB stick directories).

B.1. You can skip Steps, C, E, F, some of G if you use have the same BUILD# as mateo121212's then you can (and probably should) use his boot.p.img and lk.p.img files he graciously uploaded to us.​

C. Boot into android, adb push your saved boot.img onto the phone somewhere. install magisk apk

D. Open magisk, click 'install', when you click 'next' it will ask you for a file, which you will give it the boot.img that we created in step B.

E. When magisk finishes, it will output a file 'magisk_patched-*.img', meaning magisk injected itself into the boot partition img file. We are going to Rename it to 'boot.patched.img' and write back to the phone. Patch lk.img with a hex editor if you don't want the screen to say 'Orange State' message and name it lk.patched.img. If you don't care about the message then I don't think you have to mess with the lk partition at all.)

F. Now we are going to use the 'boot.patched.img' that was given to us by magisk (or mateo121212). The correct vbmeta.img.empty is already located in the /opt/mtkclient folder by default, so you have everything you need at this point.

G. Boot back into ISO and write the boot.patched.img and lk.patched.img (or boot.p.img and lk.p.img)

If you have a lk.patched.img:

python mtk w boot,lk,vbmeta boot.patched.img,lk.patched.img,vbmeta.img.empty

If you don't then:

python mtk w boot,vbmeta boot.patched.img,vbmeta.img.empty

5. Unlock bootloader:

A. Erase all user data:

python mtk e metadata,userdata,md_udc

B. Unlock bootloader with this command

python mtk da seccfg unlock

C. If you didn't flash lk.img, then when you Boot you should see the 'Orange state' text, which means your bootloader is unlocked. If you patched lk.img, then the 'blu' logo screen should look the same.

D. Now you have a iconless magisk that can survive command from 5.A . If you open the magisk icon, it will tell you to turn on the internet. So do that, and it will install some stuff and reboot.

E. Congrats! Your phone is now rooted Enjoy!

6. ALERT!! ALERT!! DRAGONS!! At the time of writing (Oct 22, 2021 TWRP RELEASE specifically), its actually a waste of time to flash TWRP. TWRP should be used for information only!! If you accidently execute the wrong command in TWRP, it can easily brick your phone (which is how I bricked mine....).

A. You can flash over the recovery partition with the TWRP.img file.

python mtk w recovery TWRP.img

B. So TWRP currently can't do any backups because it can't decrypt certain partitions. Don't do any wipes/factory reset with this TWRP, they will brick your phone.

Useful Backup Stuff:

Here is a command that backups all partitions except 'super'(4.0GB) and 'userdata' (23.86GB) partitions, because they are to big to backup and it takes along time. This command executes in a pretty reasonable short amount of time:

python mtk r boot_para,recovery,para,expdb,vbmeta_system,vbmeta_vendor,frp,nvcfg,nvdata,md_udc,metadata,protect1,protect2,seccfg,persist,sec1,proinfo,efuse,md1img,spmfw,scp1,scp2,sspm_1,sspm_2,gz1,gz2,nvram,lk,lk2,boot,logo,dtbo,tee1,tee2,vbmeta,cache,otp,flashinfo boot_para.img,recovery.img,para.img,expdb.img,vbmeta_system.img,vbmeta_vendor.img,frp.img,nvcfg.img,nvdata.img,md_udc.img,metadata.img,protect1.img,protect2.img,seccfg.img,persist.img,sec1.img,proinfo.img,efuse.img,md1img.img,spmfw.img,scp1.img,scp2.img,sspm_1.img,sspm_2.img,gz1.img,gz2.img,nvram.img,lk.img,lk2.img,boot.img,logo.img,dtbo.img,tee1.img,tee2.img,vbmeta.img,cache.img,otp.img,flashinfo.img

Please see attached recovery.img that mateo121212 asked for and also the Magisk version I used to get root: