FORUMS

Which Lockscreen Security Type Do You Use?

From pattern locks to the controversial face unlock, there are a number of different ways you … more

Xposed 3.0 Alpha 3 Released

A new alpha for the Xposed framework is out and brings several bug fixes. You’ll only need to flash … more

XDA Recap: This Week In Android (Apr 18 – 25)

Here in the digital XDA newsroom, we spend our days pouring over an average of … more

Sunday Debate: Custom ROMs vs. Modular Tweaks

Join us in a fun Sunday Debate on Mods and ROMs. Come with your opinions and feel free to … more
Post Reply Subscribe to Thread Email Thread

[REF] Backup /efs folder. IMPORTANT.

7th May 2011, 05:10 PM |#1  
Rawat's Avatar
OP Senior Member
Flag London
Thanks Meter: 534
 
More
This guide is based on a guide by Candanga on the i9000 forums, and some commands from supercurio
Please hit thanks on their posts and show them some love for the write up.

-----------------------------------------------------------------------------------------------------------------------

I’ve compiled a quick guide to instruct how to make a copy of the /efs folder. I’ve found in many threads suggestions about backing up this folder but the methods itself are very general. Most of the times they suggest to “root and copy the folder” with Root Explorer or similar, but usually it’s not that easy or it just doesn't work for everyone.

This guide ASUMES you have read this Excellent Guide by Darkstrikerfirst:
H E R E <-- Make sure to read the ADB Guide.

I recommend doing this with a Mobile just taken out of the box or with any Official ROM of its Service Provider. If you have already Flashed your phone with another ROM but its working fine, then you can use that /efs also.

Why the /efs folder?
This is a very sensitive system folder that contains Phone-specific information such as the IMEI (encrypted in the nv_data.bin), wireless devices MAC addresses, product code (also in the nv_data.bin), and much more. Often users trying to change product codes or trying to unlock the mobile will end up corrupting data in this location.

Why back it up?
Well, let’s resume it saying that backing-up this little folder will keep you away from Samsung service centres.

***WARNING: I take no responsibility to any damage caused by the methods cited and/or written here. Their sole purpose is to back-up data and not to alter in any way the integrity of the original files of the mobile***

What you will need:
  • Rooted SGS II to get permissions as a SU (Super User) and perform the backup
  • I would suggest learning a little about the terminal commands used (in case you are not familiar with them), as it’s better to know what you are doing rather than typing strings like a little chimp without knowing what they are; if you are a little lazy, then you have a good chance bricking your mobile. <- Busybox Commands(or Google them)

The standard prompt of terminal (adb) is a $ sign. Once you enter “SU” it will become a # Sign.

***NOTE: Make sure to keep an eye on the screen of your SGS II during this process, because it may request SU permissions [currently doesn't on CF-root]; else, you will get an error (just if it’s the first time). In Terminal Emulator you will need to reset the app after granting permissions cause it usually freezes***

*Remember: to use ADB you need to enable USB DEBUGGING under Applications/Development in your SGS II.

Here are 3 methods, I recommend that you do both Clean and RAW.

Basic, unix permissions lost :
Code:
su
busybox cp -a /efs /sdcard/efs/
Clean :
Code:
su
busybox tar zcvf /sdcard/efs/efs-backup.tar.gz /efs
After this, you will end up with the file efs-backup.tar.gz in your INTERNAL SDCARD in sdcard/efs/, which is a “tarball” or a ZIP of the /efs folder. That file is your backup. You can expand it with Winrar.

You can also back up the mmcblk0p1 (where /efs is stored) under /dev/block which can greatly support in recovering your IMEI in case of a screw-up:

RAW :
Code:
su 
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
Same thing, the target is the INTERNAL SDCARD in sdcard/efs/, so go ahead and copy the file.
Last edited by Rawat; 4th June 2011 at 08:50 PM.
The Following 91 Users Say Thank You to Rawat For This Useful Post: [ View ]
 
 
7th May 2011, 05:13 PM |#2  
Member
Flag Austin, Texas
Thanks Meter: 16
 
More
+1 just do it....
The Following User Says Thank You to Elite GunnerX For This Useful Post: [ View ]
7th May 2011, 07:34 PM |#3  
Senior Member
Thanks Meter: 4,461
 
More
Can this not be tasked by using a root file explorer and copying efs folder as i have always done .

jje
7th May 2011, 07:42 PM |#4  
Rawat's Avatar
OP Senior Member
Flag London
Thanks Meter: 534
 
More
Quote:
Originally Posted by JJEgan

Can this not be tasked by using a root file explorer and copying efs folder as i have always done .

jje

From the thread:
Quote:

I’ve found in many threads suggestions about backing up this folder but the methods itself are very general. Most of the times they suggest to “root and copy the folder” with Root Explorer or similar, but usually it’s not that easy or it just doesn't work for everyone.

And just copying the folder won't preserve permissions etc.
Last edited by Rawat; 7th May 2011 at 07:45 PM.
7th May 2011, 07:43 PM |#5  
Senior Member
Flag JHB
Thanks Meter: 750
 
More
Quote:
Originally Posted by JJEgan

Can this not be tasked by using a root file explorer and copying efs folder as i have always done .

jje

As long as you don't copy it to /sdcard, because it's VFAT and you'll lose the permissions settings on the files. If you copy it to /data or something then that's fine.
The Following User Says Thank You to RyanZA For This Useful Post: [ View ]
7th May 2011, 09:44 PM |#6  
Rawat's Avatar
OP Senior Member
Flag London
Thanks Meter: 534
 
More
bumpity bump
8th May 2011, 10:01 AM |#7  
Senior Member
Thanks Meter: 4,461
 
More
Quote:
Originally Posted by RyanZA

As long as you don't copy it to /sdcard, because it's VFAT and you'll lose the permissions settings on the files. If you copy it to /data or something then that's fine.

Thanks the SGS 1 EFs i copied was copied to external sd card and then copied off to PC . Did likewise on SGS 2 using Super Manager .
So according to what you are saying that was not going to back up if needed .

jje
8th May 2011, 10:26 AM |#8  
Senior Member
Flag JHB
Thanks Meter: 750
 
More
Quote:
Originally Posted by JJEgan

Thanks the SGS 1 EFs i copied was copied to external sd card and then copied off to PC . Did likewise on SGS 2 using Super Manager .
So according to what you are saying that was not going to back up if needed .

jje

It would probably have worked, but it would have made your EFS files readable and writable by any app that tried - not the end of the world since it's unlikely that any apps would try, but you still might as well avoid it if you can. I don't think there are any executables in EFS or anything that this will actually break though.
The Following User Says Thank You to RyanZA For This Useful Post: [ View ]
8th May 2011, 10:30 AM |#9  
Senior Member
Thanks Meter: 4,461
 
More
Thanks i did lose IMEI at one flash on SGS1 but a second flash recovered it .
I do like full backup of original firmware and anything else before playing with phone .

jje
8th May 2011, 11:57 AM |#10  
Rawat's Avatar
OP Senior Member
Flag London
Thanks Meter: 534
 
More
I've done all 3 forms of backup myself. . Clean, raw and basic
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes