Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,785,988 Members 55,566 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] If your EFS is corrupt

Tip us?
 
bravomail
Old
#1  
bravomail's Avatar
Senior Member - OP
Thanks Meter 338
Posts: 949
Join Date: Jan 2011
Location: Detroit
Cool [GUIDE] If your EFS is corrupt

When I first got SGS3 I made efs backup as suggested by xda. I didn't backup it as a folder, only as a dd block copy.
So if you are good today - make block copy of EFS and tar copy using adb:

adb shell
su
dd if=/dev/block/mmcblk0p11 of=/sdcard/efs.sbn
cd /sdcard
tar cvf efs.tar /efs


Also there is a way of saving NVRam into recovery. Do it now if you haven't yet:
adb reboot nvbackup

Then if you still don't feel safe download QPST tools from IMEI thread and backup your NVRam to PC.

My earpiece died and I got a replacement SGS3.
Something (CWM6?) caused IMEI corruption. I didn't know that, so I tried reflashing modems and ROMs. I was trying everything to restore my connectivity. It somehow didn't help that there are seversal guides on how to do IMEI restore.
While I was waiting for another tool download I decided to restore efs from my previous SGS3 on to current SGS3 (I was at my wits end). And I didn't backup current EFS - my huge mistake! But I already almost give up on the phone at that point.
QPST+Peoplearmy tool was able to restore my IMEI. But EFS is now corrupt (why? I cannot even mount it!). And I can only use one modem - the one I used when backing up EFS (UCALG1 modem).
On the good side - after formatting EFS and making it clean, I can run CM10.1 without any issues. My serial number is 000000, but who cares.
Here's how to format EFS:

1. Reboot into recovery (CWM 5.8.0.5 touch is my preferred)
2. You should be able to see phone connected to PC in adb (recovery mode)
3. Issue following commands:
adb shell
mke2fs -T ext4 /dev/block/mmcblk0p11
mkdir /efs
mount -w -t ext4 /dev/block/mmcblk0p11 /efs

Lesson learned - try not to mess with EFS at all. Do IMEI restore using QPST and Peoplearmy. I'll keep you posted on EFS restore efforts.
Author of Nostalgia 8 for ATT SGS3, 1.5, 2.3 and 4.0.4 ICS ROMs for Samsung Captivate. ROM and APK compressor.
The Following User Says Thank You to bravomail For This Useful Post: [ Click to Expand ]
 
HiKsFiles
Old
#2  
HiKsFiles's Avatar
Senior Member
Thanks Meter 160
Posts: 525
Join Date: Aug 2010
Location: Québec city

 
DONATE TO ME
Assuming I made a block copy of my EFS partition using "dd if=/dev/block/mmcblk0p11 of=/sdcard/efs.sbn".

How would I restore it should I corrupt my EFS?

Like this?

dd if=/sdcard/efs.sbn of=/dev/block/mmcblk0p11
Samsung Galaxy S3 i747m 32Gb + 64Gb ext. SD
Stock TW Kit Kat 4.4.2 + root + Xposed + Wanam
Daily driver phone
Samsung Galaxy S i9000m 16Gb + 16Gb ext. SD
Slim Kat & Semaphore JB kernel
Backup & flash addiction relief phone
The Following User Says Thank You to HiKsFiles For This Useful Post: [ Click to Expand ]
 
d3athsd00r
Old
#3  
Senior Member
Thanks Meter 280
Posts: 1,508
Join Date: Feb 2011
Default Re: [GUIDE] If your EFS is corrupt

Quote:
Originally Posted by HiKsFiles View Post
Assuming I made a block copy of my EFS partition using "dd if=/dev/block/mmcblk0p11 of=/sdcard/efs.sbn".

How would I restore it should I corrupt my EFS?

Like this?

dd if=/sdcard/efs.sbn of=/dev/block/mmcblk0p11
Correct.

Sent from my SAMSUNG-SGH-I747 using xda premium[COLOR="Silver"]

---------- Post added at 03:19 PM ---------- Previous post was at 03:15 PM ----------

Or you can do the backup in one nice command:

dd if=/dev/block/mmcblk0p11 | gzip -9 > /sdcard/efs.gz

And to restore:

gunzip /sdcard/efs.gz - | dd of=/dev/block/mmcblk0p11


Oh, and you don't need to reformat the partition before restoring, that happens during the restore, because every bit gets overwritten.

Sent from my SAMSUNG-SGH-I747 using xda premium
The Following 3 Users Say Thank You to d3athsd00r For This Useful Post: [ Click to Expand ]
 
Pop45398
Old
#4  
Senior Member
Thanks Meter 114
Posts: 231
Join Date: Jun 2010
Quote:
Originally Posted by bravomail View Post
...make block copy of EFS and tar copy using adb:

adb shell
su
dd if=/dev/block/mmcblk0p11 of=/sdcard/efs.sbn
cd /sdcard
tar cvf efs.tar /efs
The TAR command failed for me on my i747, TAR not found.

Quote:
Originally Posted by d3athsd00r View Post
Or you can do the backup in one nice command:

dd if=/dev/block/mmcblk0p11 | gzip -9 > /sdcard/efs.gz
This worked like a charm for me, thanks.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes