How to reset Xiaomi to factory settings through a computer: 3 proven ways

Xiaomi’s factory reset via a computer is a necessary measure when standard methods are not available through the device menu, and this can occur due to a locked screen, system failures, or β€œbricking” after a failed firmware. Unlike a reset via Recovery, connecting to a PC gives you more control over the process and allows you to bypass some of the limitations of MIUI.

In this article, we will analyze three working methods: using the official Mi Flash Tool utility, through the use of the new software. ADB-Each option has its own nuances, from the need to unlock the bootloader to the risk of data loss. Important: a PC reset deletes all data on the device, including files in internal memory, even if they were hidden or password-protected.

Resetting Preparation: What to Do Before Connecting to a PC

Before you start resetting, make sure that all the preconditions are met, and neglecting them can lead to a device being completely inoperable or unable to recover data.

  • πŸ”‹ Battery charge of at least 50%. With a low charge, the device can shut down during the process, which can damage the firmware.
  • πŸ”Œ Original. USB-Cheap cables often don't provide a stable connection for data transfer in Fastboot mode.
  • πŸ–₯️ Computer on Windows 7/10/11 (64-bit). Xiaomi’s official utilities do not support macOS or Linux without additional manipulations.
  • πŸ“₯ Drivers, install Mi. USB Driver and ADB/Fastboot tools (part of Android) SDK Platform Tools).

If you reset the device because of a locked screen, check if debugging is enabled. USB (Settings β†’ The phone. β†’ Version. MIUI (7 times press) β†’ Additional settings β†’ For developers β†’ Debugging by USB). Without her, methods with ADB won't work.

⚠️ Note: If the device activates Find My Device, you may need to enter your Mi Account data associated with the device after the reset!

πŸ“Š What type of resetting method you plan to use?
Official Mi Flash Tool utility
ADB teams
Fastboot mode
I haven't decided yet.

Method 1: Reset via Mi Flash Tool (for unlocked bootloader)

This method is suitable if the bootloader is unlocked on the device. Otherwise, the Mi Flash Tool will not be able to flash the factory firmware.

fastboot oem device-info

If the answer is Device unlocked: true, you can go on.

  • πŸ“Œ Download the firmware for your model from the official website. Choose the version of Fastboot (file with the extension.tgz or.zip).
  • πŸ› οΈ Unpack the archive in a folder without Cyrillic characters (for example, C:\MiFlash\rom).
  • πŸ–±οΈ Launch the Mi Flash Tool, press Select and point the path to the firmware folder.
  • πŸ”„ Connect the device turned off to the PC, holding Volume down + Meals to enter the Fastboot.
  • πŸš€ Press Refresh in the utility - the device should appear. Select Clean all and press Flash.

It takes 5-10 minutes. When it's done, it automatically restarts to factory state. If the Mi Flash Tool gives you a critical partition flashing error is not allowed, then the bootloader is locked, use another method.

Make sure to unlock the bootloader | Download the correct firmware version (Fastboot) | Disable the antivirus (can block drivers) | Connect the device to USB 2.0 port (more stable than 3.0) | Check the battery charge (minimum 50%)

-->

Method 2: Discharge through ADB-commands (without loss of unlocking the loader)

If USB debugging was enabled before locking the device, you can reset via ADB (Android Debug Bridge), which does not require unlocking the bootloader and retains the ability to re-activate OEM Unlock in the settings.

Connect the device to your PC, open the command line in the adb.exe folder (e.g., C:\platform-tools) and execute commands in order:

adb devices

(Your device should be displayed. If not, check the drivers or cable.)

adb shell


wipe_data

If the team wipe_data Not supported, use an alternative:

adb shell recovery --wipe_data

Once done, the device will restart and start the reset process, which works even on locked screens if USB debugging has been activated before.

⚠️ Note: Some Xiaomi models (e.g. Redmi Note) 10 pro POCO X3 Pro) team wipe_data It may not work because of limitations. MIUI. Try the combination: adb shell su --mount-master wipe_data But it requires root rights, which are rarely found on locked devices.

πŸ’‘

If ADB can't see the device, try switching the connection mode in the notification curtain to File Transfer (MTP), even if the screen is locked, sometimes after a few attempts.

Method 3: Fastboot Reset (for a locked bootloader)

If the bootloader is locked and USB debugging is not enabled, the only option is a partial reset via Fastboot, which doesn't delete all data, but returns the system settings to factory settings, which can help unlock the device.

Connect the device turned off to the PC, holding Volume Down + Power to log into the Fastboot.

fastboot devices

(Connection check. If the device is not displayed, install the drivers again.)

