[Q] EFS Backup; VERIFY? - Galaxy S III Q&A, Help & Troubleshooting

I had backed up my EFS in my Galaxy S3 just recently I just want to verify everything is OK. How to do it? Don’t say me to use something like ktool from Play Store and backup & verify from the app. That was the first I tried for the backup process. But it didn't work totally. Now I had backed up EFS with EFS Pro tool by ‘lyriquidperfection’. Again the latest version that was posted on the thread itself didn't work for me. I just used an old version and everything is done. Please just say me how to verify it. This is a serious issue BTW.
Thanks

Forget these tools! Install TWRP-recovery and backup your system including efs-partition or only efs. And trust it and do nothing more.
Alternative: make a backup-archive of efs with BusyBox and TerminalEmulator. This archive's integrity you can check. Very basic & simple.

if with Terminal Emulator
rp158 said:
Forget these tools! Install TWRP-recovery and backup your system including efs-partition or only efs. And trust it and do nothing more.
Alternative: make a backup-archive of efs with BusyBox and TerminalEmulator. This archive's integrity you can check. Very basic & simple.
Click to expand...
Click to collapse
Is this the command for backing up efs partition in Terminal Emulator "dd if=/dev/block/mmcblk0p3 of=/storage/extSdCard/efs.img bs=4096"?
1. What does this "bs=4096" indicate?
2. How to check the integrity then?
Thanks for the help

I didn't use the image, but the archive.
Create: tar -zcvf /sdcard/efs-backup.tar.gz /efs
Validate: tar -tvf /sdcard/efs-backup.tar.gz
Restore: tar -zxvf /sdcard/efs-backup.tar.gz -C /
You may safely restore instead of / to /sdcard/test and compare /efs and test with diff-command.

Related

18 Aug: EFS auto backup script (for devs)

