Mi Diagnostic Mode | Xiaomi Mi Diagnostic Open Code

Last Updated on March 11, 2022 by Ramon Walters

We often see people asking for guidelines related to editing, rewriting, or repairing their devices’ IMEI numbers. Although rewriting or repairing the IMEI number is completely illegal, still, we’ll be showing you how to do it.

Xiaomi Diagnostic Mode Code

To change the IMEI numbers of your device, firstly, you need to enable the Diagnostic mode on your Qualcomm device. On top of that, different tools like QPST and QFIL help rewrite and repair IMEI numbers. And for MediaTek devices, you can use the Miracle Box tool for the same purpose.

So this article will cover everything about Mi Diagnostic Mode. We’ll be sharing the details of how to enable the diagnostic mode and backup or rewrite the IMEI number on your Mi device. So keep reading…

What is Diagnostic Mode?

The Qualcomm Diagnostic Mode is mainly available on smartphones with Qualcomm chipsets. You can access this mode and enable it if you want to write, rewrite and edit the IMEI number of your device.

However, you cannot automatically enable the Diag mode on Qualcomm-powered devices. Some special tools like the QPST tool and QFIL tool help users enable this mode. Note that these tools are only compatible with Qualcomm-powered devices.

Now let’s come to the MediaTek or Spreadtrum processors. Well, if you want to enable the Diagnostic mode, you’ll just need the Miracle Box tool. This tool can solely help you repair IMEI numbers on your MediaTek-powered devices.

Lastly, Diag Com Ports is a must repair or rewrite the IMEI number on Qualcomm devices. But that isn’t the case for MediaTek devices. You won’t need the Diag Com Ports to repair the IMEI numbers on MediaTek or Spreadtrum devices.

How To Enable Qualcomm Xiaomi Diagnostic Mode

Now that you want to enable the Diagnostic mode in your Xiaomi device, let me tell you that the pre-requisite to repair IMEI numbers is to root your phone or have the permissions to root it. Without this, it’s impossible to enable the diag mode.

You can Enable Diagnostic ports on Qualcomm-powered devices in 3 different ways. They are-

  • Using Mi Diagnostic Port Code

This is the most simple and the easiest way to enable the Diagnostic port on your Qualcomm-powered devices. But the only con is that only some of the devices support this activation method. If it doesn’t work, then you can use the other 2 methods.

To enable the diagnostic ports using the Mi Diagnostic Port Code, you need to dial #*#71717#*#* on your phone’s dialer. If it works, you’ll receive a successful message. If not, you’ll see an error message pop-up.

  • Using ADB Diagnostic Commands

If the first method to enable the diag port didn’t work, you could use this one. Here’s how to use this method-

  • Firstly, you’ll need some Mi Diag Port Drivers. These drivers include ADB and Fastboot drivers. Also, you must install the USB drivers for your android devices as well.
  • After that, you need to enable the USB debugging option in your Qualcomm device. You can enable it from about phone in developer options in settings. You just need to tap 7-10 times on the build number to enable this!
  • Now, use a USB cable and connect your Qualcomm-powered device with a computer
  • After that, you need to enter a command to detect your connected device. The command is-
adb devices
  • After entering the command, you’ll see a list of the devices with USB debugging enabled. If you don’t see your device, try updating or reinstalling the drivers above.
  • Now, you need to type the commands below-
adb shell



Open Diag Mode And Backup IMEI Using QPST Tool

  1. Firstly you need to download the QPST Tool and install it
  2. Now, you need to boot your Qualcomm device in diag mode and connect it with computer
  3. Now, you need to open the QPST tool
  4. After that, you need to add a COM port from the device manager manually. If it’s already showing, then there is no need to add it manually.
  5. Select the Start Clients option from the top and after that, click on software download
  6. Now on the QPST tool, click on the backup option and select the .qcn file’s name and location
  7. To backup the IMEI number, you need to press the start button.
  8. And it’s done. You can also restore the IMEI number of your phone by clicking the restore button and selecting the .xqcn file!


So that’s everything on enabling and accessing Mi Diagnostic Mode. We’ve shown you 2 methods to enable the diag mode on your Qualcomm device for better understanding. Besides, we also showed how you can backup and restore your Mi phone’s IMEI number using the QPST file.

So that’s it. Now you should use the guideline to enable the diag mode and rewrite or restore your Xiaomi phone’s IMEI number!

Leave a Comment