[Android Software/Hacking General [Developers Only]] NinjaChunks:
Guide for flashing GSI on mediatek devices is uploaded- checkout [ Works on IMEI erased phones too! ]

This method is for mediatek chipset devices only

Spoiler content hidden.

Spoiler content hidden.

Prerequisite :

1. Mediatek drivers

Extract the zip and open Driver folder

Run the exe files, after the installation process is complete restart your PC

To check if drivers were installed and are working, turn off your phone and connect it to PC using USB Cable while holding both volume up and down buttons

There will be a prompt sound if device is connected

If your device still isn't detected, open MTK_USB_All_v1.0.8 folder and run MTK_USB_All_v1.0.8.exe

After the installation process is complete, restart your PC

2. Python Download and install python.

Go to python directory

Search python in start menu, right click python and click on open file location, again right click on python and click open file location | This is the python directory.

Open cmd inside it by typing cmd at the address bar of file explorer and press Enter

Inside cmd exectue following commands one by one

Thanks Bjoern Kerler

git clone https://github.com/bkerler/mtkclient
cd mtkclient
pip3 install -r requirements.txt

3. Unlocked Bootloader [ User data will be formatted ]

Turn off your phone

Open mtkclient folder inside python directory and open cmd inside folder by typing cmd inside address bar of file manager

Now run below command

python mtk e metadata,userdata,md_udc

Connect phone to PC with USB Cable while holding Vol+ and Vol- together

Now run below commands one by one

python mtk da seccfg unlock
python mtk reset

After the script completes, disconnect phone and reboot by holding power button

Your device's bootloader is unlcoked now ╰(*°▽°*)╯

Note: Bootloader can't be used whatsoever but 'unlocked bootloader' is a requirement before flashing any partition to your phone

Now comes actual rooting part

Open python directory and open mtkclient folder inside it

Run cmd inside mtkclient folder by typing cmd inside address bar of file explorer and press Enter

Turn off your phone and connect to PC with usb cable while holding Vol up and Vol down together

Run these commands inside cmd one by one

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

Your phone will reboot now

There will two files created inside mtkclient folder called boot.img and vbmeta.img

Copy boot.img file to your phone

Download this masigk app only and install on phone

Open magisk and patch the boot.img file, a new file will be created inside Downloads folder named magisk_patched.img

Rename this file to boot.patched and copy it to your PC

Move this file into mtkclient folder inside python directory and replace old boot.img

Open cmd inside mtkclient folder by typing cmd inside address bar of file manager and press Enter

Now run the following command inside cmd

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

Turn off your phone and connect to PC with usb cable while holding Vol up and Vol down together

python mtk reset

Your phone will reboot now

Your device is rooted now ╰(*°▽°*)╯

Rooting files for devices on C.12: Download here

Place the downloaded files into mtkclient folder inside python directory and execute

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

python mtk reset