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

How-to: Backup and restore your IMEI / MEID / EFS Data

Tip us?
 
xMopx
Old
(Last edited by xMopx; 30th July 2012 at 08:23 PM.)
#1  
Member - OP
Thanks Meter 58
Posts: 74
Join Date: Oct 2010
Arrow How-to: Backup and restore your IMEI / MEID / EFS Data

EDIT:

THIS SHOULD NO LONGER BE USED.

PLEASE SEE THIS THREAD FOR RECOVERING YOUR IMEI - http://forum.xda-developers.com/show....php?t=1802024



Hi guys,

I tried flashing AOKP on my S3 yesterday and had my IMEI value set to zero, a rare(ish) error that some users have been running into with AOKP and the unofficial Cyanogen builds for this phone. If your IMEI is lost and you don't have a backup, your phone is basically toasted. So, I had to get my phone replaced which wasn't much trouble.

After speaking with invisiblek we determined a way to back up the EFS partition (which is where the IMEI and MEID is stored).

You need to do this on a rooted phone, it's been tested only with root66. You need USB debugging on and adb on your computer.

Code:
Select Code
adb shell
su
dd if=/dev/block/mmcblk0p11 of=/sdcard/efs.sbn

(exit adb)

adb pull /sdcard/efs.sbn
DD is a linux utility that can be used to copy data from point a to point b and many, many ways. What we did here is copied the EFS partition to a single file (and then copied it to your PC). The efs.sbn file was about 13.6mb, but I've heard reports as low as 10mb. We can reverse this process to restore as well:

Code:
Select Code
adb push efs.sbn /sdcard/efs.sbn
adb shell
su
dd if=/sdcard/efs.sbn of=/dev/block/mmcblk0p11
reboot
This time we wrote the backup file to the EFS partition. After doing this you need to dial *2767*3855# to re-provision your phone.

My experience: When installing AOKP, my IMEI was replaced with most of my MEID, even after reverting my rom to root66. (This causes mobile data not to work). After restoring my backup and provisioning, I regained full functionality of my data and phone. I haven't had a chance to try this with a phone where the IMEI is set to 0, but I think it's safe to assume this would fix that as well.

I would HIGHLY recommend making a backup before doing anything to your phone. Making a backup is read-only is poses no chance of something going wrong.

EDIT: For clarification: If your IMEI is already messed up, this will NOT get it back. You need a backup from BEFORE it was corrupted.
The Following 51 Users Say Thank You to xMopx For This Useful Post: [ Click to Expand ]
 
jdubau55
Old
(Last edited by jdubau55; 23rd July 2012 at 04:54 PM.)
#2  
Senior Member
Thanks Meter 40
Posts: 231
Join Date: Sep 2010
Location: Radford, VA

 
DONATE TO ME
Can we run this in Terminal Emulator to get the same output? Last time I tried ADB on this phone I wasn't recognizing it. Could have been my computer though. ADB devices came back with no attached devices last time.


Looks possible. Your just telling it to save that file to the root of the internal SD and then telling ADB to pull it. Don't see why you couldn't save to SD then just Dropbox it or something.

Edit: Did it in Terminal Emulator. Saved to SD. Uploaded to Dropbox. Will also hook up my phone and pull it that way. Looks like pushing will work the same way as long as the file is on the root of SD.
The Following 3 Users Say Thank You to jdubau55 For This Useful Post: [ Click to Expand ]
 
Kipland007
Old
#3  
Member
Thanks Meter 9
Posts: 76
Join Date: Dec 2011
Thanks so much. I also ran with terminal emulator and backed up.

Hopefully someone can verify that this will work with the IMEI = 0 issue, as that will allow us to continue to flash!
 
Budwise
Old
#4  
Senior Member
Thanks Meter 13
Posts: 144
Join Date: Jun 2011
Worked for me in Terminal as well. Zipped it up and emailed to myself. 13.6MB
 
tprouty
Old
#5  
Senior Member
Thanks Meter 25
Posts: 106
Join Date: Dec 2010
so I have a question about this -
I flashed CM9 the other day and it was taking over 20 min to activate and I did a battery pull, then I restarted and it activated just fine.
then i started reading all these posts about how that will break your IMEI and it got me wondering because I no longer get 4g, I get 3G just not 4G.

