A common problem with every Samsung device, at least for some people, is that when flashing custom ROMs, kernels or other modifications, the EFS data which stores the device IMEI and allows it to connect to the network gets erased or changed, which disables all network connections. Hence it’s always recommended to keep a backup of the EFS partition of the device so it can be restored later on if needed.
For Samsung Galaxy S3 owners that flash custom ROMs etc on their phone, a new tool has been released by XDA Senior Member as i9000 which allows backing up and restoring the EFS data on any variant of the Galaxy S3 with a single click, which you can keep as a backup in case things go awry and you lose the IMEI or if gets changed and needs to be restored to the original.
Oct 07, 2015 I have successfully restored a corrupt EFS folder with an uncorrupted one from the same device - a Samsung Galaxy SIII (GT-I9300) in the past. Copy and paste those and store them on a PC desktop. I have forgotten exactly what I did to restore a '.tar.gz' back up of the EFS, but I'll have a look over the weekend and get back to you. Dec 26, 2013 How to backup & restore EFS partition IMEI for Samsung galaxy S2/S3/Nexus/Note 1. By KTool App Its recommended for users who like to root.
Let’s take a look at how the one-click tool can be used to backup or restore the EFS on a Galaxy S3.
![Img Img](/uploads/1/2/6/2/126268158/643730141.jpg)
Compatibility
This hack and the guide below are compatible only and only with the Galaxy S3 and its variants. Do not try this on any device other than a Galaxy S3.
Warning!
The methods and procedures discussed here are considered risky and you should not attempt anything if you don’t know completely what it is. If any damage occurs to your device, we won’t be held liable
How to Backup and Restore EFS on Galaxy S3
Backup EFS:
- Make sure your Galaxy S3 is rooted. You can use this guide for the international Galaxy S3 to root, this guide for AT&T Galaxy S3, this guide for Verizon Galaxy S3, this guide for T-Mobike Galaxy S3, and this guide for the Sprint Galaxy S3.
- Download and install the software Kies on your computer, which will install the necessary drivers for the phone. Skip if you already have Kies/the drivers installed on the computer.
Download Kies - Download the EFS Backup tool from the source page. Be sure to download the .rar file.
- Extract the contents of the downloaded file to a convenient location on your computer.
- Enable USB debugging on the phone from Settings » Developer options.
- Connect the phone to the computer.
- Go to the folder where you extracted the tool’s file.
- Double-click on the Backup_EFS file, then follow onscreen instructions to backup your Galaxy S3’s EFS folder to the computer, which will be saved in the same folder in the .img format.
Restore EFS:
- To restore EFS if needed, simply double-click the Restore_EFS file and follow onscreen instructions to restore the EFS data. Make sure the backed up EFS file is in the same folder as the tool’s folder.
So, using the one click tool, you can backup as well as restore the EFS aka IMEI data on your Galaxy S3. Make sure to keep the EFS backup safe so it can be used later if required.
A script that attempts to extract nv_data.bin files from an EFSv2partition image.The discussion below is applicable to the Samsung i9300 intl. GSM.However, it may be relevant to other devices as well.
The script should work in the following cases
- You have accidentally formatted your EFS partition incorrectly, but haven't writtenanything to it (for example, when it's been formatted throughSwapper for Root and thus corrupted.
- You have a corrupted the EFS partition through some other means
- Possibly, when the phone is stuck during boot, despite having flashed the stock rom
Corrupted EFS partition
You know that the EFS partition has been corrupted when,
- You are stuck and cannot boot (mine was stuck at the bootloader
Samsung i9300
image when I had CyanogenMod installed) - If you're on stock, you are stuck at the Samsung logo with a flashing blue indicator light
- and you should see the following error when you boot into the stock Samsung recovery:
E:failed to mount /efs (Invalid argument)
The script will not be of any help, since the device has already restoredits default EFS files.
I have only tested the tool on Samsung i9300 intl. (S3), GSMwith EFSv2. It may or may not work with EFSv1.
- Ubuntu / Debian / other *nix operating system
- Python 2.7
- Install a custom recovery, I used CWM (You can skip this step if you have already done so)
- Make a full efs backup from a terminal emulator (I used AROMA, to get a terminal emulator)
dd if=/dev/block/mmcblk0p3 of=/storage/sdcard1/efs_broken.img
- Format your EFS partition using a terminal emulator from recovery (Again, I used AROMA)
mke2fs /dev/block/mmcblk0p3
- Restart the phone, you should now be able to boot into your phone.Wait till you reach the homescreen then continue with the instructions.
- Boot back into recovery, then backup your EFS partion again.This backup provides us with a working default which we shall use later.
dd if=/dev/block/mmcblk0p3 of=/storage/sdcard1/efs_default.img
- Copy over the EFS dumps to your computer
- Next, execute the following on your computer
sudo python efs_recover.py efs_broken.img -g efs_default.img
- If the execution was successful you should see recovered_efs_X.img files have beengenerated. Where X is the number of the image.
- Place the recovered_efs_x.img files on your sdcard
- Reboot your phone into recovery and enter the terminal emulator (AROMA). Decide on a recovered image touse. Replace X with the number you choose
dd if=/storage/sdcard1/recovered_efs_X.img of=/dev/block/mmcblk0p3
- Reboot your phone, go into
About
and see if your IMEI was restored, if not, repeat steps 10 and 11 with adifferent image.
To see help for the script, execute
python efs_recover.py -h
I drew from the knowledge and effort of others in this project. The major contribution was an XDA forumthread by SlashVSuccessful IMEI repair on i9300 without backup.