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

Search This thread

xMopx

Senior Member
Oct 13, 2010
81
58
EDIT:

THIS SHOULD NO LONGER BE USED.

PLEASE SEE THIS THREAD FOR RECOVERING YOUR IMEI - http://xdaforums.com/showthread.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:
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:
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.
 
Last edited:

jdubau55

Senior Member
Sep 1, 2010
239
43
Radford, VA
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.
 
Last edited:

Kipland007

Senior Member
Dec 12, 2011
85
9
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!
 

tprouty

Senior Member
Dec 10, 2010
110
25
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?
 
  • Like
Reactions: majmuni

ruben8448

Senior Member
Nov 1, 2009
320
18
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
 
  • Like
Reactions: majmuni

tprouty

Senior Member
Dec 10, 2010
110
25
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
 

Schaweet

Senior Member
Aug 2, 2010
700
173
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
 
Last edited:

Smok3d

Senior Member
Mar 26, 2011
389
43
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.
 

TheBiles

Senior Member
Jan 27, 2010
3,573
176
34
North Carolina
www.flickr.com
Worked like a charm! Would love to hear about someone actually restoring it now.

MVvna.png
 
  • Like
Reactions: Durthquake

turbosrrgood

Senior Member
One of the more helpful posts I have seen to this point (provided it actually works to recover lost IMEI's). This issue was probably making many people hesitant, having a safeguard is always good. This is also extremely easy to do.
 
Last edited:

sooner2k1

Senior Member
Dec 5, 2010
63
6
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.

I flashed CM10 on my S3 from the rooted Bean rom and I can confirm that with a clean install my IMEI is missing and I have no "own number".
I do however have working data, phone, messaging. Could you explain what you mean by a phone being "toast". Is there some other consequence I'm not seeing yet? If I go to another rom or back to stock is my phone going to brick?

I've seen bits of pieces of info about the missing IMEI, and I'm hoping somebody can clarify what this means for me since my phone is technically working as expected.

Thanks

---------- Post added at 01:32 PM ---------- Previous post was at 01:25 PM ----------

I flashed CM10 on my S3 from the rooted Bean rom and I can confirm that with a clean install my IMEI is missing and I have no "own number".
I do however have working data, phone, messaging. Could you explain what you mean by a phone being "toast". Is there some other consequence I'm not seeing yet? If I go to another rom or back to stock is my phone going to brick?

I've seen bits of pieces of info about the missing IMEI, and I'm hoping somebody can clarify what this means for me since my phone is technically working as expected.

Thanks

Sorry I just wanted to clarify. My IMEI is existing, but "My phone number" is blank. Also something called "MIN" is blank. I have been getting a popup asking me for a sim unlock.

Sorry for any confusion. Please ignore if i'm derailing the thread. It just sounds like a similar issue.
 

s1mpd1ddy

Senior Member
Feb 24, 2011
777
75
Worked using android terminal, on my ATT S3. Nice to know I have a backup -- eases my mind just a bit.
 

zonly1

Senior Member
Dec 9, 2010
933
297
SL,UT
Well, a couple of things.

1. I'm on TMo
2. I'm on CM9

I have two phones...one borked and one good.

Went ahead and tried this..when I did the re-provision thing I got an error Connection problem or invalid MMI code. I assume that this is caused by being on TMo.

Bottom line, my serial # is for the correct phone, and this did not move over my IMEI from my working phone. My borked phone still shows IMEI 0
 

kssxs

Senior Member
Nov 19, 2005
189
29
Well, a couple of things.

1. I'm on TMo
2. I'm on CM9

I have two phones...one borked and one good.

Went ahead and tried this..when I did the re-provision thing I got an error Connection problem or invalid MMI code. I assume that this is caused by being on TMo.

Bottom line, my serial # is for the correct phone, and this did not move over my IMEI from my working phone. My borked phone still shows IMEI 0

As per the OP, it makes sense that it didn't work for you. We need someone with a valid backup to test this theory out to see if it restores their IMEI.
 

naturefreak85

Senior Member
Jun 18, 2007
932
155
Boca Raton
If a brand new phone is not good enough, I'm not too sure what else is...just sayin'.

You did do a reboot after attempting to restore correct? Keep in mind, Verizon due to it's dual type of network (CDMA/LTE) has that extra need for the provisioning, thus the code they use to activate is needed. Remember we use GSM, there is no special activation needed except pop a SIM in and power up. Try putting your SIM in the old phone and powering on.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 51
    EDIT:

    THIS SHOULD NO LONGER BE USED.

    PLEASE SEE THIS THREAD FOR RECOVERING YOUR IMEI - http://xdaforums.com/showthread.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:
    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:
    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.
    11
    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
    7
    I'm not sure if anyone has already mentioned this, but I just realized that your IMEI number is actually printed on the sticker on the box the phone came in. It's under the UPC code, and it matches exactly what should be shown in your phone's settings. I'm not sure this will actually help out, but it will at least let you know if you have the right IMEI number in your phone. Perhaps eventually someone will find a way to manually enter the IMEI code back into the phone if it gets lost???

    EDIT: Also, if you make a Nandroid backup of your phone while your IMEI is present, and then restore back to that Nandroid if you lose your IMEI, does that make it come back? Or is the IMEI independent of what gets backed up during a Nandroid?

    Good find, all thoughts help! But we are way past that at this point.



    I have good news and bad news.

    Bad news is I cannot replicate this error! I've flashed non stop cm10/paranoid/aokp and back. I restored from my nandroid backup - something I haven't done was ODIN back though. One of the common themes of people losing their imei seemed to happen when they Odin back to a stock image..... but that's just one scenario of many.

    GOOD NEWS: I bought another sgs3 for development and to study this imei issue! Since this seems like a CM problem, I'm going to really abuse this second phone. Opened up a new BS Verizon line to do so. Let the games begin :beer:

    Sent from my SCH-I535 using xda app-developers app
    5
    This is awesome news! Please share how you did it!

    Sent from my SCH-I535 using Tapatalk 2

    I will post up a tutorial later tomorrow (or today). It will either be in a new thread or in this one depending on what you guys prefer (you just have to be aware, that its contents will be different than what is in here).
    3
    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.