I have now seen a number of cases of the EFS partition getting wiped / corrupted on the SGS II, leaving users with an effectively useless phone.
With this in mind, i've written a little init.d script for my ROM which backs up the EFS partition on boot if a backup does not already exist. A non intrusive safety net for users if you will.
The script just needs a suitable boot image that runs init.d, although it could easily be tacked onto the end of install-recovery.sh if that's not the case.
I'd love to encourage all developers to use this script for users' sake!
You can download the script here - http://cl.ly/2j0p0R3F07052m2T2u0e - but it's very simple, here's the code...
Code:
#!/system/bin/sh
# EFS auto backup script for Samsung Galaxy S II
# By @paulobrien - http://s2.MoDaCo.com
mount /dev/block/mmcblk0p11 /sdcard
if [ ! -f /sdcard/efs.autobackup.img ];
then
dd if=/dev/block/mmcblk0p1 of=/sdcard/efs.autobackup.img
fi
umount /sdcard
Note the manual mount / umount of sdcard is necessary because this happens late in the boot process.
Cheers!
P
Hats of to you Paul.Although I have already made a backup of my EFS folder,such a script would save MANY people from A LOT of trouble.
tolis626 said:
Hats of to you Paul.Although I have already made a backup of my EFS folder,such a script would save MANY people from A LOT of trouble.
Click to expand...
Click to collapse
i havent...never did. i think i wiped about a hundred times now and flashed and reflashed...is it possible to recover the efs folder?
haasgo said:
i havent...never did. i think i wiped about a hundred times now and flashed and reflashed...is it possible to recover the efs folder?
Click to expand...
Click to collapse
If your phone is working, it means your EFS partition is still there...
You can back it up using the many tutorials out there in the forum...
Sent from my GT-I9100 using XDA Premium App
Problem is that the users who read how to backup EFS folder fall in to two category s those that read up first and would have backed up EFS and those that only pick the manual up after something is broke .
This script would be a saver for many of the second group and big thanks to Paul and i hope devs do run with it .
jje
I would like to adapt your script for Nexus S.
Once i got the img file of efs partition, how do can a make a script for restoring thet img file to efs partition?
Or what to do with that img file?
EDIT: @ paul - One more question - how do I mount /sdcard on Nexus S through the script? mount command in the Terminal Emulator shows my /dev/blocks/vold/179:3 as mount point, but if I use that mount point in the script it won't mount the /sdcard. Any idea?
EDIT2: I got it working with this command:
mount /dev/block/platform/s3c-sdhci.0/by-name/media /sdcard
and I got the efs.autobackup.img on my sdcard.
How do I restore the efs.autobackup.img to efs partition?
Thanks Paul this is a very useful utility hope it gets sticky
May i ask what conditions these people are falling foul of getting the EFS wiped? Is it rouge roms/cwm zips, wiping to much in recovery, Odin flashing?
Curious so i may steer clear, have a backup but staying away is half the battle
paulobrien said:
You can download the script here - http://cl.ly/2j0p0R3F07052m2T2u0e - but it's very simple, here's the code...
Code:
#!/system/bin/sh
# EFS auto backup script for Samsung Galaxy S II
# By @paulobrien - http://s2.MoDaCo.com
mount /dev/block/mmcblk0p11 /sdcard
if [ ! -f /sdcard/efs.autobackup.img ];
then
dd if=/dev/block/mmcblk0p1 of=/sdcard/efs.autobackup.img
fi
umount /sdcard
Click to expand...
Click to collapse
Hi Paul, I have modified your script so that it makes a tar file, tar file keeps the permissions for the efs partition and its easier to restore. Here it is:
Code:
#!/system/bin/sh
# EFS auto backup script for Samsung Galaxy S II
# By @paulobrien - http://s2.MoDaCo.com
mount /dev/block/mmcblk0p11 /sdcard
if [ ! -f /sdcard/efs_autobackup/efs-backup.tar.gz ];
then
mkdir /mnt/sdcard/efs_autobackup
busybox tar zcvf /sdcard/efs_autobackup/efs-backup.tar.gz /efs
fi
umount /sdcard
mynamesteve said:
Thanks Paul this is a very useful utility hope it gets sticky
May i ask what conditions these people are falling foul of getting the EFS wiped? Is it rouge roms/cwm zips, wiping to much in recovery, Odin flashing?
Curious so i may steer clear, have a backup but staying away is half the battle
Click to expand...
Click to collapse
Some hit "wipe EFS" in ODIN.
It's possible to mess up a zip badly enough to wipe EFS
A normal wipe shouldn't do it, but a bad CWM build could in theory do it...
A dodgy "virus" could do it, if it were targetting rooted phones, or had a root exploit.
That's why I keep an EFS backup on my PC and off-site
brainmaster said:
Hi Paul, I have modified your script so that it makes a tar file, tar file keeps the permissions for the efs partition and its easier to restore.
Click to expand...
Click to collapse
Nope dd is much better, but safer to have both, but dd should be used with bs=4096k option.
how to restore the efs folder?
how to restore the efs folder?
Please, need to restore EFS, not sure what happened but tried installing Cognition R3 and lost my EFS, I do however have a prior efs.autobackup. Please help.

Is this back up process ok?

