Can't Get Valid Device Id & No Sim Detected


Crater dylan

Members
Dec 11, 2016
24
15
I went back from my second try with android 7 rom on my phone. This time I can't get the sim card to be recognised: when I boot into the official global developer flashed by Miflash i get stuck in the initial configuration when it looks for the Mi account, with a message regarding the device ID not found, and it has to be a MAC or IMEI. Also no sim detected in the status bar.
When I restore my (once) perfectly fine xiaomi.eu rom via twrp, the phone works fine, altough strangely laggy, and I have no SIM detected. In TWRP I have issues restoring the EFS partition that i read it has to do with these issues. What should I do? follow this guide? http://en.miui.com/forum.php?mod=viewthread&tid=299779&highlight=redmi+3+imei

In the while i try flashing the global dev with miflash again.
 
  • Like
Reactions: vitna
Xiaomi Mi5 IMEI, MEID, ESN restore, Can't Get Valid Device Id & No Sim Detected

Main link(s) (Many thanks and Respect @jinishpv from XDA, @koravabee from MIUI):

https://forum.xda-developers.com/mi-5/how-to/xiaomi-mi5-efs-backup-restore-methods-t3432730

http://en.miui.com/thread-322126-1-1.html


My Solution:

The base algorithm – from the Main_link:

0. Root phone, Remove all SIM cards

1. Open Diag mode: DIAL *#*#717717#*#*

2. Install QUALCOMM DIAG DRIVERS

3. Edit SAMPLE-MI5.qcn with your IMEI, MEID, ESN numbers. Use HEX-Editor and IMEI Converter.

Change IMEI1:

Find through SAMPLE-MI5.qcn IMEI1 = 123456789012345 and REPLACEit with your own IMEI1 (from box). Find and replace ALL instances!

Change IMEI2:

Find through SAMPLE-MI5.qcn IMEI2 = 543210987654321 and REPLACE it with your own IMEI2 (from box of from the Main_Link thread). Find and replace ALL instances!

Change MEID:

Find through SAMPLE-MI5.qcn MEID = 01680708080099 and REPLACE it with your own MEID (from box) IN THE REVERSE ORDER! (Example: MEID_Box = 99 00 08 11 22 33 44 -> MEID_ SAMPLE-MI5 = 44 33 22 11 08 00 99). Find and replace ALL instances! (2 or 3)

Change ESN:

To find your ESN use your MEID (from box) and calculate your ESN on site https://www.meidconverter.com/ (get Pseudo Hex ESN number).

Find through SAMPLE-MI5.qcn ESN = BAF37A80 and REPLACE it with your own ESN IN THE REVERSE ORDER! (Example: ESN = 11 22 33 44 -> ESN_ SAMPLE-MI5 = 44 33 22 11). Find and replace ALL instances! (2 or 3)


4. Wipe EFS partition !!!

(!!! WITHOUT THIS STEP I CAN'T CONNECT PHONE TO QPST !!!)

adb shell
su
dd if=/dev/zero of=/dev/block/sde28
dd if=/dev/zero of=/dev/block/sdf3
dd if=/dev/zero of=/dev/block/sdf5
reboot

Note: Before wipe make a BACKUP of your corrupted EFS (just in case):

adb shell
su
dd if=/dev/block/sde28 of=/sdcard/modemst1
dd if=/dev/block/sdf3 of=/sdcard/modemst2
dd if=/dev/block/sdf5 of=/sdcard/fsg


5. Connect your Mi5 in the Diag mode:

Open the 'QPST configuration' then click 'Start Clients->Software Download', just click on restore tab and browse for the qcn backup and enable 'Allow phone/file ESN mismatch' then click start to restore. Press “Start” and wait until the process is completed.

After restoration is completed you need to reboot the phone and check your IMEI1, IME2, MEID, ESN (ESN is shown in QPST on 'Active Phones' page).

6. Close Diag mode (DIAL *#*#717717#*#*)


NOTES:

1. BACKUP corrupted EFS first (just in case):

adb shell
su
dd if=/dev/block/sde28 of=/sdcard/modemst1
dd if=/dev/block/sdf3 of=/sdcard/modemst2
dd if=/dev/block/sdf5 of=/sdcard/fsg

2. if you don't know IMEI2 – in the Main_Link thread there is an algorithm How to find IMEI2 from IMEI1

3. !!! Every time you need (re)write your *.QCN file you need to wipe EFS PARTITION (see above)

4. Make a backup of your working *.QCN and THREE BIN FILES (modemst1, modemst2, fsg)
 
Last time i have almost similar issue except that i still have my device id.

Navin @en.miui.com forum suggested me to flash official fastboot rom using miflash (assuming you already ahve unlocked bootloader). after that it solved my issue. so i think you can try the procedure and let's see how.

here's the link for my thread in other miui forum.


Code:
http://en.miui.com/thread-505589-1-1.html
 
suggested me to flash official fastboot rom using miflash (assuming you already ahve unlocked bootloader). after that it solved my issue.
In my case flashing an official rom through miflash didn't solve my problem ((( Also tried to flash the last Lineage os - any success.