How to change IMEI on Xiaomi Android: methods, risks and instructions

Changing IMEI (International Mobile Equipment Identity) on Xiaomi, Redmi and POCO smartphones is a technically complex and legally ambiguous procedure. Device owners often look for ways to change this unique identifier to restore access to the mobile network after a firmware failure or to use specific operator functions. However, it is worth noting that interfering with system memory parts where this code is stored carries the risk of turning the phone into a brick.

Before you start any action, you need to clearly understand that IMEI is sewn in the factory and theoretically not intended for change by the end user. In modern versions of Android and HyperOS or MIUI shells, access to this partition (usually NVRAM or EFS) is closed at the bootloader level. Attempting to circumvent these restrictions requires obtaining superuser rights (Root), which automatically deprives the device of warranty.

In this article, we will take a closer look at existing methods for modifying the ID, explain why old methods stopped working, and analyze the possible consequences for your device. Changing the IMEI is illegal in many countries, including the Russian Federation, if it is done to bypass law enforcement locks or cloning the number, information is provided solely for information purposes to restore the health of personal equipment.

What is IMEI and why is it changed to Xiaomi?

IMEI β€” This is a 15-digit code that is unique to each mobile device that supports standards. GSM, IMT-2000 and WCDMA. It works like a digital passport of a phone on a carrier's network. SIM-map, the network reads this code to authorize the device and allow data transfer or voice calls. On two-symbol Xiaomi smartphones, there are two codes - one for each slot.

The main reason users are looking for information on how to change IMEIs is software failures: If you fail to flash, especially when you switch between regions (for example, from China ROM to Global ROM) or when using custom recavators, the ID partition can be damaged, as a result, the phone stops seeing the network, and the status bar appears the inscription β€œEmergency Calls Only”.

⚠️ Note: If your phone is locked by the operator for non-payment or lost, change IMEI It's not going to help you unlock it legally, and the operator can actually track the hardware mismatch and block the new ID.

There is a more specific use case, modems and routers, where the cloning of the identifier is required to test networks. However, in the context of Xiaomi smartphones, it is often about recovering from user errors. It is important to note that new models with Snapdragon and MediaTek processors in recent years have strengthened data protection, and simple methods to change the code will not work.

In the Russian Federation and many other countries, changing IMEI is regulated by law, and according to the Federal Law on Communications, changing the serial number of a device for the purpose of using it in communication networks can be considered an offense, especially by telecom operators who are obliged to block devices with β€œillegal” or cloned identifiers.

From a technical point of view, the risks to the owner of Xiaomi are also great. NVRAM It can lead to loss not only IMEI, but MAC-It's almost impossible to recover Wi-Fi and Bluetooth addresses without a factory backup (which the average user doesn't have), and the device can stop connecting to Wi-Fi or work incorrectly with geolocation.

πŸ“Š Why do you need a shift? IMEI?
Recovery after firmware
Use of the second SIM card
Network testing
Just for the experiment.

Xiaomi also has a policy to consider: If you try to maintain a device with a modified program code or an IMEI curve, you may be denied warranty repairs, and engineers can easily detect a mismatch between software and factory parameters in the diagnostic process.

Method 1: Engineering menu (works on old MediaTek)

The easiest and safest way to work on older Xiaomi smartphones with MediaTek processors (e.g. Redmi Note 3, Redmi 4X) is to use an engineering menu. This method does not require Root rights or computer connection. However, on modern models (Redmi Note 8 and later), this entrance is often closed or hidden by the manufacturer.

To check for the availability of the method, you need to open a standard "caller" and enter a special combination of characters. If after entering the code, a menu with a blue or gray interface that contains the Telephony or Connectivity tabs opens, you are in luck. If the code is ignored or an error message is displayed, then the manufacturer has blocked this feature in your version of MIUI.

  • πŸ“ž Enter the code ##3646633# or #4636## in the phone app.
  • πŸ“± Go to the Telephony (Telephony) or Connectivity tab).
  • πŸ”’ Select a point. IMEI or IMEI Information.
  • ✏️ In the Input field, enter a new 15-digit number and press the Write or Set button.

Once the recording is successful, you need to restart the device, and you can check the result by dialing *#06#. If the number has changed, the procedure has been successful. If after the reboot the number has been reset to the old one or has become zero, then the memory partition is protected from writing, and deeper methods of intervention are required.

What do I do if the codes don't work?
If standard USSD-codes do not open the engineering menu, you can try to install the application Β«MTK Engineering Mode from the app store. However, on Snapdragon processors, this method does not work in principle, because the command architecture differs.

Method 2: Using XIAOMI TOOL V2 and Root Rights

A more advanced and versatile way that covers most Xiaomi devices, regardless of the processor, requires superuser rights (Root).One of the most popular tools for manipulating the system is the Xiaomi Tool V2 utility (or its current forks, since the original project is closed) in conjunction with Xposed modules or specialized applications from Google Play.

The first step in this process is to unlock the bootloader. Without this step, you can't get Root rights. Once you unlock and install Magisk, you get full access to the file system. You then install an IMEI change app, like IMEI Changer, or use the capabilities of Xiaomi Tool when connecting over USB.

β˜‘οΈ Preparation for shift IMEI rod

Done: 0 / 5

The process of changing through Root is as follows: the app accesses and rewrites system files that store the ID. However, since Android 10/11, Google has implemented Project Treble and partitioning, making direct writing to /persist or /modem extremely dangerous. A single-byte error can disrupt modem integrity.

ParameterEngineering menuRoot + AppsADB / Fastboot
DifficultyLow.MediumTall.
I need a PC.No.No (usually)Yes.
Risk of breakdownLow.Medium.High-pitched
It works on the new XiaomiRarely.OftenDepends on the model.

It is important to understand that even with Root rights on some Xiaomi models (especially Snapdragon processors), the IMEI record can be blocked at the bootloader level (QSEE/TrustZone).

Method 3: ADB commands and terminal operation

For power users who don’t want to install unnecessary apps, there is a method of changing settings through USB debugging (ADB), which requires a connected computer, installed Xiaomi USB Drivers drivers, and basic command line knowledge.

First, activate the developer mode. To do this, go to Settings β†’ About Phone and quickly click on the MIUI version 7 times. Then, in the Developer Menu, turn on β€œDebugging on USB.” Connect your smartphone to your PC and open the command prompt in the folder with the ADB installed.

adb devices


adb shell




su

Once you type in the su command, you'll see a request for superuser rights on your phone, which you'll need to confirm. Then, if you're in the shell editor, you can try to change the system properties. However, the commands for writing IMEI vary depending on the version of Android and the type of processor.

πŸ’‘

Use the command "getprop | grep imei" before making changes to find out the current system properties associated with the identifier, which will help you understand which variables to change.

Example of commands to change property (may not work without the corresponding kernel patches):

setprop ril.device_imei"123456789012345"

It is worth noting that in modern versions of HyperOS, these properties are often read-only and the command will return the error, in which case you need to rewire the system partition to write mode, which increases the risk of damage to the system.

IMEI recovery after firmware failure

If your goal is not to change, but to restore (factory) IMEI after it has β€œflyed off” (shown as 0 or null), the situation looks more optimistic. Often it is enough to simply reflash the device with the stock official firmware through Fastboot mode. The official Mi Flash Tool, when completely cleaned (clean all), tries to restore standard partitions.

If simple flashing doesn't work, you can use specialized repair utilities like Maui Meta (for MediaTek) or QPST/QCALIBER (for Qualcomm), which are low-end and allow you to download the NVRAM backup if you have one. Without a backup, it's almost impossible to restore your unique factory number, you can only prescribe any valid number from the same series.

⚠️ Attention: Use of aliens IMEI (For example, taken from the Internet, it can lead to a conflict in the network if the owner of the original number is also located in the same city and uses the services of the same operator.

The QPST recovery process is more complicated: you need to find the configuration file corresponding to your modem, connect the phone in Diag mode (Diagnostic), which often requires special ADB commands or close contacts on the board, and download the file.

Frequently Asked Questions (FAQ)

Can I change IMEI to Xiaomi without Root rights?
On current models with Android 9 and above, it's almost impossible. Old methods are closed through the engineering menu. The only chance is that there's hidden engineering code specific to a particular CPU model, but that's rare.
Will IMEI reset after the system update?
If you have modified the IMEI software (through a Root-rights app), then when you update the firmware (either by air or manually), the changes will likely fly away, as the system partition that is being updated will overwrite the modified files. If the change is made at the modem level (via QPST/Maui), it will remain.
Is it dangerous to buy a phone with a modified IMEI?
Yes, it's risky. It could be stolen, and the previous owner could change the number to hide it, and the unstable network and the inability to properly update are frequent companions of the "curve" firmware.
How do I know if IMEIs have changed on my phone?
Compare the number that appears on the command *#06# with the number on the sticker under the case (if it is saved) or on the original box. You can also use applications like Device Info HW, which show information from system logs.

πŸ’‘

The most reliable way to get a working IMEI on Xiaomi is official flashing stockware. All other methods carry the risk of loss of warranty and unstable communication.