Hi Peeps
Been looking into the quickest way into getting back to my fave rooted stock after a quick rom flash. I'm definetly a rom "hopper" and one thing stopping me from really going mad is the "faffing" about getting back to my my working scenario after I decided I was bored of a rom or it went and broke or something putting me off it.
I experimented with CWM backup and restore and was astonished at the "complete" restore it did.
I I backed up my rooted KH3 stock with CWM then wiped the system before trying a new batista70. It was broken again for me so I wiped and tested the restore.
The WHOLE previous system was there, my data, kernels, root, EVERYTHING.
Nothing to set up!
Is this too good to be true have I missed anything.
Can I now try roms to my hearts content and if I want revert back to that Kh3 back up ( or of course have a few backups of different roms and restore as desired )
Thanks
Back up EFS as a standby .
jje
when you backup with CWM does it also backup ur gallery??
JJEgan said:
Back up EFS as a standby .
jje
Click to expand...
Click to collapse
ooh umm whats that and how do I it? thanks!
edit#
just had a quick look and its the imei and harware info section that can get corrupted, I saw some one say you can zip it up with root explorer and do that.
I have made a tar and a zip just in case, what situation would I be in if I needed to restore it and at what point ? thanks?
edit#
ok now have a backup as per
http://forum.xda-developers.com/showthread.php?t=1068193&highlight=efs+backup+restore
here is what you need to know in a nutshell
########EFS BACK UP##########
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)
Terminal Emulator by Jack Palevich (available from the market) <-Terminal Emulator or use ADB which is included in the SDK Development Tools
2 Back Up Methods
CLEAN :
su
busybox tar zcvf /sdcard/efs/efs-backup.tar.gz /efs
RAW :
Code:
su
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
#######EFS RESTORE CLEAN########
Here's how to restore using the Clean Method
su
busybox tar zxvf /sdcard/efs/efs-backup.tar.gz -C /
########EFS RESTORE RAW##########
Either
Code:
dd if=/sdcard/efs/efs_dev-block-mmcblk0p1.img of=/dev/block/mmcblk0p1 bs=4096
Or
Code:
cat /sdcard/efs/efs_dev-block-mmcblk0p1.img > /dev/block/mmcblk0p1
#########KTOOL.APK###############
Easiest Way really app that does it all for you....one click backup..one click restore
http://f.lui.li/get_99_f13d.html
install app....open.....
backup Efs to /sdcard/efs.img (default loc)
restore efs.img (if you moved this to a secure place (dropbox)..copy back to
/sdcard/ (as per backup)
From I gather this should be done before you start messing and flashing
with your shiny new droid.....

Efs Backup

I kinda screwed my efs folder.
I have no IMEI and my Baseband is Unkown.
I tried re-flashing a modem, re-flashing to stock, but nothing seems to work.
So I tried restoring my backup of the efs folder.
I have a backup of my efs folder in 2 forms:
efs_28Oct2011-2110.tar.gz
and
efs.autobackup.img
But I can't get any of these to work. I search all forums, but it just fail everytime.
Anyone has any advice? I really don't know how to apply these backups.
Firstly, be very careful with what you're doing!
You can restore your EFS .img with helcat's kernel companion tool. Download from this post
http://forum.xda-developers.com/showthread.php?t=1182922
OR, in your EFS gz file, find and extract nv_data.bin and copy to your internal sdcard. Now in a terminal emulator or adb
cp /sdcard/nv_data.bin /efs/nv_data.bin
rm -rf /efs/nv_data.bin.md5
After restoring your IMEI using one of the methods above, your SIM might not work. If that should happen, remove the sim card, boot your phone and run this command
su
chown 1001:1001 /efs/nv_data.bin
Well the first way didn't work, actually it cleared the whole efs folder, I don't understand why.
Now i'm trying the second way, but it gives:
Can't create /efs/nv_data.bin : Read-only file system
Ok I managed to restore my complete efs folder, by using Root Explorer and the Tar.gz backup it all went fine, but I still don't have baseband: unkown and no IMEI, so I suppose it was al about the rom after all?
arcshooter said:
Ok I managed to restore my complete efs folder, by using Root Explorer and the Tar.gz backup it all went fine, but I still don't have baseband: unkown and no IMEI, so I suppose it was al about the rom after all?
Click to expand...
Click to collapse
>> First take backup using mybackup pro
>> Flash the ROM Using Odin method,once rebooted do factory reset
>>I believe u should get back
sendhiloo7 said:
>> First take backup using mybackup pro
>> Flash the ROM Using Odin method,once rebooted do factory reset
>>I believe u should get back
Click to expand...
Click to collapse
Well thx, I'm gonna try this, but I just realized that every time I reboot my device, my just restored efs with root explorer is empty again, think I have to fix this first?
This is exactly what happened too me:
http://forum.xda-developers.com/showthread.php?p=18026421
So when i try to restore it :
1)Using Hellcat's kTool .It gives the msg "efs restored.you may want to reboot now."
but when i check in /efs folder it is still empty.And after reboot there is only 1 file named cryptprop_essiv (1 byte) in it.
using terminal emulator
a)i type
Code:
su
busybox tar zxvf /sdcard/efs/efs-backup.tar.gz -C /
it says
Code:
efs/
efs/cryptprop_rebootMode
tar:can't remove old file efs/cryptprop_rebootMode:
read-only file system
#tar:write: Broken pipe
then when i try the above after mounting /efs as r/w in root explorer,then this happens
Code:
efs/
efs/cryptprop_rebootMode
efs/cryptprop_onetimeboot
efs/cryptprop_securewipedata
efs/.files/
efs/.files/.dx1/
efs/.files/.dm33/
efs/.files/.mp301/
efs/nv_data.bin
efs/nv.log
efs/nv_data.bin.md5
efs/dmp/
efs/dmp/sett/
efs/dmp/sett/system/
efs/dmp/sett/system/volume_ring_last_audible
efs/dmp/sett/system/vibrate_on
efs/dmp/sett/system/time_12_24
efs/dmp/sett/system/screen_brightness_mode
efs/dmp/sett/system/volume_ring
efs/dmp/sett/system/volume_notification
efs/dmp/sett/system/volume_notification_last_audible
efs/dmp/sett/system/dtmf_tone
efs/dmp/sett/system/sound_effects_enabled
efs/dmp/sett/system/haptic_feedback_enabled
efs/dmp/sett/system/VIB_FEEDBACK_MAGNITUDE
efs/dmp/sett/system/screen_brightness
efs/dmp/sett/system/screen_off_timeout
efs/dmp/sett/system/mode_ringer
efs/dmp/sett/system/volume_system
efs/dmp/sett/system/volume_system_last_audible
efs/dmp/sett/system/vibrate_in_silent
efs/dmp/sett/system/airplane_mode_on
efs/dmp/sett/system/power_saving_mode
efs/dmp/sett/secure/
efs/dmp/sett/secure/mobile_data
efs/cryptprop_applied_result
efs/imei/
efs/imei/mps_code.dat
efs/imei/bt.txt
efs/imei/keystr
efs/calibration_data
efs/.nv_core.bak
efs/.nv_core.bak.md5
efs/.nv_data.bak
efs/.nv_data.bak.md5
efs/.nv_state
efs/redata.bin
efs/edk_p
efs/cryptprop_persist.sys.timezone
efs/cryptprop_lockscreen.patterneverchosen
efs/cryptprop_lockscreen.password_type
efs/cryptprop_lock_pattern_autolock
efs/cryptprop_lock_pattern_visible_pattern
efs/cryptprop_lock_pattern_tactile_feedback_enabled
efs/cryptprop_lockscreen.lockoutattemptdeadline
#
After this all files get back in /efs,but after i reboot.same problem occurs.no imei.Only 1 file present in folder
cryptprop_essiv
b)when i try to use this method
Code:
su
busybox umount /efs
dd if=/sdcard/efs.img of=/dev/block/mmcblk0p1 bs=4096
it says
Code:
umount:can't umount /efs:Invalid argument
and i just did a little experiment.i just copied a small random file in the efs folder.after i reboot it is gone and replaced by that cryptprop_essiv file.
even if i delete this file and reboot it comes back again.
Click to expand...
Click to collapse
But I can't figure out how he fixed it, just doing whats said there isn't working.
To restore your EFS from your tar.gz file the commands are as following:
Code:
su
umount /efs
mke2fs /dev/block/mmcblk0p1
mount -w -t ext4 /dev/block/mmcblk0p1 /efs
busybox tar zxvf /sdcard/efs_28Oct2011-2110.tar.gz -C /
reboot
Not sure about how to restore your img file though but the tar.gz file should work.
Wow, out of the blue, after I tried every and really every way to restore it, your code just works! HERO! Thx
Now I'm sure my efs folder is fine and not corrupt, but still it gives
IMEI (nothing)
Baseband: Unknown
And it won't recognize my sim.
What is the problem here?

[Q] Qestion on EFS

Hi,
I have few questions in the EFS are..
i know that its the most important folder in Android system and it contains a lot of info abt the phone, imei etc etc....so my questions are...
1. What are the possible scenarios that EFS will get corrupt and show "BAD IMEI"?
2. Why its happening when we are not doing anything on that particular folder?
3. If a phone is never rooted, but flashes new ROMS, is SGS2 prone to EFS folder corrupt?
I am on KJ2 and not rooted and my phone is never rooted and i dont want to root also..at lease for near future....
Appreciate your help guys.....
Yes, EFS contains IMEI, wifi MAC address, product code, and other very important information, most of these in the nv_data.bin folder.
1) Attempting to change the product code, trying to unlock the phone, etc can result in corrupt data in EFS.
2) Answer is same as above, by using dfifferent methods one might try to change product code (example: to force install a rom or something that's not actually meant for his device)
3) SGS2 is a little prone to efs corruption while flashing roms. Installing official roms might have less risks, but still always backup efs folder because if there is no backup to restore, then the only way out is to take the device to a Samsung service centre.
(Assuming you're rooted, run in a terminal)
To Backup:
su
busybox tar zcvf /sdcard/efs/efs-backup.tar.gz /efs
this backs up efs as a .gz file in your internal usb storage.
To Restore:
su
umount /efs
mke2fs /dev/block/mmcblk0p1
mount -w -t ext4 /dev/block/mmcblk0p1 /efs
busybox tar zxvf /sdcard/efs-backup.tar.gz -C /
reboot

Backup I920x EFS partition the easy way

I know there are loads of software which is hit and miss, and with the recent issue of some peeps having efs borked here is the easy way of backing up your partition.
You will need:
Root
Terminal Emulator (free from play)
Open terminal emulator and enter the following:
Code:
su
then press enter (accept su prompt if shown)
then type
Code:
dd if=/dev/block/mmcblk0p10 of=/sdcard/efs.img bs=4096
EFS.img should now be copied to your internal phone memory so best to copy to your pc
I have tested and it copies fine, using linux internals i have compared the files inside the img against those in efs via root explorer and all are present. I have not tried restoring as well ill wait until the disaster happens before tempting fait
To Restore
Copy the efs.img file to phone memory root not in a folder
Open Terminal Emulator
Enter
Code:
su
Then enter the following
Code:
dd if=/sdcard/efs.img of=/dev/block/mmcblk0p10 bs=4096
Reboot once done
AS ALWAYS
You do this at your own risk , dont blame me if the world blows up
Thanks a lot, very useful.:good:
But could you provide the procedure to restore .... just in case of ........
Very good, there should be an app for this.
Tilagoon said:
Thanks a lot, very useful.:good:
But could you provide the procedure to restore .... just in case of ........
Click to expand...
Click to collapse
Yeah i will add restore later today
Sent from my GT-I9205 using XDA Premium 4 mobile app
I did it with EFS Pro:
http://forum.xda-developers.com/showthread.php?t=1308546
treare said:
I did it with EFS Pro:
http://forum.xda-developers.com/showthread.php?t=1308546
Click to expand...
Click to collapse
You did a restore as well?
Kangburra said:
You did a restore as well?
Click to expand...
Click to collapse
Ahem... no
I did it on other phones but i only restore when needed
There's my more easy way,just use rooted explorer to copy the efs folder to your SD,and copy back when U needed.
Did someone have efs backup file for i9205? I really need it. I change IMEI number after restore it.. please..:crying::crying:

Categories

Resources