HOW TO PORT TWRP ON MEDIATEK DEVICES

10

cleopatra81

Active Member
Mar 13, 2016
126
0
43
Milan
HOW TO PORT TWRP MT6735, MT6737, MT6752, MT6753, MT6795, MT6797

I am NOT responsible for any brick that could happen to your phone.
You will take all the responsibilities for everything.
It might not work out with all MTK devices !
Before to start to apply all the following steps,
it assumes you already have a copy of the stock firmware (flashable by SP Flash Tool).

I STRONGLY RECOMMEND you to port a TWRP of a device with the following characteristics :
a) same SoC.
b) same storage (optional, but preferred).
c) same GPU (optional, but preferred).


VIDEO TUTORIAL - STEPS :



SCREENSHOTS TUTORIAL - STEPS :

1) Above all download "Carliv Image Kitchen for Android" at the next link :

http://forum.xda-developers.com/android/development/tool-cika-carliv-image-kitchen-android-t3013658

2) Unzip Carliv.zip and click on carliv.bat.
Please see the next screenshot :



3) Copy the recovery.img of your stock rom and paste it into the "recovery-resources" folder (inside Carliv unzipped folder).
Please see the next two screenshots :



4) Type R (and press enter), then type 1 (and press enter).
Please see the next screenshot :



5) Type 1 (Unpack image) and press enter, and see what happens. Please see the next two screenshots :



6) Now you can see the next message : "Your image is unpacked in recovery folder".
Open the "recovery" folder (inside Carliv unzipped folder).
You will can see with your own eyes the "ramdisk" folder and the other 10 files.
Please see the next screenshot :



7) And this is the content of the "ramdisk" folder (of my unpacked stock recovery).
Please see the next screenshot :



8) Create a folder on your desktop and rename it "stock".
Then copy the entire content of "recovery" folder (the "ramdisk" folder and the other 10 files),
and paste them into the folder just created on your desktop (stock folder).
9) Delete your stock recovery.img from "recovery-resources" folder (inside Carliv unzipped folder).
10) Delete all files from the "recovery" folder (inside Carliv unzipped folder).
11) Copy the custom recovery.img (the TWRP that you want to port for your device),
and paste it into "recovery-resources" folder.
12) Now repeat the steps 3, 4 and 5 for the custom recovery.img.
13) Create another folder on your desktop and rename it "port".
Then copy the entire content of "recovery" folder (the "ramdisk" folder and the other 10 files),
and paste them into the "port" folder.
14) Delete all files (unpacked custom recovery.img) from the "recovery" folder (inside Carliv unzipped folder).
15) DO NOT DELETE the custom recovery.img from "recovery-resources" folder.
16) Open simultaneously the stock folder and the port folder (on your desktop).
Please see the next screenshot :



17) Copy the "recovery.img-kernel" and "recovery.img-kernel_offset" from stock folder,
and paste/overwrite them into port folder.
Please see the next screenshot :



18) Open simultaneously the "ramdisk" folder in both stock folder & port folder.
Please see the next screenshot :



19) Copy the "fstab" (in my case "fstab.mt6752"), the "meta_init.modem.rc", the "meta_init.project.rc",
the "meta_init.rc" and the "ueventd.rc" from stock folder,
and paste/overwrite them into port folder.
Please see the next screenshot :



20) You should be able to see the port folder ("ramdisk" folder).
Please see the next screenshot :



21) Now copy the "ramdisk" folder and the other 10 files from port folder (on your desktop),
and paste them into "recovery" folder (inside Carliv unzipped folder).
Then type 2 (Repack image) and press enter.
Please see the next screenshot :



22) "Your new image was repacked as recovery-date-time.img. You can find it in [output] folder".
Open "output" folder (inside Carliv unzipped folder),
and you will find your TWRP ported img.
Please see the next screenshot :



23) Copy the "recovery-date-time.img" from "output" folder and paste it into a new folder on your desktop.
Then, rename your ported twrp img like "recovery.img". Copy the scatter file of your stock rom,
and paste it into the new folder on your desktop (together your ported recovery img).
Then, flash it with SP Flash Tool.
Please see the next screenshot :

 
30

mrsim

KingOfNoobs
Staff member
Mar 1, 2014
16,174
1
113
48
London UK
aha...was waiting for this thread now i can finally delete the one i posted......thank you cleo....:emoji_yum:
 
10

cleopatra81

Active Member
Mar 13, 2016
126
0
43
Milan
Now I'm part of the team of china-devices :emoji_slight_smile:
 
30

mrsim

