[PORT] [TOOL] Carliv Touch Recovery for MediaTek devices

yuweng

Senior Member
Feb 5, 2012
1,172
4,219
0
Old Tool
Added on Mar 05, 2014
Updated CTR v2.2 for MTK devices with ubifs ONLY
And Thanks to dhinesh77 for countless beta-testing & most importantly, Master Shifu carliv for looking into those ubifs source code to make it work on MTK devices....


Download link here...

Solution to cannot see whole sdcard is here by Master Shifu himself, it is actually a new feature/ function... :laugh:
----------------------------------------------------------
Added on Jan 27, 2014
Updated CTR v2.2 Recovery for MT6575,15, 77, 17, 89, 82, 88, 92
MT6572 (ext4 only, ubifs not supported)


Pls support by donation or at least drop your thanks here to encourage Master Shifu for further development...


Download link here

----------------------------------------------------------
Added on June 02, 2014
New Porting Tool CTRv-1.4 for ext4 devices ONLY. . .

Known problems : Touch not working on some MTK devices . . . :cowboy:

Any bugs report here . . . :cool:
----------------------------------------------------------
Added on June 10, 2014
New AIO Porting Tool Easy Magic CTR v2.4 Installer for MTK for ALL MTK Cortex-A9/ A7 devices ONLY with either mtd, emmc, ubifs or custpack partition . . . :cowboy:

Any bugs report here . . . :cool:

Updates
Thanks to surfturtle for reporting . . . :eek:

Workaround : Use Manual mode & select 720x1024 that is the screen res for 720x1280 . . .

This is an AIO porting tool so go ahead & try the differrent res at Manual mode, the unpack/ repack feature, play around with it & you'll learn what is needed for porting custom recoveries . . . :cool:
----------------------------------------------------------
Added on June 17, 2014
Users using XP & 720x1280 MTK devices use this fix . . . :eek:
----------------------------------------------------------
Added on July 01, 2014
CTRv2.5 refer to here . . . :cowboy:
----------------------------------------------------------
Notice to annoying n00bs & newbies

Most of your questions are already answered on this thread so pls read it...


1) Either your MTK is still ro.secure=1 then use this method here then EXIT/ CLOSE it first then re-start the porting tool...

2) i've already put in alot of error checking to make sure this porting tool works, either the Auto or Manual port, it will leave behind Ported-CTR folder then manually install it via SPFT when it fail to auto install.... Most probably why it fail to install is b'cos you use SuperSu did you bother to look at your MTK device & grant access to Root Shell... There has been cases where the stock recovery is already corrupted then this tool will also port a corrupted CTR too. Re-install your stock 3e recovery.img & make sure you can boot into it then only use the porting tool again or just use the manual port... The differences is Auto will upload whatever recovery already at your device be it older CWM or TWRP & it will repack it with CTR ramdisk. While Manual will use whatever at your stock 3e -> factory_init.project.rc, meta_init.modem.rc, ueventd.rc & etc... Refer to this by Master Shifu carliv... :good: This tool has no log b'cos it is actually a simple copy & paste program, thats what it actually do.... :laugh:

3) Pls bear in mind that this porting tool has been downloaded by many & confirmed working BUT i can't guarantee that it will work flawlessly on your MTK device so continue trying & report back the solution if you found one... :cowboy:

4) This has been mentioned many times on this thread, if you really can't get it to work then don't just say your porting tool doesn't work...


Instead list out everything then it'll be easier to trouble-shoot
a) What OS you are using on the PC & your MTK...
b) Did you disable UAC & Anti-Virus on your PC
c) Did you execute the porting tool at C:\ drive if you're using XP else then at your Desktop READ what the porting tool says & it will ask you to wait then wait for it to continue without pressing the OK button...

As said many times, this porting tool uses Russian Master Shifu Michfood Repack Utils Huge Credits to him, it is actually DOS program with cygwin dll working at the back so all DOS limitation still applies such as it will ONLY operate properly when it is executed at the Desktop on latest OS... Tested working on XP to 8.1

As much info as possible then it'll be easy to identify where it goes wrong & did you bother to read 5 to 10 pages from the back then you would have know what is the latest story... :rolleyes:

Last but not least, i didn't compile CTR so any features not working / bugs found pls report it here BUT again, read the whole thread first as most already answered at that thread...

Q&A

1) Touch not working, refer to here...
2) MTK Alcatel devices refer to here & here... Supported on CTRv2.4
3) All MTK devices supported except this...
4) Inverted screen solutions -> Compile your own
5) CTRv2.5
 
Last edited:

balamu96m

Senior Member
May 2, 2011
1,201
1,298
0
24
Chennai
Nice one bro.....will be helpful for many.......!!:good:
Good to see you back......!
--------------------
P.S: Thinking of creating a Multi-tool for MTK6573.......what are features that can be added bro ??
 
Last edited:
  • Like
Reactions: muizabdul

yuweng

Senior Member
Feb 5, 2012
1,172
4,219
0
Yo, Bala bro, been quite busy with work, until now only manage to finish this tut... :eek:

Yeah, i was thinking about that too, to mod dsixda's android kitchen just for MT6573 platform that includes Bruno Martins's unpack/ repack boot.img, unpack/ repack recovery & port it to CWMR like this tut, replace a2sd with data2ext or ad2sdx; only this two mod stable on MT6573 platform so far that i have tested...

actually did try but give up half way as my scripting skill is still at novice level... :eek:

did read it on some other forum that someone is actually doing that too but i never see it got release though...:p

Well i guess we need dsixda expertise to be able to do that but he is retired now...


Added on Sept 04, 2012 Info Update
Dark Tremor's a2sd/ Apps2sd works well on MT6573 platform after all... :eek:

i was using the last version 2.7.5.3 Beta 04 all this while & i always use a2sd datasd all the time & it FC all apps after a few weeks of using/ sometimes a few days even after a fresh install...

After all, DT_a2sd/ apps2sd is actually apps to sd & i always push it as data2sd... :eek:

Only until recently that i play with Android Kitchen, use it to extract my system.img & update it with its built-in Darktremor Apps2SD version 2.7.5.2, it works extremely well because 2.7.5.2 doesn't support a2sd datasd feature...

So guys, if you are using DT_a2sd beta 4, don't use the command a2sd data2sd instead use a2sd cachesd...

You can checkout my other post here
 
Last edited:

yuweng

Senior Member
Feb 5, 2012
1,172
4,219
0
hello y2yu,

Glad you find it informative... :D

According to this site, there will be another 2 new cpu after MT6575/ MT6577... (use google chrome for translation)

This means MT6573 is 5 generation behind MT6588 & it is still unexploit with all info/ tools scattered all over the web...

Thats where i decided to compile all these info & put it here... :good:

Now that i check, i've bought my first mediatek back in 2008...( never knew it until i check it just now ) :silly: It has serve me well for almost 2 years in spite of dropping, a few times from 8 feet height when i was on a ladder & it still works ! It was the last drop that spoilt the mic & render it unuseful. It can still make & receive call to date but the other side can't hear what i say... :eek:

At that time, made in china phone was famous for its extra loud speaker/ ringtone but doesn't support android back then...

haha, enough of history, have you manage to port CWMR to your MT6573 ? In fact, i have manage to create a plugin for dsixda's Android Kitchen which can port CWMR to any MT6573 with a few copy & paste features just like Android Kitchen... :good:

Still testing it, may be you would like to be the first beta tester... :confused:
 

Attachments

Last edited:

jason_cheng

Member
Aug 13, 2012
38
33
0
Thank you so much for this. I managed to "port" cwmr to my phone without going through the build hassle. Thanks also go to koush for the builder. I had downloaded the source but hadn't managed to completely set up my build environment as there are a couple of gotchas to iron out for ROM development.

Anyway, this serves as a good precursor to actually porting a custom recovery to new devices. Just one problem - cwmr does not recognise any of the hardware buttons for the select action. I can only scroll. The phone has 2 side buttons for volume control, 1 power button on top, and at the bottom on the home row there is a home button, the menu (these 2 also scroll, in stock recovery the home button selects), the previous, and the search. [1][2]