fastboot erase userdata


fastboot erase cache




fastboot reboot

These commands will clear user data and cache, but will not affect system partitions. Once the device is rebooted, the device will suggest configuring it as new.

MethodRequires unlocking of the loaderIt works with a locked screen.Deletes all data.Difficulty
Mi Flash Toolβœ… Yes.βœ… Yes.βœ… Completely.Medium
ADB-team❌ No.βœ… Yes (if debugging is on)βœ… Completely.Low.
Fastboot (partial reset)❌ No.βœ… Yes.❌ Partially (userdata only)Low.

Common mistakes and their solutions

Even with the correct following of instructions, errors can occur, and here are the most common ones and ways to fix them:

  • πŸ”Œ The device is not defined in Fastboot/ADB: Try another one. USB-cable or port. disable driver signatures in Windows β†’ gpedit.msc β†’ User configuration β†’ Administrative templates β†’ System system β†’ Installation of the driver β†’ Disable signature verification. Install drivers manually through Device Manager (select Android Bootloader Interface).
  • 🚫 Mi Flash Tool "Device locked" error: Unlock the bootloader through the official Xiaomi website (requires Mi Account binding and wait 7-30 days (ADB or Fastboot).
  • ⚠️ Invalid sparse file format at header error: Download the firmware again, the file may have been corrupted when it was uploaded. Try another version MIUI (For example, instead of Global, take China Stable).

If the device is stuck on the Xiaomi or MIUI logo after reset, do a hard reset: hold Volume up + Power for 10-15 seconds. If this does not help, swipe the device again through the Mi Flash Tool.

What if you need a Mi Account after the reset that doesn’t exist?
If the device requests Mi Account data that you do not have access to, try: 1. Enter the last associated account (even if you do not remember it, try to restore the password via email/SMS). 2. Contact Xiaomi Support with proof of ownership of the device (check, box, IMEI). 3. Use FRP bypass (Factory Reset Protection) through special utilities like Mi Account Unlock Tool, but this is risky and can lead to lock the device.

How to recover data after resetting

A factory reset via a PC deletes all data without recovery if no backup has been created, but there are several ways to return some of the information:

  • ☁️ Cloud backups: Check out Mi Cloud – if sync has been enabled, contacts, photos and notes can be saved there. Restore data from Google Account (contacts, calendar, email).
  • πŸ’Ύ Local backups: If you did backup through Settings β†’ System system β†’ Backup, connect the device to the PC and check the folder MIUI/backup/AllBackup Use programs like Dr.Fone or EaseUS MobiSaver to scan internal memory (efficiency) ~30–50%).
  • πŸ“± Recovery through TWRP (Only for unlocked bootloader: Install custom recavery TWRP and use the functions of recovery from backup or scanning partitions.

Important: Do not write new data to your device after a reset, which reduces the chances of recovering old files. If the data is critical, contact specialized service centers (for example, Lab.Xiaomi), which use professional equipment to extract information from flash memory.

πŸ’‘

The only reliable way to save data before resetting is to back up regularly through Mi Cloud or locally on a PC. After reset via PC, file recovery is only partially possible and is not guaranteed.

FAQ: Frequent questions about Xiaomi reset via PC

Can you reset Xiaomi via PC without losing data?
No. Any factory reset, especially through the Fastboot or Mi Flash Tool, deletes all user data. The only way to save information is to back up before reset.
Why can't the Mi Flash Tool see my device?
There are several reasons: Drivers are not installed (check in Device Manager for Android Bootloader Interface). USB 3.0 port is used (try USB 2.0); Device is not in Fastboot mode (keep Volume down + Power when connected); Antivirus lock (turn off protection while you are firmware).
What if the device does not turn on after reset?
If the device is stuck on the logo or not responding: Try a hard reboot (Loudness up + Power for 15 seconds). Sweat the device again through the Mi Flash Tool, selecting Clean all and lock (this will block the bootloader, but will return the workability). If nothing helps, contact the service center - it may be damaged flash memory.
Can I reset Xiaomi via PC if I forget the Mi Account password?
Yes, but after the reset, the device will require you to enter the data of the associated Mi Account. If you do not remember the password: Try to restore it through the official website. If the account is not yours (the device is bought with hands), contact the previous owner. At the very least, use the services of FRP withdrawal services, but this can cost up to 30% of the price of the device.
Is this manual suitable for Xiaomi tablets (e.g. Pad 5/6)?
Yes, all of the methods described work for Xiaomi tablets (the Pad series), as they also work on the basis of MIUI. The exception is the HyperOS models (for example, Xiaomi Pad 6S Pro), where other firmware versions may be required.