KingOfNoobs
Staff member
Mar 1, 2014
16,174
1
113
48
London UK
whoop whoop...and we are very lucky to have you here cleo......:emoji_heart_eyes:
 
2

gothchix

New Member
Dec 17, 2016
22
0
3
Hull. East Yorkshire. UK.
great video, but for A TOTALL NEWB LIKE ME, way too advanced, and far too fast, all i saw on the vid was you clicking pasting, copying, deleting cutting, and pasting, lost me in first few seconds i still dont have a clue what you did, i didnt understan a bloody thing, then again i am a total newb, it wasn't until Mr Sim told me about a recovery img. and usb vcom driver thingy, the other day, still dont know what it is, still researching on the net, what i need is step by step, imagine you are talking to your great grandad, sort of thing, its a big big big learning curve us newbs have to get over, i know its annoying listening to newb speak,

update: and im dyslexic as well,so thats not good, but ehh ohh im learning slowly
 
10

cleopatra81

Active Member
Mar 13, 2016
126
0
43
Milan
@gothchix :

"Newbie" is an too ambiguous term.
It depends on who compares yourself.
I consider myself a newbie too.

:emoji_relaxed:
 
30

mrsim

KingOfNoobs
Staff member
Mar 1, 2014
16,174
1
113
48
London UK
great video, but for A TOTALL NEWB LIKE ME, way too advanced, and far too fast, all i saw on the vid was you clicking pasting, copying, deleting cutting, and pasting, lost me in first few seconds i still dont have a clue what you did, i didnt understan a bloody thing, then again i am a total newb, it wasn't until Mr Sim told me about a recovery img. and usb vcom driver thingy, the other day, still dont know what it is, still researching on the net, what i need is step by step, imagine you are talking to your great grandad, sort of thing, its a big big big learning curve us newbs have to get over, i know its annoying listening to newb speak,

update: and im dyslexic as well,so thats not good, but ehh ohh im learning slowly
dude this tutorial couldn't be any more simple...seriously if you find it hard work i would suggest not attempting it at all...just buy a device running stock and keep it that way...this is an easy tutorial for creating a TWRP recovery.img from the files that already exist within your own devices rom...research research research...then do some more research....although it may seem daunting at first once you try it and it works...you will soon realise how easy it really is
 
2

gothchix

New Member
Dec 17, 2016
22
0
3
Hull. East Yorkshire. UK.
dude this tutorial couldn't be any more simple...seriously if you find it hard work i would suggest not attempting it at all...just buy a device running stock and keep it that way...this is an easy tutorial for creating a TWRP recovery.img from the files that already exist within your own devices rom...research research research...then do some more research....although it may seem daunting at first once you try it and it works...you will soon realise how easy it really is
It's dyslexia as well, that really makes understand stuff really hard sometimes, I sometimes have to read stuff loads of times, before I begin to understand even the simplest of stuff, but I'll read the tut few more times, it's just me being my usual dystelexix self, I was nearly13yrs old before I got tested, properly, but that's for different disscusion, but I will understand it eventually, thanks anyway, to Cleopatra and Mr sim, lie I said earlier it's a huge learning curve,
Anyways, mmmmwahh
 
2

KeiSuke

New Member
Dec 25, 2016
12
0
3
22
I just flashed it, hopefully phone didnt get bricked.

Problem: I press the recovery key, twrp tries to load but screen becomes scratchy with lines everywhere, nothing can be seen except for many coloured lines. Bad port or your method failed? 100% sure my rom is good.

Edit2: it also gets erased and i have my stock recovery after a reboot.

Edit3: Like an idiot I tried flashing it through fastboot, now I know how to put a permanent recovery, but holy shit it loads with the lines and I cant see anything. Thats why I can tell you my stock recovery is 100% compatible with my phone, I just flashed fastboot with that stock recovery and everything is back to normal.
 
Last edited:
30

mrsim

KingOfNoobs
Staff member
Mar 1, 2014
16,174
1
113
48
London UK
ok did you manage to flash the TWRP recovery with sp flash tools ok...?
 
2

KeiSuke

New Member
Dec 25, 2016
12
0
3
22
ok did you manage to flash the TWRP recovery with sp flash tools ok...?
Everything flashes, but when I open TWRP it gives me something same as this guy in the vid

Then afterwards I reboot and as usual recovery erases itself( I do not mind, the only reason i will put recovery is for a one time root with SuperSU.zip) afterwards i dont care if it gets erased.
 
30

mrsim

KingOfNoobs
Staff member
Mar 1, 2014
16,174
1
113
48
London UK
Mmm...this is odd please wait for @cleopatra81 to reply as this is her thread and she may be able to help you with this issue
 
