First, always dump your stock rom with these tools: https://github.com/bkerler/mtkclient
This is called mtkclient. It reverse engineers download mode so that we can pull down the flash. Once you put your phone in download mode, use this command to back up the whole flash
python mtk rf flash.bin
Now that we've made a backup, we can start screwing around with the phone.
Inside of that flash bin you can find all the partitions inside of it. Look for boot.img and vbmeta.img. After you find both of those, use magisk manager to root the stock boot.img.
Now we can also use this mtkclient software to unlock the bootloader. But we first have to erase metadata, userdata, and md_udc.
python mtk e metadata, userdata, md_udc
Now we can unlock the bootloader.
python mtk da seccfg unlock
After unlocking the bootloader, you can now flash partitions. Flash your patched boot.img in bootloader mode.
Fastboot flash boot (patched boot.img)
Now we need our original vbmeta. We need to flash it while disabling verification.
Fastboot - - disable-verity - - disable-verification flash vbmeta (vbmeta.img)
And that's it! Enjoy your rooted phone
This is called mtkclient. It reverse engineers download mode so that we can pull down the flash. Once you put your phone in download mode, use this command to back up the whole flash
python mtk rf flash.bin
Now that we've made a backup, we can start screwing around with the phone.
Inside of that flash bin you can find all the partitions inside of it. Look for boot.img and vbmeta.img. After you find both of those, use magisk manager to root the stock boot.img.
Now we can also use this mtkclient software to unlock the bootloader. But we first have to erase metadata, userdata, and md_udc.
python mtk e metadata, userdata, md_udc
Now we can unlock the bootloader.
python mtk da seccfg unlock
After unlocking the bootloader, you can now flash partitions. Flash your patched boot.img in bootloader mode.
Fastboot flash boot (patched boot.img)
Now we need our original vbmeta. We need to flash it while disabling verification.
Fastboot - - disable-verity - - disable-verification flash vbmeta (vbmeta.img)
And that's it! Enjoy your rooted phone