Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[GUIDE] Recover your IMEI in 9 steps.

OP vaskodogamagmail

16th September 2011, 02:35 AM   |  #1  
OP Junior Member
Flag Tehran
Thanks Meter: 223
 
27 posts
Join Date:Joined: Oct 2009
More
If you did not make any backup of your EFS folder, and your IMEI is messed up, this could be your solution to recover your lost IMEI. NOTE THAT AT LEAST YOU MUST HAVE THE SHIPPED ORIGINAL EFS FOLDER ON YOUR PHONE ( even if you didn't make a backup of it yet and even it's messed up ) FOR THIS METHOD TO WORK

My history with my IMEI:

I flashed my phone with some ROMs, and I didn't backup my EFS folder before, then My SGS2 IMEI was changed to 004999010640000, and we know this is the fake IMEI that is assigned to the phone if the nv_data.bin file is messed up.
so I researched. searched all the forums and didn't find anything that could cure my phone's IMEI and set it to the original IMEI number. so I experimented and after some hours, I fixed my IMEI.
one thing that led me to the conclusion that " .nv_data " file is the thing that I need to fix the IMEI is that they share a very look alike name, and they have the same 2MB size.

PS: I restored my phone's firmware to it's original PDA, Phone and CSC, rooted it with CF-Root, and then done this procedures below

here is what I have done:

you must have:
-Root
-Root explorer for copying files to and from EFS folder
-Android SDK for the ADB tools or Terminal in your phone.


It is interesting to know that the IMEI is stored in ".nv_data" file in ORIGINAL SHIPPED EFS folder too, so you just have to do these:

1) make a copy of your EFS folder to your sdcard using root explorer and then make a backup of the folder to your computer [ to have another copy if you had to format sd card sometime ]

2) delete the EFS folder (BE SURE YOU HAVE BACKED IT UP IN A SAFE PLACE AS SAID IN STEP 1) from the root of your phone using root explorer.

3) reset the phone, after that, go to the root, and you can see that the EFS folder is still there, don't make any mistake, this EFS folder is new and generated by the android OS.

4) go to EFS folder using root explorer, and delete "nv_data.bin", "nv_data.bin.md5".

5) go to your backed up EFS folder on your sdcard, copy the "imei" folder to the EFS folder at the root of your phone, then again go to the backed up EFS folder at yout sdcard and copy the " .nv_data " file to your EFS folder at the root of your phone using root explorer, NOTE: the dot in first of nv_data is not a mistake, copy the ".nv_data" file.

6) make another copy of the ".nv_data" file in EFS folder in your phone, so you would have 2 copies of ".nv_data" in EFS folder

7) rename one of ".nv_data" files to "nv_data.bin" and another one to "nv_data.bin.bak"

8) at your PC open CMD at the ADB tool path, or run Terminal at your phone enter these commands:

adb shell ( use this command of you use ADB, if you're using terminal, skip this line )
su ( ALLOW THE MESSAGE CAME AT YOUR PHONE's DISPLAY BY SUPERUSER PROGRAM )
chown 1001:radio /efs/nv_data.bin

9) reset your phone.... after that you have your original IMEI. you can check your IMEI by dialing *#06#.


and DO IT ON YOUR OWN RISK.
and PLEASE MAKE A COPY OF THE ORIGINAL EFS FOLDER BEFORE DELETING IT. IT HAS IMPORTANT FILES IN IT.
and sorry for bad English.
Last edited by vaskodogamagmail; 17th September 2011 at 03:08 PM. Reason: add more details
The Following 215 Users Say Thank You to vaskodogamagmail For This Useful Post: [ View ]
16th September 2011, 04:38 AM   |  #2  
maddada's Avatar
Senior Member
Dubai - United Arab Emirates
Thanks Meter: 29
 
108 posts
Join Date:Joined: Aug 2011
Thank you very much for taking the time to write this helpful thread, but can you please tell us how your IMEI was changed to a fake one in the first place so that we don't have to go through all this?
16th September 2011, 10:41 AM   |  #3  
Senior Member
Thanks Meter: 4,423
 
23,043 posts
Join Date:Joined: Oct 2010
Quote:
Originally Posted by maddada

Thank you very much for taking the time to write this helpful thread, but can you please tell us how your IMEI was changed to a fake one in the first place so that we don't have to go through all this?


Flashing a rom may often be the only reason .

jje
16th September 2011, 04:18 PM   |  #4  
Member
Thanks Meter: 20
 
96 posts
Join Date:Joined: Oct 2010
More
Had you already made a copy of your EFS folder before your IMEI was changed?
16th September 2011, 05:32 PM   |  #5  
OP Junior Member
Flag Tehran
Thanks Meter: 223
 
27 posts
Join Date:Joined: Oct 2009
More
Quote:
Originally Posted by kcaz

Had you already made a copy of your EFS folder before your IMEI was changed?

No, I didn't had the back up before IMEI change.
To make a conclusion:
... You didn't backup your EFS folder.
... Your IMEI changed because of ROM flashings.
... You want to recover your IMEI.
The Following User Says Thank You to vaskodogamagmail For This Useful Post: [ View ]
16th September 2011, 05:50 PM   |  #6  
angelomaldito's Avatar
Senior Member
Thanks Meter: 69
 
299 posts
Join Date:Joined: May 2011
Donate to Me
More
For the purpose of making a backup of the EFS folder, how about simply copying the whole folder into a safe place?

There is an app called Nitrality (if my spelling is not wrong) which one of its various functions is to backup and restore the EFS folder. I've made a backup using this method and it seems that what the app actually did was simply copying the whole folder into a different directory. If it's simple like that, it seems that Root Explorer or similar app would be enough for that purpose.

Nevertheless, as there are numerous guides on this topic, all of which providing more complex methods, either using ADB or Terminal Emulator (I've made a backup using it as well, just in case, which resulted in the EFS being saved as tarball file), I have some doubts whether simply copying the whole folder would be enough for a eventual restoration. Would it?
Last edited by angelomaldito; 16th September 2011 at 07:37 PM. Reason: Grammar
The Following User Says Thank You to angelomaldito For This Useful Post: [ View ]
16th September 2011, 05:58 PM   |  #7  
OP Junior Member
Flag Tehran
Thanks Meter: 223
 
27 posts
Join Date:Joined: Oct 2009
More
Quote:
Originally Posted by angelomaldito

For the purpose of making a backup of the EFS folder, how about simply copying the whole folder into a safe place?

There is an app called Nitrality (if my spelling is not wrong) which one of its various functions is to backup and restore the EFS folder. I've made a backup using this method and it seems that what the app actually did was simply to copy the whole folder into a different directory. If it's simple like that, it seems that Root Explorer or similar app would be enough for that purpose.

Nevertheless, as there are numerous guides on this topic, all of which providing more complex methods, either using ADB or Terminal Emulator (i've made a backup using it as well, just in case, which resulted in the EFS being saved as tarball file), I have some doubts wheter simply copying the whole folder would be enough for a eventual restoration. Would it?

Just copying your EFS folder to a safe place is enough, using any method, but copying EFS folder messes up wih its permissions, so if you want to restore your nv_data.bin file, you must set the owner of the nv_data.bin using "chown" command in ADB like described in my post.
After all, I hope this method works for everyone, worked for me though.
The Following 4 Users Say Thank You to vaskodogamagmail For This Useful Post: [ View ]
16th September 2011, 06:27 PM   |  #8  
superleeds27's Avatar
Senior Member
Flag Hull
Thanks Meter: 601
 
4,652 posts
Join Date:Joined: Jun 2010
More
Have copied the efs folder onto my PC.

At least i now know i have a backup, i can mess about with permissions there and then if it ever comes down to it!
16th September 2011, 07:24 PM   |  #9  
Senior Member
Thanks Meter: 52
 
220 posts
Join Date:Joined: Oct 2010
More
I do not have the .nv_data file. onle *.bin or *.bak. Any suggestions or do I have to stick with the generic 00... IMEI? The whole procedure did not word for me, but thanks anyway.


By the way I think you do not need adb for that. You can execute the chmod command in a Terminal editor on the phone.
Last edited by Schindler33; 16th September 2011 at 07:41 PM.
The Following 2 Users Say Thank You to Schindler33 For This Useful Post: [ View ]
16th September 2011, 08:55 PM   |  #10  
OP Junior Member
Flag Tehran
Thanks Meter: 223
 
27 posts
Join Date:Joined: Oct 2009
More
Quote:
Originally Posted by Schindler33

I do not have the .nv_data file. onle *.bin or *.bak. Any suggestions or do I have to stick with the generic 00... IMEI? The whole procedure did not word for me, but thanks anyway.


By the way I think you do not need adb for that. You can execute the chmod command in a Terminal editor on the phone.

yes you can use terminal in your phone, but as for information for the other users, you don't need to enter " adb shell " command in step 8, because you are already connected to the phone's kernel.

I think you deleted your original EFS folder that came preinstalled with your phone, because I had " .nv_data " file.

anyway, use " nv_data.bin.bak " instead of " .nv_data " and see what happens.

thanks for the update.

---------- Post added at 07:55 PM ---------- Previous post was at 07:53 PM ----------

Quote:
Originally Posted by superleeds27

Have copied the efs folder onto my PC.

At least i now know i have a backup, i can mess about with permissions there and then if it ever comes down to it!

thank you for your reply. but please don't play with EFS folder too much. the Android OS can't recover your IMEI if you lost it completely. I've been lucky with this method to restore my IMEI.

thanks.
Last edited by xHausx; 8th September 2013 at 08:55 AM.

The Following 3 Users Say Thank You to vaskodogamagmail For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
efs, imei, recover
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes