ClockworkMod (CWM) Recovery Backup and Restore Android Phone Firmware

In my last post, I introduced ClockworkMod (CWM) Recovery to backup your phone firmware. It is a good idea to copy these backup files to your computer for safe keeping.

You will find the ClockworkMod(CWM) Recovery firmware backups in this location on your phones internal memory.


/sdcard/clockworkmod/backup

You'll need Dobrica Pavlinušić's shell script to copy the ClockworkMod(CWM) Recovery backups to your computer. For some unknown path related issue the standard Unix 'cp' will not work. You won't be able to copy these backup files to your computer, however you can copy files from computer to phone without any problem.

#!/bin/sh -x

sdcard=/sdcard/clockworkmod/

adb shell ls -1 -d $sdcard/backup/* | sed "s!$sdcard/*!!" | tr -d '\r' > /tmp/backup.android
ls -1 -d backup/* > /tmp/backup.disk
diff -uw /tmp/backup.android /tmp/backup.disk | grep -- '^-backup' | sed 's/^-//' | \
xargs -i sh -xc "mkdir -p {} && adb pull $sdcard/{} {}"


To restore your phone firmware from your backups. Copy the ClockworkMod(CWM) Recovery files to the backup directory on the phone. Reboot the phone into recovery mode and use the Backup / Restore option to restore the firm.


Lately, I use this technique to deploy Boot2Gecko quickly onto compatible phones when the Boot2Gecko builds breaks. The new B2GBuilds.org project started nightly build of Boot2Gecko, you might want to check it out. Personally I would prefer the B2GBuilds.org project builds Cyanogenmod style otapackages instead. Support for this is coming soon, watch this space.

2 comments:

  1. Requirements
    Among the most important requirements you should consider if you want the whole procedure to go well are the following: download the ClockworkMod Recovery file. And that’s it. Everything from here onward will be very easy to perform. You just need to pay extra attention.
    For more information visit: Android recovery

    ReplyDelete
  2. hi there i used CWM Munjeni v5.5.0.4 i did was Used back up and restore option> in there i used backup option and the backup process begun > after backup in CWM folder i got an folder named backup> in that backup folder there was another folder named ""2014-04-11.17.41.43"" i guess its data and time used as name of the folder and in that folder this actual 4 backup files were there which are two rar files named "data.ext4.rar" and "system.ext4.rar" also other two files are ""boot.img" and ""recovery.img" .

    FYI after backup i had fashed and installed CM10 for HTC Desire C .
    But just in case if i want to get back to original stock ROM then how do i get back to it using these backup files i have ? and i what sequence i should use these files?
    can any1 help? has any one experienced this type of backup and restored using these type of files?

    also FYi i have win7 pc so do i need to use this shell script and all?

    ReplyDelete

You can leave a comment here using your Google account, OpenID or as an anonymous user.