Reset Xiaomi to factory settings via PC: all methods and step-by-step instructions

Xiaomi resetting to factory settings via a computer is the only way out when the smartphone does not respond to the screen, is locked with a password or is working with failures. Unlike the standard reset via the Settings menu β†’ About phone β†’ Reset, the method using a PC allows you to restore the device even if critical firmware errors or damage to system files.

This article covers all the current ways, from the official MiFlash tool to manual commands via Fastboot and ADB. We will discuss how to prepare a computer, where to download the necessary drivers, and what to do if the process is frozen at the firmware stage.

Important: The procedure deletes all data on your phone, including photos, contacts and apps. If the device is still on, try saving important information first via the Mi PC Suite or the Mi Cloud.

Preparation of the computer: drivers, programs and settings

Before resetting Xiaomi via PC, you need to install specialized software and drivers, without them, the computer will not recognize the phone in Fastboot or EDL modes, and the firmware will end in error.

List of mandatory instruments:

  • πŸ“₯ MiFlash Tool – the official utility from Xiaomi for firmware through Fastboot (download from the official website).
  • πŸ”§ ADB & Fastboot – a toolbox for working with Android through the command line (download from the Android Developers website).
  • πŸ–₯️ Drivers. Qualcomm/MTK β€” phone-recognition EDL (If you want a deep reset, Qualcomm will do QDLoader, MediaTek β€” MTK Driver Auto Installer.
  • πŸ”„ Firmware for your model – download the official version from the MiUI Downloads website (choose Fastboot) ROM fully discharged).

After installing the drivers, check the phone’s connection:

  1. Turn off Xiaomi.
  2. Press Volume Down + Power before the Fastboot logo appears.
  3. Connect your phone to your PC via USB.
  4. In the command line (Win + R β†’ cmd) enter:
fastboot devices

If the serial number of the device appears in the answer, the drivers are installed correctly.

⚠️ Warning: Windows 11 laptops may need to disable driver signature verification. To do this, reboot your Shift PC, select Diagnostics β†’ Additional parameters β†’ Loading parameters β†’ Disable mandatory driver signature verification.

πŸ“Š What tool do you plan to use to reset?
MiFlash Tool
ADB/Fastboot Teams
SP Flash Tool (for MediaTek)
Other

Method 1: Reset via MiFlash Tool (for devices with unlocked bootloader)

MiFlash is the official tool from Xiaomi, which allows you to flash your phone in Fastboot mode with a full reset.The method works for most models (Redmi Note 10 Pro, Poco X3 Pro, Mi 11, etc.), but requires an unlocked bootloader.

Step-by-step:

  1. Download and unpack Fastboot ROM for your model (file with.tgz extension).
  2. Run the MiFlash Tool on behalf of the administrator.
  3. In the Select field, specify the path to the unpacked firmware.
  4. Connect your phone in Fastboot mode (as described above).
  5. At the bottom of the window, select firmware mode: Clean all - complete reset with deletion of all data (recommended); Clean all and lock - reset + lock bootloader (only if you sell a phone); Save user data - firmware without deleting files (not suitable for resetting).

Refresh

Flash

If the process is suspended during the waiting for the device:

  • πŸ”Œ Check the cable. USB (Use the original).
  • πŸ”„ Reinstall drivers manually through Device Manager.
  • πŸ› οΈ Try another one. USB-port (preferably) USB 2.0 on the back of the PC).

β˜‘οΈ Preparing for firmware through MiFlash

Done: 0 / 5

Method 2: Reset via Fastboot commands (without MiFlash)

If MiFlash doesn’t recognize the device or gives out errors, you can use manual commands via Fastboot, which is universal and works even on older models (Redmi 4X, Mi A1).

Instructions:

  1. Connect your phone in Fastboot mode (as in the previous method).
  2. Open the command line in the folder with platform-tools (where adb and fastboot are installed).
  3. Enter the commands one by one:
fastboot oem edl

If the command fails (FAILED: remote: unknown command) use:

fastboot erase userdata


fastboot erase cache




fastboot reboot

These commands will clear the partition with user data and cache, which is equivalent to a factory reset.

To completely delete all partitions (including system files) use:

fastboot erase boot


fastboot erase system




fastboot erase vendor




fastboot erase userdata




fastboot reboot

⚠️ Warning: erase system and erase vendor commands will remove firmware! Once executed, the phone will not turn on until the firmware is re-introduced via MiFlash or EDL.

What if the fastboot can’t see the device?
1. Check if USB debugging is enabled in the developer settings (if the phone is turned on). 2. Install the drivers manually through Device Manager (select "Android Bootloader Interface"). 3. Try another cable or USB port. 4. Some models (e.g. Poco F3) require first unlocking the bootloader via the Mi Unlock Tool.

Method 3: Reset via EDL mode (for blocked or "bricks")

EDL (Emergency Download Mode) is Xiaomi’s last chance to recover if the phone doesn’t turn on, hovers on the logo, or has a locked bootloader.

How to transfer your phone to EDL:

  • πŸ”Œ Hardware method: Turn off the phone, press Volume up + Loudness down + USB-The screen will remain black, but the computer must identify the device as Qualcomm. HS-USB QDLoader 9008.
  • πŸ“± Through ADB: If the phone turns on, connect it with debugging enabled USB and do: adb reboot edl
  • πŸ”§ On some models (Redmi Note 8 Pro, Poco) X2) It's a risky method, and without experience, you should go to the service center.

After switching to EDL, use:

  • πŸ“Œ MiFlash Tool – Select the firmware and press Flash (Clean all mode).
  • πŸ“Œ QFil – for Qualcomm devices (download here).
  • πŸ“Œ SP Flash Tool – for smartphones on MediaTek (for example, Redmi) 9A, Poco C3).
Tool.Supported chipsetsDownload linkFeatures
MiFlash ToolQualcommOfficial websiteRequires an authorized Xiaomi account for new models
QFil (Qualcomm Flash Image Loader)Qualcommqfiltool.comSupports the firmware in parts (firehose)
SP Flash ToolMediaTekspflashtool.comRequires a scatter.txt file from firmware

πŸ’‘

If MiFlash is not done, try replacing the file. flash_all_lock.bat on flash_all_except_storage.bat It's going to save the internal memory, but it's going to reset the settings.

Frequent mistakes and their solutions

Even if you follow the instructions accurately, the reset process can end up in error, and let's look at the most common problems and how to fix them.

Mistake 1: "Waiting for device" in MiFlash

  • πŸ”Œ Check the connection. USB (Try the port USB 2.0).
  • πŸ”§ Reinstall drivers manually through Device Manager (select Android Bootloader Interface).
  • πŸ› οΈ Disable the antivirus – it can block access to fastboot.

Error 2: "Invalid sparse file format at header magic"

Reason: The firmware file is damaged.

  • πŸ“₯ Download the firmware again from the official website.
  • πŸ“ Unpack the archive in a short-cut folder (for example, C:\ROM\).
  • πŸ”„ Try another version of the MiFlash Tool (e.g., the old version of 2018).

Error 3: The phone doesn't go to EDL

If the hardware method does not work:

  • πŸ”‹ Check the battery charge (should be at least 30%).
  • πŸ”Œ Use a data-enabled cable (not all) USB-cables are suitable for firmware).
  • πŸ“± For MediaTek, try the Loudness up combination + Nutrition + USB.

Error 4: "This miui version cannot be downgraded"

Xiaomi is blocking the rollback to an older version of the firmware.Solution:

  • πŸ”“ Unlock the bootloader through the Mi Unlock Tool.
  • πŸ“… Install firmware of the same or newer version.
  • πŸ”„ If you want to downgrade the version, first go Fastboot. ROM current version, then the old version.

πŸ’‘

If a Fastboot reset doesn’t help and the phone doesn’t turn on, the only way out is EDL mode. But new models (released after 2021) may require an authorized Xiaomi account to unlock the firmware.

Xiaomi reset on MediaTek processor (via SP Flash Tool)

MediaTek-based devices (Redmi 9A, Poco C3, Redmi 8A) require a different approach, using the SP Flash Tool, a firmware utility for MTK chipsets.

Instructions:

  1. Download the SP Flash Tool and firmware for your model (look for files with the.zip and scatter.txt extensions).
  2. Unpack the firmware in a folder without Cyrillic symbols.
  3. Launch it. SP Flash Tool and press Scatter-loading, then select the file MTxxxx_Android_scatter.txt firmware.
  4. In the section list, uncheck all boxes except: preloader (if it is in firmware). userdata (for resetting settings). cache.

Connect the phone to the PC (without pressing the buttons!).

Download

If the process is stuck at 100% DA:

  • πŸ”Œ Turn off and reconnect the phone.
  • πŸ”§ Install MediaTek Preloader Driver.
  • πŸ“₯ Try another version. SP Flash Tool (for example, v5.2026).

⚠️ Warning: Do not flash the preloader section on a working phone – this can lead to a complete loss of communication with the device ("brick").

Recovery after reset: the first steps

After a successful Xiaomi reset via PC, the phone will turn on in a β€œout of the box” state. To return it to working condition, perform a few key actions.

System setup

  • 🌍 Choose the language and region (Russia is recommended for the correct operation of Xiaomi services).
  • πŸ“Ά Connect to Wi-Fi (do not use mobile data at this stage).
  • πŸ”‘ Skip Mi Account Linking if you don’t plan on using cloud services.

2. Checking of performance

  • πŸ“ž Call the phone – check the operation of the communication module.
  • πŸ“· Take a test photo – make sure the camera is working.
  • πŸ”‹ Charge your phone to 100% – after reset, battery calibration may be required.

3. Data recovery

If you have made a backup copy:

  • πŸ“± Connect the phone to the Mi PC Suite and recover data from the backup.
  • ☁️ Log in to Mi Cloud (if sync was enabled) and download contacts/photos.
  • πŸ“ Copy files from a memory card or computer manually.

4. Optimization of productivity

  • 🚫 Disable unnecessary system applications through Settings β†’ Annexes.
  • πŸ”„ Update the firmware to the latest version in Settings β†’ The phone. β†’ Updating the system.
  • πŸ›‘οΈ Install an antivirus (like Dr.Web Light) and check the system.

πŸ’‘

After reset, turn on the developer mode (Settings β†’ About Phone β†’ MIUI version – tap 7 times) and activate the USB Debugging option. This will simplify future manipulation of the phone over the PC.

FAQ: Answers to Frequent Questions

Can you reset Xiaomi via PC without losing data?
No, a full reset via Fastboot or EDL always deletes user data.The only way to save files is to back up via Mi PC Suite or ADB backup before reset.
What if MiFlash says "flash not done"?
This error is caused by: Phone model firmware mismatch (download the correct version); bootloader lock (unlock via Mi Unlock Tool); driver problems (reinstalle them manually); try replacing the file flash_all.bat on flash_all_except_storage.bat firmware-folder.
How to reset Xiaomi if it is blocked by a pattern lock?
If the phone is turned on but locked: Connect it to a PC with ADB installed. Enter commands: adb shell rm /data/system/gesture.key adb shell rm /data/system/locksettings.db adb reboot If the phone is not turned on – use a reset via Fastboot or EDL (as described above).
Can I reset Xiaomi through PC without unlocking the bootloader?
Yes, but with limitations: Fastboot only clears userdata and cache (fastboot erase userdata commands). Full reset (including system partitions) requires unlocking. EDL mode works without unlocking, but may require authorization for new models.
How long does it take to reset via PC?
Time depends on the method: Fastboot (MiFlash): 5–15 minute. ADB-team: 1–2 minute. EDL (QFil/SP Flash Tool): 10–30 If the process lasts more than an hour, interrupt it and check the connection / drivers.