2

KeiSuke

New Member
Dec 25, 2016
12
0
3
22
Mmm...this is odd please wait for @cleopatra81 to reply as this is her thread and she may be able to help you with this issue
Holy shit nvm It worked, after 6-7 tries with different twrp, seems the one I at first didnt work for w/e reason.

Ok for anyone who wants to try this on Everstar Pro:
Download the twrp here. Source:hovatek http://adf.ly/7037456/https://docs.google.com/uc%3fid=0B9srKhKuVIMnNll6aFl1TTFfX2s&export=download

This is infinix x510 twrp.

Thank you @cleopatra81 @mrsim

For keeping it forever instead of reflashing after reboot, I go search online, that's frequent question.
For now the only thing that affects and makes it go white line is when the screen turns off( that is when you leave the phone in TWRP recovery mode on for a long time and the screen time out, then everything goes white line. Better keep pressing and not let it turn off as long as you're in recovery.)

Gonna go flash that SuperSu.zip now. Hopefully it's compatible to my phone.
 
30

mrsim

KingOfNoobs
Staff member
Mar 1, 2014
16,174
1
113
48
London UK
great work mate...you will find in the settings of TWRP that you can tune the screen timeout to as long as you like same as on your phone it also might be a good idea to upload that TWRP to needrom.com for others to use as this is where most people will go looking for it
also make sure that you fully test it...attempt a nandroid backup and make sure that your default storage is ex sd card then try accessing the backup and see if it works ok
 
2

KeiSuke

New Member
Dec 25, 2016
12
0
3
22
great work mate...you will find in the settings of TWRP that you can tune the screen timeout to as long as you like same as on your phone it also might be a good idea to upload that TWRP to needrom.com for others to use as this is where most people will go looking for it
also make sure that you fully test it...attempt a nandroid backup and make sure that your default storage is ex sd card then try accessing the backup and see if it works ok
Everything's OK, made phone backup already( in case it gets bricked), will upload twrp on needrom this week. As I said, since it's a port, there's always that little issue of white line, I will put a note to disable screen timeout in TWRP when I upload.
Had to flash supersu.zip 2.66 beta, for some reason, new versions of supersu makes phone go into bootloop. Now only issue I get is because it's probably that supersu.zip is old, everytime a root permission request is asked, it takes 20-30 seconds for the "requesting root permission" to appear. Since it's only 1 time permission, I don't have much problem with it, but I dunno if my root is a perfect one or if there's really some corrupt parts. Everything works though, already installed xposed and other apps.

Tl;dr= First time opening EACH applications, root permission request takes 30seconds to appear. Very strange.
 
30

mrsim

KingOfNoobs
Staff member
Mar 1, 2014
16,174
1
113
48
London UK
ok it could be because of systemless root being implemented into superSU not 100% sure i just remember seeing that there are certain modded TWRP's which are available for qualcomm devices over at XDA...but don't quote me on that
also i would advise downloading and installing 'busybox by stericson' if have not done this already just means things stay a little more stable after rooting and modding your device
 
2

KeiSuke

New Member
Dec 25, 2016
12
0
3
22
ok it could be because of systemless root being implemented into superSU not 100% sure i just remember seeing that there are certain modded TWRP's which are available for qualcomm devices over at XDA...but don't quote me on that
also i would advise downloading and installing 'busybox by stericson' if have not done this already just means things stay a little more stable after rooting and modding your device
I will try post a thread on XDA and see if they can reply. Normally it's just the fact about the version of the SuperSU.zip that would mayhaps cause this issue, so I will try and see if these guys can figure a way to get me to be able to use the latest version of the supersu without bootlooping my device.

Sidenote: I don't understand how to post on needrom, there's no category for TWRP, nor is there a category for evertek smartphones.
So I will post a link on the other thread I created about the everstar pro.
 
30

mrsim

KingOfNoobs
Staff member
Mar 1, 2014
16,174
1
113
48
London UK
for needrom you will have to create a new category/page with the device name and TWRP...maybe even link a stock rom if you managed to find one
 
30

mrsim

KingOfNoobs
Staff member
Mar 1, 2014
16,174
1
113
48
London UK
1)
upload_2017-1-3_13-8-58.png

2)
upload_2017-1-3_13-9-22.png

3)
upload_2017-1-3_13-9-48.png
 
2

someoneelse

New Member
Feb 15, 2017
2
0
3
119
What is the meaning of SoC? abbreviation for...?
 
Help Users

You haven't joined any rooms.

    You haven't joined any rooms.