Update : For Xiaomi Mi6 please use latest QPST


Today we will learn how to fix/repair our beloved Snapdragon’s lost or corrupt imei’s and as a bonus, we will also learn to fix our “unknown” or again, corrupt Baseband’s ( modem configuration ).

Before we begin i must add, changing a working imei of your phone is ILLEGAL. “International Mobile Station Equipment Identity” is your phone’s unique identity. The IMEI number is used by a GSM network to identify valid devices and therefore can be used for stopping a stolen phone from accessing that network. So if you wanna change that number you are probably a thief or you are living in Turkey 🙂

If you flash a wrong firmware/rom to your phone, for example, the same model but sold in different countries with different modem configurations, your baseband can become “unknown” and your imei will probably be “null” or “invalid”. This is because your original modem configuration has been written over with the wrong one. This can be fixed while flashing the right rom back again if you are lucky  (if original data is not corrupt).

So our first goal should be to backup that important data before we upgrade even to stock rom, because even the biggest phone makers are still amateurs when its about Qualcomm’s data/partition structure. I’ve seen many cases about lost or null imei’s after stock OTA updates, Samsung owners will hear me well i know.

For this operation we will use the program called QPST from Qualcomm himself, it’s a service grade factory software to handle/change/fix many configuration options on Qualcomm’s. Other then QPST we will need (+ for editing imei) :

1. Qualcomm  QPST (2.7.437)

2. Mitac Hexdecimal Editor (or any other hex editor you like)

3. Minimal ADB Fastboot 

4. imei converter

5. Qualcomm QPST Diag drivers (2017, universal)

6. Your phone model’s USB drivers (in some cases)


First Step :

We need to open our Snapdragon’s so-called “Diag/nostics Port” before we can do anything. To do that; some phones have just a hidden code to open that port, some phones needed to be forced from adb after rooted and some phones has that port open by default (and some you can open from developer options). As you can see we have many options here. I will give some examples (mostly used), others you can ask me in comments.

Our working example will be Xiaomi’s Snapdragon 820 flagship Mi5. You can open that diag port with dialing *#*#7177171#*#*, a message will come up saying “Diag USB port enable”. If you installed your drivers properly you see the ports under device manager like this :


Now open QPST Configuration browsing “C:\Program Files (x86)\Qualcomm\QPST\bin\QPSTConfig.exe” and you will see that our needed diag port has been added automatically.


In some cases (depending on the diag drivers) if you dont see the port auto added just click “Add New Port” tab right under the window and untick “Show Serial and USB/QC Diagnostic ports only”. You will see other ports thats been recognized from your PC, choose the right one and click OK. In this example im adding LG G3’s USB Serial Port that serves as Diag port for us too (open by default example).




As you can see in the picture we now have 2 phones connected in QPST Configuration, one is Xiaomi Mi5 (MSM8996) other is LG G3 (MSM8974).



Second Step :

Now we are ready to backup our precious “baseband/imei” configuration. Click “Start Clients” from drop down menu and choose “Software Download”.


In Software Download window you can see your phone’s port in first line, if you have 2 phones connected like me, click Browse and choose the phone that you want to work on.


Then come to “Backup” option tab, again click browse, choose your destination and name of your QCN backup, choose the second option QPST NV Memory Files (.qcn) as “Save as type”, NOT the first option as (.xqcn). We want our backup in QCN format, you will see why later. AND click “Start”.



After you backed up your Snapdragon’s QCN, DON’T fear any bricks (software), lost imei’s, corrupt baseband’s anymore. You have all you need to restore those in case of any accident.


Part 2 with Youtube video :


Copyright © 2016 by All rights reserved.

Leave a Reply

Please Login to comment
92 Comment threads
217 Thread replies
Most reacted comment
Hottest comment thread
81 Comment authors
Recent comment authors
En Yeniler Eskiler Beğenilenler

Hi Yazar.

I lost my MI5 pro IMEI on some unsuccessful rom flash – right now can’t restore it because QPST error.
QPST gives me error ‘Disk Error while writing to file.’ on backup.
Is there any know ways to solve error ?
Could i upload it manually by replacing android files ? i have root access.


Антон Клюшников

Hello Mr. Yazar!
I a “happy owner” of my Mi Mix2s M1803D5XE phone. How do you think, if I could restore the memory with proper QSN, can I get finally a XA model with proper bands set?
Thank you in advance.

bf vik

How can i open the port on leeco pro 3 x720?
How can i repair my phone if i lost my backups?
Is it possible to rebuild the whole system?
Thanks in advance!