Do you happen to have any cure for this? Is there some place I could remap hardware buttons? One more thing. I made sure root shell access was configured but adb shell will not work (insufficient permissions). Also, adb devices, as is the case for stock recovery, will return question marks. Any idea?

edit: It is important to mention that the flashing had some errors:

Code:
/mnt/sdcard # flash_image recovery recovery.img
mtd: read error at 0x00000000 (Out of memory)
mtd: read error at 0x00020000 (Out of memory)
mtd: read error at 0x00040000 (Out of memory)
mtd: read error at 0x00060000 (Out of memory)
mtd: recovery successfully wrote block at 0x00000000
mtd: recovery successfully wrote block at 0x00020000
mtd: recovery successfully wrote block at 0x00040000
mtd: recovery successfully wrote block at 0x00060000
... <snip>
... <snip>
... <snip>
mtd: recovery successfully wrote block at 0x00420000
mtd: recovery successfully wrote block at 0x00000000
The flash of the stock recovery goes without any error.

[1] http://symphony-mobile.com/index.php?route=product/product&path=63&product_id=75
[2] http://www.tinno.com/en/productinfo.aspx?proid=128
 
Last edited:
  • Like
Reactions: namsadin

yuweng

Senior Member
Feb 5, 2012
1,172
4,219
0
u r most welcome, jason... :D

i think the button key map is actually built inside /sbin/recovery so there is nothing much you can do about it unless you build the whole recovery from sources & change it from there...

i do have feedback from fellow xda member that has the same problem flashing recovery with error however he reported back, all menu options at cwm works fine...why don't you use mobileuncle tools, its easier that way...found another flashing tool for ZTE, reported unknown image but it works fine on MT6573 platform too...

As for the adb shell at cwmr, it should work by default & if it doesn't then you have the check default.prop & make sure ro.secure=0 As for stock recovery, mine doesn't work at all... :p

i think after 6.0.0.3 version, ported cwmr has the camera button as enter key for MT6573 if you built it from koush builder...
 

jason_cheng

Member
Aug 13, 2012
38
33
0
u r most welcome, jason... :D

i think the button key map is actually built inside /sbin/recovery so there is nothing much you can do about it unless you build the whole recovery from sources & change it from there...

i do have feedback from fellow xda member that has the same problem flashing recovery with error however he reported back, all menu options at cwm works fine...why don't you use mobileuncle tools, its easier that way...found another flashing tool for ZTE, reported unknown image but it works fine on MT6573 platform too...

As for the adb shell at cwmr, it should work by default & if it doesn't then you have the check default.prop & make sure ro.secure=0 As for stock recovery, mine doesn't work at all... :p

i think after 6.0.0.3 version, ported cwmr has the camera button as enter key for MT6573 if you built it from koush builder...
Crap, then I have to dig through the sources really hard. This phone has no camera button.

If I'm not wrong the last time I checked "mobileuncletools" uses flash_image. Either that, or nandwrite, or failing that, dd. Coming from a Linux and UNIX background I'm more comfortable with the simpler underlying commands rather than a complex front-end wrapper around those commands. NAND images have some peculiarities so we kinda have to deal with it I guess.

I had triple-checked that ro.secure != 1 :p I think this is probably a hardware issue where during recovery there is no bridging interface exposed.

Anyway a couple of other things related to the documentation side of this:

* Why not just upload your own recovery.fstab to the builder instead of editing it later?
* Changing the fstab is only needed for those who have an ext-sd, i.e. a second partition for the memory card
* The bin/ folder is empty, and the lib/ folder only contains the ext2 module, so if above not needed, this is also not needed

So in the end, I think we can simply advocate use of the builder as-is. What do you think of putting up a list/database of MTK phones and some details? Like rootable or not, cwmr available or not, etc. I think RootzWiki would be a good place for that?
 
  • Like
Reactions: soloyke

yuweng

