Reset Xiaomi to factory settings via computer: 3 working ways

Introduction: when to reset via PC and how it is better than the standard method

Forgot the pattern lock on Xiaomi? Your phone hung on the logo after a failed update? Or just want to sell the device, completely clearing it of personal data? In such cases, a standard reset via the settings menu may not be available, but a reset via a computer will be a real salvation. This method allows you to return the smartphone to factory settings even if the screen does not respond to touch, the system does not boot or you forgot the password from your Mi Account.

The main advantage of PC reset is a 100% guarantee of cleanup of all data, including hidden files and settings that may remain after a soft reset via Recovery. In addition, this method often helps to "reanimate" devices with serious software failures when other methods are powerless. But there are nuances: the procedure requires training, knowledge of special tools (Mi Flash Tool, ADB, Fastboot) and can lead to a loss of warranty if the device was blocked by the manufacturer.

In this article, we’ll break down three proven ways to reset Xiaomi through your computer that work on most models – from the old Redmi 4X to the flagship Xiaomi 13 Ultra.You’ll learn which method to choose depending on the situation, how to avoid errors, and what to do if something went wrong.

Preparation for resetting: what to do before the procedure

Before you start resetting, make sure you have everything you need. Without preparation, you risk getting a brick instead of a working smartphone. Here's the minimum set of tools and data you'll need:

  • πŸ–₯️ Computer running Windows 7/10/11 (The Mi Flash Tool requires Windows; macOS/Linux Alternative methods will have to be used).
  • πŸ“± Cable USB Type-C/MicroUSB (Original or quality certified – cheap cables can interrupt the connection).
  • πŸ”‹ Battery charge of at least 50% (when reset via Fastboot, the phone does not charge!).
  • πŸ”‘ Access to your Mi Account if your device has activated Mi Cloud (required to unlock after resetting).
  • πŸ“ Backup of important data (photos, contacts, messages) as it will be permanently deleted.

Pay special attention to drivers. Without them, your computer will not see your Xiaomi in Fastboot or EDL modes. Download and install:

  • πŸ”§ Mi USB Driver (Official Driver from Xiaomi to Work with Fastboot).
  • πŸ”§ Qualcomm HS-USB QDLoader 9008 (if you plan to use the mode) EDL).
  • πŸ”§ ADB & Fastboot tools (part of Google’s Platform Tools).

⚠️ Note: If your device was purchased with a carrier-specific connection (e.g., Redmi Note) 10T 5G From MTS or Beeline, a Fastboot reset could block the network, in which case an official unlock would be required. IMEI.

Before starting the procedure, check the model of your device.

  1. Turn off the phone.
  2. Press Volume Up + Power before the Fastboot logo appears.
  3. Connect to your PC and type in the command line: fastboot getvar product In the answer you will see the model code (for example, cepheus for Xiaomi Mi 9).
πŸ“Š What kind of smartphone you Xiaomi?
Redmi (Note, K-series)
POCO (F, X, M-series)
Mi (11, 12, 13)
Black Shark
Other

Method 1: Reset via Mi Flash Tool (for locked devices)

Mi Flash Tool is the official utility from Xiaomi, which allows you to flash the device in EDL (Emergency Download Mode) mode.

  • πŸ”’ Phone is completely locked (forgot password, pattern lock, PIN-code).
  • πŸ€– The device does not load (hang on the logo, cyclic reboot).
  • πŸ“± Complete reflashing is required with the removal of all data.

Important: to work with the Mi Flash Tool, you need to download the official firmware for your model. Using informal firmware can lead to loss of IMEI or other problems. You can download the firmware on en.miui.com (choose the Fastboot version, not Recovery!).

Step-by-step:

  1. Install the Mi Flash Tool (you can download from the official website).
  2. Unpack the firmware in a folder without Cyrillic characters (for example, C:\Xiaomi\cepheus_global_images...).
  3. Turn the phone into EDL mode: Turn the device off. Press Volume up + Volume down and connect the USB cable to the PC. Hold the buttons for 10-15 seconds until the Qualcomm HS-USB QDLoader 9008 appears in Device Manager.

Launch the Mi Flash Tool

Select

Select firmware mode

  • Clean all – Complete reset with deletion of all data (recommended).
  • Clean all and lock is the same, but with the bootloader lock (only if you want to return the warranty).
  • Press Flash and wait until it is completed (usually 5-10 minutes).

⚠️ Note: If the phone doesn't turn on after firmware or freezes on the logo, try repeating the procedure with another firmware version (for example, an older one). MIUI contain bugs for specific models.

Install the Qualcomm QDLoader 9008| driver

Download the official Fastboot firmware for your model |

Disable the antivirus (it can block the Mi Flash Tool)|

Charge your phone to at least 50% |

Prepare original USB-cable-->

Xiaomi modelCode nameSupports EDL?Notes
Redmi Note 10 ProsweetYes.Requires unlocking the bootloader for firmware custom ROM
POCO F3aliothYes.In some versions of MIUI EDL disabled by default
Xiaomi Mi 11venusYes.Firmware via EDL resets the region of the device
Redmi 9AdandelionNo.Supports only Fastboot, EDL is blocked

Method 2: Reset via Fastboot (without losing the bootloader unlock)

If your Xiaomi boots into Fastboot mode but doesn’t log in, you can reset without completely flashing it.This method keeps the bootloader unlocked and is suitable for devices that don’t need to change the firmware, but only need to clean the data.

The work will require:

  • πŸ–₯️ Established ADB & Fastboot tools (you can download as part of Google Platform Tools).
  • πŸ“± Phone in Fastboot mode (clip Volume down) + Power with the device switched off).
  • πŸ”Œ Cable USB Data transmission support (charging cables will not work!).

Discharge commands:

Open the command line (Win + R β†’ enter cmd) and execute:

fastboot devices

(Checks if the list is empty, there is a driver or cable problem.)

fastboot erase userdata
fastboot erase cache
fastboot reboot

These commands will delete all user data (userdata) and cache, after which the phone will restart in a clean state. If after the reboot you request Mi Account data, then the device was associated with the account, and you need to enter a login / password.

πŸ’‘

If the fastboot erase userdata command is followed by a FAILED error (remote:'Not allowed in Lock State'), then the bootloader is blocked, in which case only full firmware via the Mi Flash Tool (method 1) or official unlock through the Xiaomi website will help.

Extended reset (if standard did not help):

If there are problems after the basic reset (for example, the phone still brakes or does not load), try to completely clean all sections:

fastboot erase boot


fastboot erase system




fastboot erase vendor




fastboot erase userdata




fastboot erase cache




fastboot reboot

⚠️ Warning: The fastboot erase system and fastboot erase vendor will remove the firmware and the phone won't boot.

What if the Fastboot can’t see the device?
1. Check the cable - try another, original. 2. Install drivers manually through Device Manager (select "Update driver" β†’"Perform a search on this computer" β†’ put the folder ADB). 3. Turn off driver signatures in Windows (enable test mode: bcdedit) /set testsigning on in CMD on behalf of the administrator). 4. Try another one. USB-port (better to use port) USB 2.0 back-panel). 5. If you have Xiaomi on a Mediatek processor (e.g. Redmi) 9C), Instead of Fastboot, you may need a mode. BROM tool SP Flash Tool.

Method 3: Reset via ADB (if the phone is turned on but locked)

If your Xiaomi is turned on but you can’t unlock it because of a forgotten password or screen failure, Android Debug Bridge (ADB) will come to the rescue.

  • πŸ”“ The phone was debugging on. USB (developer-setting).
  • πŸ“± The device is loaded into the system (at least until the lock screen).
  • πŸ–₯️ Computer installed ADB driver.

If USB debugging wasn’t activated in advance, this method won’t work – you’ll have to use Fastboot or Mi Flash Tool.

Step-by-step:

  1. Connect your phone to your PC via USB.
  2. Open the command line and check the connection: Adb devices If a device is detected, you will see its serial number.
  3. Reset to factory settings: Adb shell recovery --wipe_data Alternatively (for new Android versions): Adb shell am start -a android.intent.action.MASTER_CLEAR
  4. Confirm the reset on the phone screen (if you receive a request).

If nothing happens after the command, try restarting your phone to Recovery and resetting it from there:

adb reboot recovery

From the Recovery menu, select Wipe Data β†’ Wipe All Data (manage by volume and power buttons).

πŸ’‘

Resetting through ADB is the most gentle method, because it doesn't affect system partitions; it only deletes user data, leaving the firmware intact, which reduces the risk of "bricking" the device.

Frequent Mistakes and How to Avoid Them

Even with the correct following of the instructions, problems can arise, and here are the most common mistakes and ways to solve them:

Mistake.Reason.Decision
FAILED (remote:'Flashing is not allowed in Lock State')bootloader lockedUnlock the bootloader through the official Xiaomi website or use the Mi Flash Tool with the clean all and lock option
Waiting for device (not found)Problems with drivers or cableReinstall drivers, try another USB cable/port, disable antivirus
phone is stuck on startup logo after resetIncompatible version of the firmwareSwipe the device with another version of MIUI (e.g., an older stable version)
Invalid sparse file format at headerDamaged firmware fileDownload the firmware again, check the checksum (MD5)
After reset, requires Mi Account, but the data is not suitableThe device was linked to another account.Contact Xiaomi with proof of purchase or use the EDL bypass (risky!)

Another problem is the loss of IMEI after a reset, which can happen if you've been running a device with unofficial firmware or interrupting the firmware process, and you can restore IMEI using an engineering menu or tools like Maui META (for Mediatek) or QCN Rebuilder (for Qualcomm), but these methods require deep knowledge and may be illegal in some countries.

πŸ’‘

Before you run the firmware, always check the checksum (MD5) of the downloaded firmware. You can use the MD5 & SHA Checksum Utility utility. If the amount does not match the official amount, the file is corrupted - its use can lead to failures.

Recovery after resetting: what to do next

After a successful reset, your Xiaomi will be like new, with no apps, settings, or data.

  1. Set up your device: Choose a language, connect to Wi-Fi, log in to Mi Account (if required), or create a new account. Skip recovery suggestions from backup (if you made a reset due to viruses or crashes).

Update the firmware:

Go to Settings β†’ About Phone β†’ Update the system and install the latest updates. This will fix possible bugs after reset.

Recover the data:

If you have backed up your Mi Cloud or Google Account, restore contacts, photos and apps. Go to Settings β†’ Accounts β†’ Mi Cloud.

Check the key functions:

  • πŸ“ž Telephony (calls, SMS, mobile).
  • πŸ“Ά Wi-Fi and Bluetooth.
  • πŸ”‹ Charging the battery.
  • πŸŽ₯ Camera and microphone.

If nothing helps, try using another computer or installing Windows in Legacy BIOS mode (sometimes UEFI blocks unsigned drivers).

Can you reset Xiaomi via a computer on Mac or Linux?
Yes, but with limitations: 🍎 Mac: Install ADB & Fastboot via Homebrew (brew install android-platform-tools).Mi Flash Tool will require a Windows virtual machine. 🐧 Linux: Install ADB via a package manager (e.g. sudo apt install adb fastboot for Ubuntu). Mi Flash Tool only works through Wine (but stability is not guaranteed). EDL on Mac/Linux You will need additional drivers and customization of udev rules, which can be difficult for beginners.
What if the phone doesn’t turn on after reset?
If the device does not respond to the power button or is stuck on the logo, try the following actions: Forced reboot: Press Power + Volume up for 15-20 seconds. Charging check: Connect to another charger for 30 minutes - perhaps the battery is completely discharged. Firmware via EDL: If the phone does not boot even in the Fastboot, use the Mi Flash Tool in EDL mode (see Method 1). Check hardware malfunctions: If after the firmware does not show signs of life (does not heat, does not vibrate), perhaps a problem in the hardware part of the EDL: If the controller will help you to diagnose this device, for example, you will not help the master.