before I did this my MEID read the same as my IMEI but had less numbers. (just like 2 or 3) after doing *2767*3855# go back into status and see that I now have HEX and DEC under MEID which I did not have BEFORE the *2767*3855#

my question is - is there a way to test the 4G some how - I checked VZW site it says I am in a 4G area, is there a number of sort I can look at in status or somewhere else on my phone?
The Following User Says Thank You to tprouty For This Useful Post: [ Click to Expand ]
 
ruben8448
Old
#6  
Senior Member
Thanks Meter 17
Posts: 311
Join Date: Nov 2009
Location: Peoria, AZ
I'm new to this can someone tell me would in use those same commands on terminal emulator to get it? And I'm on unofficial cynogen right now so my next question is if I do corrupt it how do I place the imei back to get it woeking? Thanks

Sent from my SCH-I535 using xda premium
The Following User Says Thank You to ruben8448 For This Useful Post: [ Click to Expand ]
 
tprouty
Old
#7  
Senior Member
Thanks Meter 25
Posts: 106
Join Date: Dec 2010
Quote:
Originally Posted by ruben8448 View Post
I'm new to this can someone tell me would in use those same commands on terminal emulator to get it? And I'm on unofficial cynogen right now so my next question is if I do corrupt it how do I place the imei back to get it woeking? Thanks

Sent from my SCH-I535 using xda premium
yes use

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

and to restore

su
dd if=/sdcard/efs.sbn of=/dev/block/mmcblk0p11
reboot
The Following 11 Users Say Thank You to tprouty For This Useful Post: [ Click to Expand ]
 
Schaweet
Old
(Last edited by Schaweet; 23rd July 2012 at 06:14 PM.)
#8  
Senior Member
Thanks Meter 158
Posts: 626
Join Date: Aug 2010
Quote:
Originally Posted by ruben8448 View Post
I'm new to this can someone tell me would in use those same commands on terminal emulator to get it? And I'm on unofficial cynogen right now so my next question is if I do corrupt it how do I place the imei back to get it woeking? Thanks

Sent from my SCH-I535 using xda premium
If using terminal emulator just skip straight to the line that has "su" on it and go from there. Same thing when putting it back in after it gets messed up.

The key is to put it somewhere safe as it will store it on your internal sdcard. This is called "sdcard" on your device. I just sent a copy to my drop box.

If it gets mesed up, then I would Odin back to stock rooted and just take the copy you have stored somewhere other than on your phone and put it back in the "sdcard" but not in any folder, just in the root directory. Then simply follow the restore directions in the OP but skip straight to the SU line.

That said. I'm still waiting until the RIL gets fixed. TW isn't that bad and with the mods and replacement launchers and apps the phone is nearly stock anyway. I'm being patient.



Sent from my SGS3
 
Smok3d
Old
#9  
Senior Member
Thanks Meter 43
Posts: 361
Join Date: Mar 2011
Quote:
Originally Posted by tprouty View Post
so I have a question about this -
I flashed CM9 the other day and it was taking over 20 min to activate and I did a battery pull, then I restarted and it activated just fine.
then i started reading all these posts about how that will break your IMEI and it got me wondering because I no longer get 4g, I get 3G just not 4G.

before I did this my MEID read the same as my IMEI but had less numbers. (just like 2 or 3) after doing *2767*3855# go back into status and see that I now have HEX and DEC under MEID which I did not have BEFORE the *2767*3855#

my question is - is there a way to test the 4G some how - I checked VZW site it says I am in a 4G area, is there a number of sort I can look at in status or somewhere else on my phone?
Download the "Phone Info" app and see if you can change it to get 4g again. if not, you might wanna try restoring back to stock using ODIN to see if that helps.
 
ruben8448
Old
#10  
Senior Member
Thanks Meter 17
Posts: 311
Join Date: Nov 2009
Location: Peoria, AZ
Quote:
Originally Posted by tprouty View Post
yes use

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

and to restore

su
dd if=/sdcard/efs.sbn of=/dev/block/mmcblk0p11
reboot
Thanks, its backed up. I feel better now in case i need to restore back to stock. I appreciate it.

Tags
imei, sgs iii
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes