These instructions may also work for the A509DL variant as well, report back if so!

I’ve been trying to get a working TWRP ported but cannot for the life of me get it working. I have however got a modified factory recovery for the 5102 to show the “rescue mode” for the device. it still doesn’t allow ADB or anything else like that. I do see there is a vendor init in the recovery, I may try removing that as its mentioned in the thread you linked.

Bootloader Unlock:

Steps to root/unlock etc. This assumes you have all the ADB, Preloaders and Fastboot drivers installed. I can’t help you there, I’m running linux and it just worked out the box for me.

1) Download MTKClient. I personally cloned it using git, but you can download the  release and get all you need as well. You’ll need python installed to be able to run this, so also go grab that. There is also a file named vbmeta that comes with this download. Keep this in mind for later.

2) Launch MTKClient and reboot or boot your phone. It should hook up and allow for you to start dumping partitions etc. I recommend you take a full system backup at this point. Especially if you wish to be playing. It can recover you from a brick when you get it- and you will if you’re playing.

3) Take a backup. I can’t stress this enough. Take a backup of all your files before playing with them.

4) This is where it will get hairy for some. You can easily unlock your bootloader using the MTKClient tool. I personally used the GUI and clicked “Flash Tools” then “Unlock Bootloader”. There’s CLI for this as well, but you can google it.

5) Congrats you are BL Unlocked. Now you need to manually wipe the userdata partition. Click “Erase Partitions” and select the UserData.

6) Next you need to flash a vbmeta file that has been modified to jive with the unlocked bootloader. It was included in the MTKClient but I’ve also attached it here. Go to “Write Partition” and find the vbmeta, set that file.

You want to flash the file included in the MTKClient:

7) Now you can make some decisions- you can either boot up and sideload the attached modified Magisk APK to patch your own boot.img that you extracted from step2 or you can use my 01_magisk_patch.bin file. If you wish to load my boot.img go to “Write Parition” and select set file on the boot option.

Here is what you get by flashing the emtpy vbmeta, being unlocked and trying to boot to recovery:


*Note* you can mount the disk locally and copy your boot.img over if you wish to patch your own. Additionally, I think you can get the latest magisk version and patch using that. I have 2 variants of this phone, one on latest version and one on 8.0 that I did for this guide and am playing with to get TWRP and Treble on.

8) Now in theory you are ready to start up. Unplug the device, close MTKClient and reboot the device. It should Say “Orange State: Device untrusted” or something similar (screenshot above). We can fix that later if you’d like. The device should boot up and allow for you to set it up. I skipped online setup and did all offline to speed run this part. Once the phone is fully up, open your app drawer and you should see Magisk with a default android icon. Long press this and hit the circle i to get to app info. Click permissions and ensure that it is allowed to sideload apps. It will prompt you but this takes that step out.

9) Connect to WiFi

10) Launch the Magisk, it will prompt to download. Accept and let it download and install. Once installed, there will be an app called “Alpha” installed. You can now remove the Magisk app with the generic icon.

11) At this point, go ahead and launch MTK Client and reboot again. We are going to flash the 02_magisk* boot img now. This enabled Magisk with root. Once you have flashed the 02 image, disconnect and close MTKClient. Reboot phone and wait for it to load up.

12) On reboot of phone, launch the Alpha app again. It will prompt for 1 final reboot to enable some items for Magisk. Let it do its thing. When it reboots you will be rooted and magisk alpha.

*Note* You can update Magisk, but it’s kind of a pain in the butt and you lose modules.  I’m also not finding the page that originally stated that version was a MediaTek specific version. Here is what I did find and the actual APK that I uploaded

You can download the above, save it as vbmeta.bin and flash.I also did the extra and just flashed it on all vbmeta entries.

Ticky Tacky Stuff:

SimUnlock: I used this file to simunlock my USCellular and made a call with an ATT simcard. It felt sketchy but worked. I uninstalled after SIM unlocking.

I followed this to remove the Orange and Red State and 5 sec delay. I’ve also attached my lk.bin file for you to flash both over both lk and lk2 file slots in mtkclient. This will override the 5 second delay and visual warning of having your BL unlocked.

I also attached my “working” recovery. It doesn’t add anything but a “rescue” mode in the menu. I can’t get ADB working with it or fastboot to work. I’ll keep hammering on this as I want to be able to eventually put a project treble load on this device. I’ve tried rebuilding and swapping super but no luck. The trick to get the modified recovery was after repacking using the avbtool to resign the recovery image:

python add_hash_footer --image mod_boot.img  --partition_size 33554432 --partition_name boot

I’ve attached a zip with the avbtool, vbmeta, lock, boot images and the “unofficial magisk” apk.

Mega Repo (has roms):

Leave a Reply

Your email address will not be published. Required fields are marked *

The reCAPTCHA verification period has expired. Please reload the page.