As we all know that /efs folder keeps the sensitive and secret information of your phone such as IMEI Number and product code (which are stored in the encrypted form in nv_data.bin), Wireless devices MAC addresses and many more information. This info is secret to you and your precious device.
Sometimes, the users corrupt their secret data stored at this location when they unlock their phone or while changing the product codes.
And if you have a backup of this folder, it would be very easy for you to replace the files and folder with the corrupted one, if by chance it corrupts.
Candanga from xda has posted his method to do the same and we are presenting those steps here. The developer has tested this on his Samsung Galaxy S I9000
The foremost condition of this to work is that your phone must be rooted. Follow our below posts for this.
Rooting SGS2 I9100
The developer recommends that you should follow the below mentioned procedure with new smartphone having the Official ROM installed. But if you have flashed another ROM and its working fine then there’s no harm in backing that efs folder.
Backup efs folder on SGS – Instructions
1. You need to have Terminal Emulator (that can be downloaded from Market) or ADB.
2. Please focus on the Samsung Galaxy S phone screen as it will ask you for SU permissions. In Terminal Emulator, you have to reset the app after giving the required permissions because normally it freezes.
3. For using ADB, Go to Applications –> Development and Enable USB Debugging. When you are done with the files, you need to off it so that you can get files.
tar zcvf /sdcard/efs-backup.tar.gz /efs (OR)
busybox tar zcvf /sdcard/efs-backup.tar.gz /efs
4. Now, you will have the file efs-backup.tar.gz in your Internal SD Card, which is a zip / tar file of ‘efs’ folder. This is your backup file of /efs folder. Congrats 🙂
5. You can also backup st13 under the /dev/block. It supports to recover the IMEI in case of screw-up.
cat /dev/block/stl3 > /sdcard/efs_dev-block-stl3.img (OR)
busybox cat /dev/block/stl3 > /sdcard/efs_dev-block-stl3.img
6. Here also, you will have this backup file in your Internal SD Card.
Restoring nv_data.bin on Samsung Galaxy S
In case by playing with nv_data.bin, your IMEI is screwed up and you are getting exceptions as below:
• Unable to download apps from Market
• Unable to lock SIM using you PIN
• Fake IMEI Number
• Some apps are downloading form Market on their own, without your permission.
• SIM card icon blinking
For all of above issues, you need to upload the fresh copy of this nv_data.bin file back to your mobile.
Instructions to restore nv_data.bin
1. Copy the file from the backup (efs-backup.tar.gz)
2. Paste the above backup file in Internal SD Card.
cp /sdcard/nv_data.bin /efs/nv_data.bin
rm -rf /efs/nv_data.bin.md5 (OR)
busybox rm -rf /efs/nv_data.bin.md5
3. Reboot your phone.
4. Most probably, now your SIM will not work and you will not be able to login into your phone. Please don’t be panic. We are with you 🙂
5. Pop off the SIM.
6. Boot your smartphone.
7. Run the below commands
busybox chown 1001:1001 /efs/nv_data.bin or
chown 1001:1001 /efs/nv_data.bin
The above commands will change the file ownership.
8. Try now 🙂
We are not responsible for (if any) damages. Please do at your risk.
All support is at xda thread