An alternative to fastboot and clockworkmod recovery to backup and restore ROMs

Last Updated:

  1. theperfectpunk

    theperfectpunk Well-Known Member

    If anyone has problems with fastboot or clockworkmod recovery one can use the flash_image and dump_image commands to backup and restore partitions.

    These commands are currently not built in the Micromax A70 so you'll need to download the binaries attached as and Also you'll need to download Android Terminal Emulator(or adb or a similar app) from the market.

    Oh and one more thing your phone should be rooted for this procedure to work :)

    1. Extract the zip files attached with this post to the sd card root.(You can probably extract it elsewhere but then the commands below should be changed accordingly)
    2. Open Android Terminal Emulator(or adb or a similar app) in the phone.
    3. First Of All type
    Code (Text):
    1. su
    in the Android Terminal Emulator(or adb or a similar app) to get superuser privileges or permissions
    4. Now type the following code to dump or backup a partition.

    Code (Text):
    1. mount -o remount,exec /dev/block//vold/179:1 /sdcard
    2. cd /sdcard
    3. ./dump_image <partition> <location of file to be dumped>
    For example the code to dump the recovery partition in sd card root is :

    Code (Text):
    1. mount -o remount,exec /dev/block//vold/179:1 /sdcard
    2. cd /sdcard
    3. ./dump_image recovery /sdcard/recovery.img
    5. Similarly to flash or restore a partition, type the following code :

    Code (Text):
    1. mount -o remount,exec /dev/block//vold/179:1 /sdcard
    2. cd /sdcard
    3. ./flash_image <partition> <location of file to be flashed>
    For example the code to flash the recovery partition in with a file named recovery.img located in sd card root is :

    Code (Text):
    1. mount -o remount,exec /dev/block//vold/179:1 /sdcard
    2. cd /sdcard
    3. ./flash_image recovery /sdcard/recovery.img

    1. If you encounter out of memory or a similar error, just restart the phone and it'll work :)
    2. Personally i don't recommend these commands to flash anything other than recovery and data partition, as the phone may be operating on files at that instant.

    Attached Files:

  2. ninadchaudhari

    ninadchaudhari What's up !

    Amazing !
  3. ninadchaudhari

    ninadchaudhari What's up !

    There must be a correction in your post there is no need of restart !
    you just go into System tuner pro and then click on kill all and keep on clicking it then use the tool from adb !

    plz do the change also bcaz it was giving the error even after many reboots i posted my previous post !!
  4. theperfectpunk

    theperfectpunk Well-Known Member

    Restarting is the simplest and the easiest,
    i don't want anyone to end a system task.
  5. ninadchaudhari

    ninadchaudhari What's up !

    Nope !
    Restarting will surely close the running programs and free up memory but phone after it starts again will again start up programs that it starts up on boot !!!
    hence there will be problem !! it was in case of me - i have many programs to run at start up
    but doing that solved my program ...

    and anyways what do you exactly mean by closing system task ...
  6. theperfectpunk

    theperfectpunk Well-Known Member

    system tasks/services running in the background should not be altered as it may result in malfunction. :)
  7. ninadchaudhari

    ninadchaudhari What's up !

    I never meant system tasks or programs just open system tuner pro and you will notice many programs running in background ! those can be easily killed ...
  8. Marctwo

    Marctwo Member


    I've managed to extract 'boot', 'recovery' and 'system' images with dump_image. 'data' was not found. What other partitions should I try to get a full set of images of my phone?

    As flash_image would be unreliable for 'boot' and 'system', how could I restore these images?
  9. ninadchaudhari

    ninadchaudhari What's up !

    I am 100% u r on A75 :p
    data will not work on it :p
    u need a different command !
    use userdata ! instead :D any ways i have made a better one click solutions for u guys ! just see the A75 -all things root forum :)
  10. Marctwo

    Marctwo Member

    No... But I'm not on A70 either.

    As I can't find any info at all about my phone, I have to grab bits and pieces where I can find them. Blame Google.

    I did find a command that shows my partitions ('cat /proc/mtd') and you're right, 'userdata' was one of them.
  11. mastermind1024

    mastermind1024 Well-Known Member

    Why blame Google???thanks to google only that we are getting smartphones at so cheaper rates n also able to mod them as its opensource...that's y we are able to have great custom roms like cyanogen..
    Rather blame ur manufacturer...btw which phone it is?
  12. Marctwo

    Marctwo Member

    I was saying blame Google (the search engine) that I ended up finding and posting to this thread.

    The phone is a W008+ iClone. Well actually, it's currently a bricked W008+ iClone. :( Not related to dump/flash image, I might add.
  13. ninadchaudhari

    ninadchaudhari What's up !

    Well sure then u can have it unpicked if it is a clone of A70 :)
    Just boot to Fastboot mode mode and flash individual images and voila !!
    u r un bricked :)
  14. Marctwo

    Marctwo Member

    If only... I haven't been able to get Fastboot working even before it was bricked. It'd be great if I could as I could just boot with and external image and sort it out from there.

    It also won't get as far as factory/recovery.
  15. ninadchaudhari

    ninadchaudhari What's up !

    Well for anything now u need fastboot or the custom recovery ...
    if u have custom recovery you can easily flash the stuff ..
    else fastboot always works :p

    u HAVE to get fastboot working :D :D
  16. Marctwo

    Marctwo Member

    Yeah, but that's easier said than done... Especially for a n00b like me. :(

    I did happen to extract all partitions with dump_image before this so I'm hoping I can restore them with Mediatek Flash Tool.... but I've got to wait for a serial->usb cable to be delivered.

    This all started from creating /etc/gps.conf. Any idea which partition that would be on?
  17. mastermind1024

    mastermind1024 Well-Known Member

    It will be on system partition..
    can't say which mtdblock,it's device specific.we can find it out if u have come unbricked..
    Marctwo likes this.
  18. Marctwo

    Marctwo Member

    Thanks for that.

    I believe 'system' is on mtdblock8 on my phone... I can't think how to use that info though.

    Still bricked BTW.
  19. Marctwo

    Marctwo Member

    Well it's only a semi-brick now.

    I've been using MTK Flash Tool to flash the images I extracted with dump_image. The ones from FAT partitions like recovery, boot, etc. seem to flash ok. But the images from yaffs2 partitions like system, secstatic, etc. are not working. I think the problem is that they are not yaffs2 images...

    So I'm now looking for a way to convert these images to yaffs2.
  20. ninadchaudhari

    ninadchaudhari What's up !

    All images used by Droid are yaffs2 :p except for sd-card !! [and some if configured by OEM]
    boot, recovery are like 101% yaffs2 :p
    else it won't boot
    btw u should NEVER flash secstatic image ...
    flashing it causes brick as the image is encrypted when in phone
    Hope ur device boots now else u will have to get something official image of secstatic ...
    DSP_BL AND SEC_STATIC must NEVER be flashed
    and userdata.img and nvram.img contain user info hence NEVER publish unless u have done a factory reset ...

    u do not have perfect images ...
    whch phone u r using ?
  21. Marctwo

    Marctwo Member

    The phone I'm 'NOT' using is W008+ mt6516 based iClone.

    According to the mtk flash tool config files, secstatic is to be flashed but seccnfg (along with some others) is not. Also, of the images to be flashed, system, secstatic and userdata are configured as yaffs2 and most of the others are configured as FAT.

    I've flashed boot and recovery and they seem fine. I can now boot to recovery - it does me no good though as I don't have the home key that I believe is necessary to get past the triangle screen. I can also adb the phone when booting normally but system is unreadable and the normal file structure is not there.

    I can flash system as a FAT image in which case the file structure seems to be there but the permisions are messed up so I can't view it and it doesn't boot fully.

    So I think if I can convert the images to yaffs2 then that may solve my problem.

Share This Page