[Q] suggestions for backup of /efs directory?
I have a Nexus S, on AT&T. upon flashing my first rom (CyanogenMod, via ROM Manager -- yes, I have since read comments that suggest that I should not use ROM Manager, and I will heed them), my IMEI got borked. at the suggestion of bedalus in
this thread, I sent my phone back to Samsung and got it fixed.
I would like not to repeat the down time, so I've been surfing around, looking for a reliable way to back up that /efs directory, but I cannot find a definitive method.
at this link:
http://forum.xda-developers.com/show....php?t=1138873
the script simply does "adb pull /efs", and when I try this at my command line, I get complaints like this:
Code:
$ adb pull /efs
pull: building file list...
pull: /efs/nv_data.bin.md5 -> ./nv_data.bin.md5
failed to copy '/efs/nv_data.bin.md5' to './nv_data.bin.md5': Permission denied
pull: /efs/nv_data.bin -> ./nv_data.bin
failed to copy '/efs/nv_data.bin' to './nv_data.bin': Permission denied
so that didn't work. (I did do "adb shell", su, "cp -r /efs /mnt/sdcard/efs.backup" and that succeeded, so I figure that "adb pull" does not have root privs.) however, there is no way for me to confirm that what I have copied is actually correct. for instance, that nv_data.bin.md5 does not match the md5sum of nv_data.bin.
so I kept looking. this link:
http://forum.xda-developers.com/show....php?t=1074584
mentions using dd. so I typed "mount", found the device for my /efs partition like this:
Code:
# mount
...
/dev/block/mtdblock6 /efs yaffs2 rw,nosuid,nodev,relatime 0 0
whereupon I ran:
Code:
# dd if=/dev/block/mtdblock6 of=/mnt/sdcard/mtdblock6.img
dd if=/dev/block/mtdblock6 of=/mnt/sdcard/mtdblock6.img
13824+0 records in
13824+0 records out
7077888 bytes transferred in 2.138 secs (3310518 bytes/sec)
from my experience with Linux, I figure this last method is the safest, but I'm a bit skittish on flashing a new rom (which caused the whole IMEI problem...), unless I can get some sort of corroboration on whether I can expect this to work in reverse as a method of fixing a bad IMEI, if I should find myself back in the same situation.
any suggestions?