Find out. IMEI On a Xiaomi smartphone, it's usually easy to type *#06# or look at the settings. But what if the phone doesn't turn on, locks after firmware, or the screen doesn't respond to touch? In such cases, the MiFlash utility, Xiaomiβs official firmware and device recovery tool, comes to the rescue, not only to flash the device, but also to extract critical data, including critical data. IMEI, Even if the smartphone has become a brickΒ».
In this article, we will discuss all working methods for obtaining IMEI via MiFlash Pro and MiFlash Unlock, including methods for devices with corrupted firmware, locked bootloader, or missing display. You will learn which models support this method, how to avoid connection errors, and what to do if IMEI is not displayed. Particular attention will be paid to the hidden commands ADB, which allow you to extract IMEI without fully unlocking the bootloader β this is true for the new models of the Xiaomi 13/14 series and Redmi Note 12 with enhanced protection.
What is IMEI and why you need to know it through MiFlash
IMEI (International Mobile Equipment Identity) is a unique 15-digit code that is assigned to each mobile device, used by carriers to identify a phone on the network, and also helps:
- π Restore access to the device after theft or loss (through locking on IMEI).
- π‘ Check the legality of the smartphone β by IMEI you can see if it is listed on the blacklist of operators.
- π§ Restore communication after a failed firmware when the phone stops catching the network.
- π¦ Confirm the originality of the device when purchased from hand (IMEI must match the box and sticker under the battery).
But why MiFlash? Because standard IMEI (*#06#, settings, box) methods are not available in critical situations:
- π΅ The phone does not turn on or hovers on the Mi logo.
- π The screen is locked and the fingerprint/pattern lock is not recognized.
- π οΈ The firmware crashed after a failed update (called a "soft brick").
- π₯οΈ The display crashed and the image is not displayed.
In these cases, MiFlash allows you to connect to a smartphone at a low level (via Fastboot or EDL) and extract the IMEI directly from the deviceβs memory. This is especially important for Xiaomi models with a locked bootloader, where other methods (for example, through ADB) may not work.
Preparation for work: what will be needed to extract IMEI
Before you start, make sure you have everything you need, and missing at least one component can lead to errors or inability to connect.
| Component | What do you need? | Where to find it. |
|---|---|---|
| MiFlash Pro or MiFlash Unlock | Official utilities for working with firmware and unlocking the bootloader | Official Xiaomi website (Unlock section) |
| USB Type-C Cable (original) | Poor quality cables can interrupt the connection in Fastboot/EDL mode | Complete supply of a smartphone or a certified accessory |
| Qualcomm or MediaTek drivers | Required for phone recognition in EDL (emergency boot) mode | Qualcomm or MediaTek |
| Mi Account with a tied phone | To unlock the loader (if required) | Register at account.xiaomi.com |
| Laptop/PC on Windows 7/10/11 | MiFlash does not support macOS/Linux | β |
β οΈ Warning: If your XiaomiReleased smartphone is after 2021 (e.g., Xiaomi 12/13/14, Redmi Note 11/12, POCO F4/F5), you will need an authorized account (with permission from Xiaomi) to operate in EDL mode.
Install MiFlash Pro/Unlock|
Download drivers for your processor (Qualcomm/MediaTek)|
Connect the original USB-cable|
Disable antivirus (can block drivers)|
Charge your phone at least 30 times%-->
Method 1: Getting IMEI via MiFlash in Fastboot mode
This method is suitable for devices that are turned on but do not boot the system (look stuck on the logo, bootloop) or have a locked screen.
Step-by-step:
- Turn off the smartphone (if it freezes β press the power button for 10-15 seconds).
- Press the combination Loudness down + Nutrition and hold until the image of the hare in the hat-eared (Fastboot mode) appears.
- Connect your phone to your PC via USB.
- Open MiFlash Unlock (if you want to unlock) or MiFlash Pro.
- In the command line (you can open via Win + R β cmd) enter: fastboot getvar imei If the phone has two slots for SIM- cards, use: fastboot getvar imei1 fastboot getvar imei2
- The IMEI will appear in the response bar (e.g. imei: 123456789012345).
πΉ What to do if the team is not working?
- π Check the cable connection - try another port USB (preferably USB 2.0).
- π₯οΈ Install Google USB Driver (you can download from Android Studio).
- π If the phone is locked (bootloader), unlock it first through MiFlash Unlock.
π‘
If the fastboot getvar imei command returns an empty line, try an alternative command: fastboot oem device-info. In some models, IMEI is displayed in the Device Info section.
Method 2: Extract IMEI in EDL mode (for βbricksβ)
EDL (Emergency Download Mode) is an emergency boot mode that allows you to connect to your phone even if the firmware is completely erased. It works at the processor level and is independent of the status of Android.
- π§± Phones that do not respond to hard bricks.
- π± Devices with damaged firmware (bootloop, no command errors).
- π§ Devices after a failed downgrade (downgrade of MIUI).
How to log into EDL:
- Turn off the phone (if it doesnβt respond, remove and insert the battery if itβs removable).
- Press the button combination: For Qualcomm: Volume up + Volume down + Power (hold 10-15 seconds). For MediaTek: plug the phone off to a PC with the Volume down button pressed.
Device Manager
Qualcomm HS-USB QDLoader 9008
MediaTek Preloader
Extract IMEI through MiFlash Pro:
- Open MiFlash Pro and select EDL mode.
- Press Select and specify the path to the firmware folder (you can use any compatible version of MIUI for your model).
- In the program logs, find the lines with IMEI1 and IMEI2 (usually they appear when reading the device information).
- If IMEI is not displayed, use the QFil utility (for Qualcomm) or the SP Flash Tool (for MediaTek) to read the nvram section where the IMEI is stored.
β οΈ Warning: On new Xiaomi models (e.g., Xiaomi 13 Pro, Redmi Note 12 Pro+), logging in to EDL without authorization may result in a Mi Account being blocked. If the phone is linked to an account, use the official MiFlash Unlock with permission to unlock.
What is an authorized Mi Account?
Method 3: Alternative methods (ADB, engineering menu)
If MiFlash doesn't work or the phone is partially operational, other ways can be tried, which are less reliable, but sometimes save in situations where Fastboot/EDL is not available.
Method 1: Through ADB (if debugging is enabled)
If USB debugging was previously enabled on the phone, you can extract the IMEI via ADB:
adb shell service call iphonesubinfo 3
adb shell getprop gsm.baseband.imeiIf your phone supports two slots for SIM- cards, use:
adb shell service call iphonesubinfo 1 # IMEI 1
adb shell service call iphonesubinfo 2 # IMEI 2Method 2: Engineering Menu (for MediaTek)
On smartphones with a MediaTek processor (for example, Redmi 9/10, POCO M3/M4) you can try to enter the engineering menu:
- Open the Phone app.
- Dial the combination: ##36446337##.
- Go to Connectivity β CDS Information β Radio Information.
- Phone 1 or Phone 2 will be listed as IMEI.
β οΈ Warning: Not all Xiaomi models support the engineering menu. On some devices (e.g., Xiaomi 11T Pro), this method can result in resetting network settings.
π‘
If the phone is turned on but not catching the network, first check the IMEI via *#06#. If it shows as "Null" or "0", this means that the IMEI is erased from memory and requires recovery through MiFlash or a service center.
Compatibility table: which Xiaomi models support IMEI extraction via MiFlash
Not all Xiaomi smartphones work equally well with MiFlash when extracting IMEI. Below is a compatibility table for popular models. If your device isn't on the list, focus on the processor:
- πΉ Qualcomm Snapdragon β supports Fastboot and EDL.
- πΉ MediaTek Helio/Dimensity β Fastboot only (EDL mode requires special drivers).
| Model | Processor | Fastboot | EDL | Notes |
|---|---|---|---|---|
| Xiaomi 13/13 Pro | Snapdragon 8 Gen 2 | β | β οΈ | An authorized account is required for EDL |
| Redmi Note 12 Pro+ | MediaTek Dimensity 1080 | β | β | EDL is not supported without special drivers |
| POCO F4 | Snapdragon 870 | β | β | β |
| Redmi 10 | MediaTek Helio G88 | β | β | Use the engineering menu |
| Xiaomi Mi 11 | Snapdragon 888 | β | β | In EDL, unlocking may be required |
πΉ What to do if your model is not in the table?
- Check your phoneβs processor through GSMArena.
- For Qualcomm, use Fastboot or EDL (if the bootloader is unlocked).
- For MediaTek, try the ADB or Engineering Menu.
Frequent mistakes and their solutions
When working with MiFlash, users often encounter errors that prevent them from extracting IMEIs. Letβs consider the most common ones and how to fix them.
Error 1: Phone is not detected in Fastboot/EDL
Causes and solutions:
- π Cable/port problem: Use the original cable and port USB 2.0 (blue ports USB 3.0 may not work).
- π₯οΈ No Drivers: Install Mi Phone Driver or Qualcomm Driver manually through Device Manager.
- π bootloader locked: Unlock it through MiFlash Unlock (requires a Mi Account binding and wait 7-15 days).
Error 2: The command fastboot getvar imei returns the empty value
Possible causes:
- π΅ IMEI erased: This often happens after a failed firmware. Restore it via MiFlash (needs nvram backup).
- π οΈ Modem section is damaged: Flash your phone with official firmware via MiFlash (select Clean All option).
- π§ MiFlash incompatible: Use MiFlash Pro 2023 or later.
Error 3: In EDL mode, the phone is identified as Unknown Device
Decision:
- Install the Qualcomm HS-USB QDLoader 9008 driver manually: Download the driver from XDA Developers. Open Device Manager β find Unknown Device. Update the driver by specifying the path to the downloaded file.
MediaTek
MTK Driver Auto Installer
β οΈ Warning: If the phone stops turning on completely after connecting to EDL (black screen, no button response), it may mean that the firmware has been damaged. In this case, you will need to completely flash through MiFlash with the Clean All and Lock option option (but this will erase all data, including IMEI if it is not backed up!).