Senior Member
Feb 5, 2012
1,172
4,219
0
AFAIK, most readers at xda are non-registered, only when they are stuck somewhere or they really needed help then only they'll register & start posting; that is including me ! :eek:

You can see my other post where it is nearing to 300 over downloads while the MTK phones list feedback from users is less than 10 ! :eek:

AFAIK, all MT6573 are root-able & all needs data2sd mod. There are so many apps & games at google play, MT6573's 256 or 512MB internal memory gets filled up pretty fast !

On adb shell, did you have all the three adb files (adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll) & on linux, i use ./adb shell to get it to work...
 

jason_cheng

Member
Aug 13, 2012
38
33
0
AFAIK, most readers at xda are non-registered, only when they are stuck somewhere or they really needed help then only they'll register & start posting; that is including me ! :eek:
Very true.

AFAIK, all MT6573 are root-able & all needs data2sd mod. There are so many apps & games at google play, MT6573's 256 or 512MB internal memory gets filled up pretty fast !
Indeed. I actually want to try just bind-mounting data to a second partition, but I don't know whether init scripts are supported on this phone (would be better instead of editing the init itself). But I will also try this data2sd mod, haven't looked at it yet. After clearing out loads of preincluded apps I was happy for a while, but am now running out of space again!

On adb shell, did you have all the three adb files (adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll) & on linux, i use ./adb shell to get it to work...
Actually I have the Android SDK set up already on my system, so everything is conveniently there including adb. I will have to find some other day to troubleshoot why the bridge would not work during recovery.
 

breaky9973

Senior Member
Dec 4, 2011
54
8
28
re-packing error

Now I am doing this on Xubuntu so maybe that's why it doesn't work:

I get the following when trying to repack:

MTK-Tools by Bruno Martins
MT65xx repack script (last update: 31-07-2012)

Repacking recovery image...
Ramdisk size: gzip: unpack/ramdisk-repack.cpio.gz: No such file or directory
Could not open ramdisk file: ramdisk-repack.cpio.gz


Any ideas?

Unpacking is no problem.
 

yuweng

Senior Member
Feb 5, 2012
1,172
4,219
0
This Android Kitchen plugins only work with cygwin... :eek:

Even unpacking shouldn't have work because mkbootimg & 7z is windows exe...

i'm in the mid of modding it so that it can work on linux too... :D
 
Last edited:

jason_cheng

Member
Aug 13, 2012
38
33
0
Now I am doing this on Xubuntu so maybe that's why it doesn't work:

I get the following when trying to repack:

MTK-Tools by Bruno Martins
MT65xx repack script (last update: 31-07-2012)

Repacking recovery image...
Ramdisk size: gzip: unpack/ramdisk-repack.cpio.gz: No such file or directory
Could not open ramdisk file: ramdisk-repack.cpio.gz


Any ideas?

Unpacking is no problem.
It will work on any GNU/Linux as long as you have the proper tools installed. Almost all tutorials for Android "modding" are Cygwin-based, which basically emulates a GNU system on Windows (so you can skip all parts about "setting up" anything). Here your file does not exist, please double-check that it does. This is a perl script which utilizes gzip, gunzip, and cpio. Make sure these are available as well.

Btw, this is independent of Android Kitchen. You don't need that if you're using the builder. Android Kitchen is just a front-end to modifying ROMs. So skip the Kitchen for now and do this manually.

Again, the "another website" you link to is about backing up real filesystems (which the boot and recovery partitions are not). See: http://forum.xda-developers.com/showthread.php?t=1744265&page=2

yuweng: What benefit does using the Android Kitchen have over simply using the builder? All you need is a rebuilt /sbin/recovery along with the resources in /res, and optionally an ext2.ko if it does not exist on the phone itself.
 
Last edited:

yuweng

Senior Member
Feb 5, 2012
1,172
4,219
0
This is just a simple tool for n00b/ newbie...

i was a n00b six months ago & even now my android knowledge is still half empty... :D

As the first post says, there are hundreds if not thousands of android phone based on MT6573 SoC design, each with their own recovery.img-kernel.img & AFAIK, non is compatible for use on others...

i simply provided a plugins based on Android Kitchen so that even a n00b/ newbie can port cwmr to their MT6573 simply by just drag & drop files to it... You are a programmer by profession i presume, so this is chicken feet to you but to a n00b/ newbie they don't no even where to start, like i did... :laugh:

you'll be surprise if i tell you the top download of my tuts is rooting & installing busybox !

As for the builder, you still need to unpack it, copy few files over & repack it with bgcngm's MTK-tools for it to work on MT6573...not alot of n00b/ newbie know how to do that ! :D

the intention of this plugins is to be able to port cwmr to any mt6573 based android phone...
 

jason_cheng

Member
Aug 13, 2012
38
33
0
This is just a simple tool for n00b/ newbie...

i was a n00b six months ago & even now my android knowledge is still half empty... :D

As the first post says, there are hundreds if not thousands of android phone based on MT6573 SoC design, each with their own recovery.img-kernel.img & AFAIK, non is compatible for use on others...

i simply provided a plugins based on Android Kitchen so that even a n00b/ newbie can port cwmr to their MT6573 simply by just drag & drop files to it... You are a programmer by profession i presume, so this is chicken feet to you but to a n00b/ newbie they don't no even where to start, like i did... :laugh:

you'll be surprise if i tell you the top download of my tuts is rooting & installing busybox !

As for the builder, you still need to unpack it, copy few files over & repack it with bgcngm's MTK-tools for it to work on MT6573...not alot of n00b/ newbie know how to do that ! :D

the intention of this plugins is to be able to port cwmr to any mt6573 based android phone...
yuweng, and I thought you were the programmer! :D (other than bgcngm I see you as our local MTK expert)

Seriously, we are all noobs. That was my main concern :silly: Android Kitchen interface is command-based whereas the builder you just need to upload an image and you will get an image in return.

So do you mean using Android Kitchen there is no need to go through setting up Cygwin, repack, unpack, etc.? Just download the Kitchen, enter some commands, and you will have a recovery.img which you can flash directly?
 
Last edited:

yuweng

Senior Member
Feb 5, 2012
1,172
4,219
0
i'm a half-cook programmer... :D

yaya, but you need to setup java, Android Kitchen & the plugins scripts will do everything... :laugh: That is for linux...For windows, you already know... :eek:

As for the builder, it works on major brands where it can be flash directly but not on mt65xx...
 

jason_cheng

Member
Aug 13, 2012
38
33
0
Ahh OK in that case I do suppose the Kitchen would be much simpler.

Ya, the MTK partitions and images are not the same as those of other devices. That's why Bruno wrote the script to help us :)
 

breaky9973

Senior Member
Dec 4, 2011
54
8
28
yuweng, and I thought you were the programmer! :D (other than bgcngm I see you as our local MTK expert)

Seriously, we are all noobs. That was my main concern :silly: Android Kitchen interface is command-based whereas the builder you just need to upload an image and you will get an image in return.

So do you mean using Android Kitchen there is no need to go through setting up Cygwin, repack, unpack, etc.? Just download the Kitchen, enter some commands, and you will have a recovery.img which you can flash directly?
Hi Jason,

I have cpio and can execute perl scripts. gzip and gunzip are setup too. The script just cannot find the file ramdisk-repack.cpio.gz and I cannot find it anywhere.
Maybe the dump of the recovery.img was not good. I will try again.
 

breaky9973

Senior Member
Dec 4, 2011
54
8
28
*UPDATE*

The mkbootimg executabe I download was not correctly installed. Now the script finishes without error.
However the recovery.img doesn't do anything. I think I have to look for another mkbootimg or compile one from source myself...

For people who are interested to try the Ubuntu way:

Unpacking:

sudo perl ./unpack-MT65xx.pl recovery.img

Re-packing:

sudo perl ./repack-MT65xx.pl -recovery ./recovery.img-kernel.img ./recovery.img-ramdisk ./recovery.img

I will attach the mkbootimg once I succeed :)
 
Last edited: