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.
0 comments:
Post a Comment