Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
krodrigu
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 2
Join Date: Aug 2011
Location: Denver, CO
Default [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?
 
02xda2
Old
#2  
Senior Member
Thanks Meter 11
Posts: 238
Join Date: Jul 2005
Quote:
Originally Posted by krodrigu View Post
....
any suggestions?
How about using 'Android Commander by PanPiotr' to pull the /efs folder to your PC ?

---------- Post added at 05:54 AM ---------- Previous post was at 05:39 AM ----------

Look HERE as well..
 
bedalus
Old
#3  
bedalus's Avatar
Recognized Contributor
Thanks Meter 4977
Posts: 4,740
Join Date: Jun 2011
There's no reason why you can't copy the efs folder* to your sdcard then copy it normally via USB.

*using terminal emulator or root explorer

Obscurely referenced from the fifth dimension on my Nexus S
For various benchmarks, see my threads: >here<
 
ethan_hines
Old
#4  
Member
Thanks Meter 15
Posts: 60
Join Date: Jun 2012
Quote:
Originally Posted by bedalus View Post
There's no reason why you can't copy the efs folder* to your sdcard then copy it normally via USB.

*using terminal emulator or root explorer

Obscurely referenced from the fifth dimension on my Nexus S
The only problem is, if you use term emulator or root explorer to copy /efs to the sdcard, you loose the permissions and ownership settings of the files.
 
polobunny
Old
#5  
polobunny's Avatar
Senior Member
Thanks Meter 1087
Posts: 2,973
Join Date: Oct 2011
Location: Montreal
Quote:
Originally Posted by ethan_hines View Post
The only problem is, if you use term emulator or root explorer to copy /efs to the sdcard, you loose the permissions and ownership settings of the files.
chmod 755 for almost everything but a few that are 666. When in doubt, chmod 755 everything. At worst, it could get --*gasp*-- deleted by a rogue app. But then you'd paste it again.
Please press THANKS if someone helps you!

My current configuration:
 

Device: Samsung Galaxy S3 SGH-i747M
ROM: cm-10.1-20130515-NIGHTLY-d2att
Kernel:Leankernel v5.9
Baseband: I747MUMLL1
Governor: InteractiveX/ROW


Older device: Nexus S i9020A
The Following User Says Thank You to polobunny For This Useful Post: [ Click to Expand ]
 
Post Reply+
Tags
brick, efs, imei, nexus s
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...