Hola, tengo un oneplus 6 A6000, en mi país Colombia sera bloqueado por no tener FCC ID, me sirve el tutorial para cambiar los IMEI y evitar el bloqueo?


Şuanda Oneplus 5 / A5000 Modelini kullanıyorum Qualcomm Snapdragon 835 MSM8998 işlemci kullanıyor ve imei değiştirmek istiyorum fakat yorumlardan anladığım kadarı imei değiştirme şuanda oneplus 5 için mümkün değil doğrumdur ?


Hi Yazar
I am really happy to find a real solution for resolving my IMEI issue. Actually, After spending 4 hours in your solution I could find my device on the QPST Configuration. But I see “no phone” in the row phone. So I can not use the software download because it says there is no phone connected to the selected port. I have tried several times to install the new driver but it does not work. could you please help me in this case?


have a question about the Lenovo P2 and the IMEI. I bought a Lenovo P2 from China with a P2a42 Firmware. The phone works perfectly here in Colombia (covers all 2g, 3g and 4g bands) but it was blocked because the Lenovo P2 is not homologated and to do so, it is necessary to show an FDD certificate (which does not exist). So after days of investigating, I just discovered that the only way to make my Lenovo P2 work again here in Colombia is by changing the IMEI. To do that, I have done the next things: – Unlocked… Read more »


Rays, is there any way to recover the imei without having the copy of the imei?


Hello friend, you will have the backup of zte axon 7 A2017U


Уважаемый,AndroidBrick,будь другом,ответь на вопрос?)Которой день бьюсь с SM-A300F/DS,не удается восстановить родные IMEI.Этот метод для Samsung работает,всегда рад совету!)


osman hocam merhaba, redmi 5 plus cihazım var. bootloader kilidi henüz açılmadı. qpst software download ile qcn yi kaydet diyorum hata veriyor.”could not succesfully create the software download agent”şeklinde. sorun neyden olabilir. teşekkürler

Bhushan Gurjar
Bhushan Gurjar

By this method can IMEI number shown as 0 be repaired on my Moto G5 xt1677??


my imei is ok and baseband


hi guys. yesterday i use hidden settings apk and changed to usa band mode now my sim1 have no signal. my phone is redmi note 4x 3/16gb . anyonehave cqn file?


Size “[email protected]” adresinden sorunum ile alakalı detaylı bilgi yolladım. Umarım bana yardımcı olabilirsiniz…


Hocam selamlar.. yazınızda hiç birşey bilmeyen ben bile olayı çok net anladım.. öncelikle teşekkürler..
Benim telefonum Lg v10 h901 (LGF600Sad634730)..
QPST CONF. ile açtığımda ve port ekle dediğimde port5 de cihazı bir modem olarak iki (LGF600Sad634730)bu kod ile görüyor. ok. dediğimde ise com5 ekleniyor fakat “nophone” yazısı çıkıyor.. bir türlü sorunumu çözemiyorum.. Lütfen bana yardımcı olabilirmisiniz..?


merhaba efendim … öğretici … Hindistan’dan im .. sadece bir soru .. ONEPLUS 5 için aynı yöntemi izleyebilir miyim?

lütfen bana yardım et … telefonumu kurtar


Hi. Do you have qcn backup for nubia z11 (nx531j) ?
My phone has a problem, imei : null and mobile network is no service.
Please help me!

Camilo Pinzón

Hello! please help me … I have xiaomi mi5 64bg … I backed up as .xqnc unintentionally Then, I entered these codes in the cmd … adb shell his ls -al /dev/block/platform/soc/624000.ufshc/by-name and later, dd if = / dev / zero of = / dev / block / sdf3 dd if = / dev / zero of = / dev / block / sdf5 dd if = / dev / zero of = / dev / block / sde28 reboot then, when trying to modify the imei I remembered that I had made the backup with xqnc try to restore… Read more »


Hi Bro. Search for gemini folder, download .xqcn, restore it, then do the tutorial again (this time with a .qcn backup).!jUlxiQJB!AR9_bfPfhFMaVa5TRPenYg



Hi Performing the installation of the MIUI9 rom by means of xiaomi miflash, download the ROM available on the Xiaomi website. The flash process is done correctly, in miflash select the option “Flash all” and phone starts correctly however at the moment of validate the account shows this message “Device ID not valid, the device ID must be a valid mac address or IMEI “and I can not continue with the validation process because the wifi is not activated nor does it identify the sim card. I can not enter the settings of the computer because I can not verify… Read more »