While you play around with your device’s system which is locked to a network, you may face issues where your device is left in a roaming state. Your device’s IMEI may show 0 which is unusual. Most of you would take it to the device manufacturer or carrier to get it fixed but you can do it yourself though. This guide will help you restore your device’s IMEI in case you lose it while flashing a custom ROM, unlocking bootloader of flashing a recovery image. IMEI is usually restored using backup blocks created by Samsung in your device. These blocks contain the value “0” by default and when your device faces any issues, this value is restored. If you had backed up the IMEI in those, blocks, you would not face these issues. But now since you have lost it, let us see how to restore it.
We will use a tool developed by amoamare on XDA forums and the entire credit for this guide goes to him. This tool works only on Windows.
Enabling the Diagnostic Port
The first step is to enable the diagnostic port on your device.
- Open up the dial pad on your phone and dial *#22745927
- The “Enable/Disable Hidden Menu” comes up. Tap on the text that says “Hidden Menu Disabled”.
- On the popup that appears, select the Enable option and hit OK button.
- Press home button and open up the dialer once again.
- Dial **87284 (USBUI)
- On “PhoneUtil” make sure “PDA” is selected.
- Up next, select “Qualcomm USB Settings”>”DM+MODEM+ADB” and hit the OK button.
- Download the tool (Thanks for the link Andy)
- Pull up the battery of your device and note down the IMEI number that you may see on a sticker.
- Connect your device to PC via USB cable. Make sure you have necessary drivers installed.
- Right click on My Computer>Manage and select “Device manager”.
- Under Ports, find out which port your device is connected to. The name of the port is show in brackets at the end as (COM3) or (COM4).
- Open the software and under the Comport section select the port your device is connected to and click on Connect button.
- Check the IMEI number on the left and also the ERI message.
- If the ERI message is red and says not found/missing, click on Repair ERI. If the IMEI is also incorrect do not reboot the device when asked to reboot.
- Enter the IMEI number on the left side. The last number is automatically filled due to the Luna Algo and is a checksum number.
- Click on Repair button on the bottom right in IMEI section.
- Your device will reboot and will have the correct IMEI number.
If you face any issues, you can refer the original thread or leave a comment below.