[GUIDE] how to get IMEI to stick across reboots
This is a rundown of restoring your IMEI and /efs partition. A lot of people lose their IMEI and have no problem restoring it a variety of ways. But if your restored IMEI disappears on next reboot, your problem is something else. I had this, and I believe it was a corrupted /efs partition.
solution, short answer:
flash a good efs.rfs file. I did it in Heimdall; I assume it'll also work in Odin. The one I found online (see attachment) restored my efs to the dummy IMEI of 004999010640000. Where I live and on my provider, this gives me network access. From there I could restore my backup nv_data.bin file to /efs. And then my proper IMEI sticks across reboots.
kitch posts another way to fix this, here
Messing with IMEI has potential legal problems. The attached file restores IMEI to a fairly common dummy number, so I assume it's not a problem. (mods, please delete if this is a problem). The dummy IMEI could work in your area, but that still could pose legal problems. Check in your area, and see the next paragraph.
I found this file on Rapidshare. I don't know who made it, put it there, where it might have been linked from, or what exactly is in it. All I had was a filename and I googled it. And all I know about it is that if you have the problems described above and below, then this may work for you. It did for me. If anyone can "see" inside the file to check that it doesn't contain anything malicious, please comment. All I can say is that ClamXav found nothing wrong with BML3_RESTORE.tar.md5 or the efs.rfs contained within it. And that I'm not responsible for what you do to your own phone.
More ways to check if this is your problem:
- You have no signal. In System Settings > About phone, Baseband says Unknown, even if you know you have a modem in there. Also, them going to Status, your IMEI and IMEI SV also say "Unknown". Other people posting about lost IMEI say they have either all zeroes there, or the dummy IMEI 004999010640000.
The rest of this is what I did in GB. I assume if you have this problem, you tried other solutions that got you here too.
- Flashing stock Samsung ROM with repartition doesn't restore IMEI (at least in Heimdall; I can't check Odin). Flashing EZbase Recovery in Heimdall doesn't do it either. They flash, but afterward boots to recovery mode and shows errors about not being able to apply Multi-CSC.
- in Terminal Emulator or adb, running 'mount /efs' returns: 'mount: can't read 'etc/fstab/': no such file or directory'.
- From here, you can still flash a rooted kernel and flash GB ROMs in CWM recovery mode. After each flash, recovery mode shows errors about not being able to mount /efs and/or /dbdata, and not being able to apply CSC.
- From here, if you try flashing to CM7 or CM9, installation aborts. Onscreen error message shows problems with /tmp/updater.sh.
- If you tried to flash a recent kernel with Heimdall, you can
get in its recovery mode. I did this trying to get to a known working JB nandroid. I flashed the JB rom again, and it completes. Rebooting sent me back to recovery mode. Repeat rebooting until fed up. Restoring nandroid completes. Rebooting sent me back to recovery mode. Repeat rebooting until fed up.
solution, long answer:
For me, this was from GB.
- Flash the attached file. For Heimdall, untar it (in command line, run 'tar -xvf /path/to/BML3_RESTORE.tar' without quotes, and replacing /path/to/ with the proper filesystem path. If you don't know what this is, try dragging and dropping the file into your terminal window on your computer.)
Then run: 'heimdall flash --efs /path/to/efs.rfs' (without quotes, again replacing path, or drag-and-drop the file into your terminal window)
On first attempt (second was other human error), I did not flash a whole package with PIT file, or repartition. I did later, and that worked fine, too.
- It automatically reboots (unless you told Heimdall not to). You may go to recovery mode and see a bunch of errors about mounting, but applying Multi-CSC is a success. Reboot, and the phone starts normally. You may momentarily see the circle-and-slash no-signal icon in the upper left corner, but soon after it should show signal bars. Your homescreen may show your network somewhere.
- Check IMEI. It should be the dummy number. You can do this with the phone's number keypad (typing *#06#). I prefer to go to System Settings > About phone > Status. This way you can see the dummy IMEI, and IMEI SV should now also show a number. Go back up one level and also check Baseband; that should now show your modem.
- Restore actual IMEI. This requires that you previously backed up your /efs folder. Restoring this is documented better and more thoroughly elsewhere. I went into my /efs backup folder and copied nv_data.bin to /efs. This is easy with Root Explorer. Press the filename, select copy, navigate back up and to /efs. At the top of the screen, click Mount R/W. Delete everything in there (menu, multi-select, select all, delete). Paste the file. Long press the file, change permissions. Make it 644 (Owner is Read+Write, others are Read), save. Long press again, scroll toward bottom of menu and Change Ownership. Make it Radio (1001) and Radio (1001), save. Click to Mount R/O and exit.
- Check it. Go back and check your IMEI and it should be your real one. IMEI SV should probably change, too. (For me, it was 01 in GB, but now it's 03 in ICS). Reboot, and it should remain. Baseband is also filled in.
From here you can flash up to ICS, or whatever, and your IMEI should remain.
note on attachment:
The original filename I searched for and found on Rapidshare was BML3_RESTORE.tar.md5. I've changed the extension to be *.tar, so it can upload to XDA. I think Odin users need to add the .md5 extension.
md5 checksum for BML3_RESTORE.tar: f5ab4c90ed60105c8b50e4e9b112e50b
XDA user magarto is the one whose post led me to this file and fix, from his post here.
This was originally a [Q]-tagged Question thread. I overwrote the OP with this guide and changed the thread title. Hence, the next several posts may seem out of context.