Thursday, October 18, 2012

Porting CWM recovery for MT65xx phones

Credits to yuweng

bgcngm - unpack/ repack script 
CLShortFuse - SuperOneClick Root & BusyBox
DooMLoRD - Root & Busybox
Koush Dutta - Developer of ClockworkMod recovery
linerty - MT65xx ROM Backup

For creating or porting custom rom we need CWM without it is not possible.

So let us see the steps and process involved in porting ClockWorkMod recovery in MT65XX phones

1. Rooting and busybox
2. Backup of your current rom
3. Installing cygwin and porting CWM recovery
4. For something wrong goes for MT6573 phones

Step 1.

First we need to root the phone and make sure sure busybox is installed..

There are many rooting steps

1. Using the modified boot.img as shown in this tutorial (But make sure you the specific boot.img for your phone before flashing)

2. Using MTKDroidTools to root the phone

3. Or using Doomla script or similar script to root the phone (Most of the scripts are GENERIC means it will work on any android device of any brand).

Step 2.

So make sure you have rooted the mobile and busybox installed...

Now important step is to backup the rom of the phone.

There are many ways to do it.

1. Using SP Flash tool

and following these simple steps

Start the flash-tool -> load the scatter-file -> click on 'Read back' -> click on 'Add' -> double click the new entry -> give a name for your backup -> enter start-address and length -> click OK -> click on readback button -> connect your phone.

2. Using the MTKDroidTools and selecting the backup button

3. Using the Gsctipt method credits to 

Download link :

Extract directly to your SdCard & install GscriptLite.apk

Press Menu & Add script

Step 3.

Now Installing Cygwin for windows

Cygwin Off-Line Installer

These recoveries will work on ICS MT6575/MT6577 you may also try for GB for Not working recovery on MT6573 see below after this tutorial.

Download link
MT65xx Unpack/ Repack
Download link
Mobileuncle Tools
Download link
CWMR recovery.img-ramdisk
Download link
CWMR recovery.img-ramdisk
Download link
CWMR Touch Screen recovery.img-ramdisk
Download link
Optional – dsixda Android kitchen v0.199
Download link

Browse to wherever you have extracted cygwin & look for cygwin_packages

Extract bm-mt65xx-unpack-repack.7z to c:\cygwin\bm

Copy your recovery.img backup from
Gscript or similar backup to c:\cygwin\bm

Starting cygwin for the first time

cd c:/cygwin/bm

To unpack use command ./ recovery.img

For linux users you can try this : 

sudo perl ./ recovery.img

below are the files  extracted out from recovery.img

Delete the RED circle files

Remaining only recovery.img-kernel.img

Extract whichever CWMR version your prefer to c:\cygwin\bm

For Linux users :
sudo perl ./ -recovery ./recovery.img-kernel.img ./recovery.img-ramdisk ./recovery.img

For Windows :

Use command
./ -recovery ./recovery.img-kernel.img ./recovery.img-ramdisk ./recovery.img

Turn on your phone USB Storage & copy newly created recovery.img to your SdCard

Copy mobileuncle tools ( m44tools.apk ) to SdCard

After phone reboot & you shall have your CWMR
Special Note : CWMR, enter command is camera not the usual power button !

Adb shell can be access via CWMR on all three version


All three recovery.img-ramdisk doesn't work on my mt6573. What now ? No worries, you still
have a last resort to port a complete working CWMR to your MT6573...
Koush Dutta, the developer for ClockworkMod is so kind that he created to let people build their own CWMR !

You will need below script too unpack the recovery.img created by
Download link

Create a new folder named bt, copy & paste

Go to

Select your backup recovery.img from Gscript or similar backup

Scroll down to the bottom, either you put a check mark on Touch Recovery to build CWMR
with Touch Screen support or just leave it to build CWMR standard version

It is best that you bookmark the page as not to mix up with other people's build

Remember you build number. The RED icon indicate build fail while the BLUE indicate build
success. You need to check your build number whether it is a success. Then you can
download the recovery.img if the build is successful.

Copy downloaded recovery.img from & start cygwin & go to
bt folder

Use the command ./ recovery.img

You will get a new folder named recovery-img-ramdisk folder

Go back to bm folder, copy your stock recovery, unpack it & delete recovery.img &
recovery.img-ramdisk.cpio.gz as not to confuse yourself

On your stock recovery.img-ramdisk, delete etc, res & sbin & replace it with the one from

Deleted etc, res, sbin                                                   Three files copy & paste from c:\cygwin\bt

Go to recovery.img-ramdisk\etc & open recovery.fstab

Change fstype to ext2 & save it

Open either one of the three recovery.img-ramdisk & copy the content of system

Copy & paste it to c:\cygwin\bm\recovery.img-ramdisk\system
If you intent to use adb shell at CWMR then you have to change your stock recovery
default.prop → 0
ro.allow.mock.location=0 → 1
ro.debuggable=0 → 1
persist.service.adb.enable=0 → 1
Use below command to repack
./ -recovery ./recovery.img-kernel.img ./recovery.img-ramdisk ./recovery.img
Keep your finger cross, flash it with mobileuncle tools & it should work on your MT6573 !


  1. will this work on goophone y5? mt6575? thanks for your response

  2. catastrophe man .
    its giving errors

    i tried it in both cygwin (installed on xp sp3) and in ubuntu 10.04 lts (running in vmware( vmware is installed in xp sp3 and ubuntu is running from it) .

    all goes well until in enter the following command in cygwin in xp..

    BaldEagle@warsi-274efca85 /bm
    $ ./ -recovery ./recovery.img-kernel.img ./recovery.img-ramdisk ./recovery.img
    Can't locate in @INC (@INC contains: /usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-64int /usr/lib/perl5/site_perl/5.14 /usr/lib/perl5/vendor_perl/5.14/i686-cygwin-threads-64int /usr/lib/perl5/vendor_perl/5.14 /usr/lib/perl5/5.14/i686-cygwin-threads-64int /usr/lib/perl5/5.14 /usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/site_perl/5.8 .) at ./ line 16.
    BEGIN failed--compilation aborted at ./ line 16.

    BaldEagle@warsi-274efca85 /bm

    if i try under ubuntu i get the following error

    L@L-desktop:~/Desktop/bm$ sudo perl ./ -recovery ./recovery.img-kernel.img ./recovery.img-ramdisk ./recovery.img
    [sudo] password for L:
    MTK-Tools by Bruno Martins
    MT65xx repack script (last update: 31-07-2012)

    Repacking recovery image...
    Ramdisk size: 7528 blocks
    Can't exec "mkbootimg": No such file or directory at ./ line 82.

    Repacked recovery image into ./recovery.img

  3. Thank you so much !!! I was using an MTK6573 and followed your guide throughout and guess what, i installed CWM recovery on it !!! But i have to admit, it was a tiresome one, i almost felt like giving up at some point.

    Advice to other MTK6573 readers, make sure you first read the steps for creating the bm folder in the above MTK65XX guide for other MTKS since you'll need it.

    Have fun!

    Thank you once again genius !!

  4. Okay, CWM wont let me wipe data/ factory reset.

    It just doesnt give me the options of ' No ' or Yes - wipe data.

    Its just tells me that 'this process can't be undone .. something like that, and thats all.

    I've tried both images except the touch one after building my custom one from the website.

    Anyway, i learnt a few things here and there, so, i guess thats it. caio

  5. will this work on mtk6577 ?

  6. I have not worked in the model ZhouXing i9300 mtk6577...¿any help?

  7. es├Ęctacular recomendasicimooo sin dudar al pie de la letra amigos

  8. GscriptLite can't find the file Where should I relocate the file for GscriptLite to find it? I have already rooted my phone (using bin4ry restore method for ICS/JB) and installed busybox on it. GscriptLite is also showing other info using superuser access.

    1. needs to be in the GScriptLite folder directly and not inside any other folder.

  9. link are dead, can someone reupload files please?

    link invalid
    link invalid
    and also rest recovries links invalid too, plz help make these available.

  11. will this work on my MTK6577. Plz..
    Actually I found a Recovery.img file in google for my other MTK6575 phone and using Mobile Uncle CWM Recovery is working like charm. Just so simple. Root and Mobile Uncle and Recovery img in SD card...that's it.
    Wondering any one could copy link to such kind of Recovery.img for MTK6577...please.

  12. plz make the links available, the recovery links are all dead

  13. nice info