How to Reset Android to Factory Settings on Xiaomi via Computer: The Complete Guide

Resetting Xiaomi's smartphone to factory settings via a computer is a necessary measure when standard methods through the Settings β†’ Reset menu are not available. This is true when the system freezes, the screen is locked, the firmware is damaged or the device is ready for sale. Unlike resetting through Recovery, connecting to a PC gives more control over the process and allows you to bypass some software locks.

This article provides three working ways to reset via a computer (including ADB, MiFlash and Fastboot), detailed instructions for each Xiaomi model (from Redmi Note 10 to Xiaomi 14), and error solutions like device not found or failed to authorize. Particular attention is paid to bypassing the Mi Account lock after a reset - a problem that 40 percent of users face when self-resetting.

Preparation for resetting: what to do before the start

Before starting the reset, make sure that critical conditions are met, and without them, the procedure can result in an error or "brick" the device.

  • πŸ”‹ Battery charge β‰₯ 50%.Discharge during Fastboot reset, the device may stop turning on.
  • πŸ”Œ Original. USB-Cheap cables often don't transmit data in Fastboot mode.
  • πŸ–₯️ Windows PC 10/11 (for MiFlash or macOS/Linux (for ADB). Windows. 7 Possible problems with drivers.
  • πŸ“± Unlocked bootloader (if you reset via Fastboot) on locked devices, the method will not work.

If you reset your device before selling, be sure to log out of Mi Account in the settings. Otherwise, the new owner will not be able to activate the smartphone. To do this, go to Settings β†’ Xiaomi Account β†’ Sign out.

⚠️ Attention: On devices with MIUI 14+ and the Snapdragon processor 8 Gen 2/3 (for example, Xiaomi 13T Pro) Fastboot reset may result in blocking FRP (Factory Reset Protection: This will require you to enter your previous Google account.

Make sure that Xiaomi drivers are installed on the PC|Download MiFlash Tool (version 2023.4.25.0 or later)|Disable the antivirus (it can block) ADB)|Backup your data (if the device is still working)|Connect the smartphone to the back USB-System unit port (front ports are often unstable)

-->

Method 1: Reset via ADB (without data loss in some cases)

The method is suitable if the smartphone is turned on, but you can not go into the settings (for example, because of the pattern lock). ADB (Android Debug Bridge) allows you to reset directly from the working system.

Advantage of the method: you can choose the type of reset - full (--wipe_data) or partial (cache only) on some models (POCO F5, Redmi K60) This is the only way to reset without losing data in the folder. /sdcard/.

Step 1. Enable debugging over USB

If the smartphone still responds to touch:

  1. Go to Settings β†’ About Phone β†’ MIUI version and tap 7 times on the build number to activate Developer Mode.
  2. Back to Settings β†’ Additionally. β†’ For developers and include: πŸ”§ Debugging by USB πŸ”„ Unlocking OEM (if there is a clause)

Step 2: Connect to the PC and execute commands

Download ADB Tools (version 34.0.4 or later) and unpack to the root of the C:\ drive.

adb devices


adb shell




recovery --wipe_data

If you only need to clean the cache (without deleting photos and apps):

adb shell


recovery --wipe_cache

⚠️ Attention: On devices with MIUI 13+ recovery --wipe_data This may not work because of the anti-Rollback protection, in which case you can use fastboot. 2).

πŸ’‘

If ADB doesn’t see the device, try the adb kill-server command, then turn off/connect the cable again. On Windows, installing drivers via MiFlash will also help (see method 3).

Method 2: Reset via Fastboot (Universal Method)

This method even works on β€œbricks” (devices that don’t turn on), the main condition is an unlocked bootloader. If it’s not available, first unlock through the official Xiaomi tool (it can take up to 72 hours).

The procedure takes 5-10 minutes and is guaranteed to delete all data, including:

  • πŸ“Έ Photos and videos in internal memory
  • πŸ“± Installed applications and their data
  • πŸ”‘ Wi-Fi and Bluetooth devices passwords
  • πŸ“Š System settings (language, wallpaper, sound profiles)

Step-by-step instruction

  1. Turn off your smartphone and press Volume Down + Power before the Fastboot logo appears.
  2. Connect the device to your PC and open the command line in the folder with fastboot.
  3. Run commands in order: fastboot devices fastboot oem edl # to switch to EDL mode (if necessary) fastboot erase userdata fastboot erase cache fastboot reboot

If after the reboot, the device asks for a username from Mi Account, then the account was not disabled before the reset. Solution - see the section "What to do if the old account requires after the reset."

List of models with Fastboot blocked by default
Xiaomi 12S Ultra, Xiaomi 13 Pro, Xiaomi 14, Redmi K50 Gaming, POCO F4 GT. These devices first need to unlock the bootloader through the Mi Unlock Tool.

Method 3: MiFlash Reset (for power users)

MiFlash Tool is the official tool from Xiaomi for firmware and reset devices.

  • πŸ”§ Not only do you need to reset your settings, but you also need to reflash your device (for example, after an unsuccessful update).
  • πŸ“± The smartphone does not respond to Fastboot or ADB.
  • πŸ”„ Requires to return stock firmware after custom.

The downside is that you completely erase all partitions, including modem and boot, and after the procedure, the device will look like new, but you will need to reconfigure your network and accounts.

Step 1 Download firmware and MiFlash

1. Go to the official MIUI website and select the firmware for your model (Fastboot version, not Recovery!).

2 Download MiFlash 2023.4.25.0 (last stable version).

Step 2. Sweat the stock firmware.

Unpack the firmware archive into a folder without Cyrillic characters (e.g., C:\Xiaomi\ROM\).

  1. Run MiFlash.exe on behalf of the administrator.
  2. Click Select and point the way to the firmware folder.
  3. Connect the switched off smartphone in Fastboot mode (clamp Volume down + Power).
  4. In MiFlash, press Refresh – the device should appear.
  5. Select the firmware method: Clean all (recommended). Clean all and lock (reset + lock the bootloader (only if you sell the device!).

Flash

⚠️ Note: If MiFlash gives an error critical partition flashing is not allowed, then you have blocked the bootloader. Unlock it through Mi Unlock Tool or use method 2 (Fastboot).

πŸ’‘

MiFlash is the only way to bring the brick back to life if other methods don't work, but it requires strict adherence to the instructions: the wrong firmware can finally kill the device.

Table: Comparison of PC discharge methods

MethodRequires unlocking of the loaderIt works on a locked screen.Saves the data.DifficultyImplementation time
ADB❌ No.❌ No (requires access to the system)βœ… Partially (you can choose the type of discharge)β­β­β˜†2-5 minutes
Fastbootβœ… Yes.βœ… Yes.❌ No (complete erasure)β­β­β˜†5-10 minutes
MiFlashβœ… Yes.βœ… Yes.❌ No (complete flashing)⭐⭐⭐10-15 minutes
EDL (Emergency mode)βœ… Yes (authorization required)βœ… Yes.❌ No.⭐⭐⭐⭐15-30 minutes

What to do if you need an old Mi Account after a reset

Mi Account Lock problem occurs if the Xiaomi account was not disabled before the reset. Even after a complete reset via Fastboot, the device may require the username and password of the previous owner.

Solutions (from simple to complex):

  1. Enter your previous account. If you've reset your device, just log in.
  2. Contact the previous owner (if you bought a used smartphone) and ask them to remove the device from the Mi Account.
  3. Use the official unlocker: Go to the unlock page. Sign in to your account and connect your device. Wait 72 hours (if you have a new account) or 360 hours (if you have previously linked your device).

EDL-The regime (only for experienced ones)

Xiaomi

Unlocking through EDL (for advanced users)
1.Buy. EDL-cable (or make a homemade one by closing the Test Point contacts on the board). 2. Download the.mbn firmware for your model. 3. Use MiFlashPro or QFil for firmware in 9008. 4. Once the firmware is locked, the device will unlock but lose IMEI (Recovery will be required SN Writer).

If none of the methods did not help, contact the service center Xiaomi with documents on the device. the cost of unlocking is from 1,500 to 3,000 rubles (2026).

Through phone settings | Through Recovery | Through Fastboot/ADB | Through MiFlash | Never reset

-->

Solving errors in resetting via PC

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

Mistake.Reason.Decision
device not found (ADB/Fastboot)Drivers not installed or cable is faultyInstall drivers via MiFlash (Driver button). USB-port (preferably) USB 2.0). Disable driver signatures in Windows (bcdedit) /set testsigning on).
failed to authorize (MiFlash)Unblocked bootloader or account not authorizedUnlock the bootloader via the Mi Unlock Tool. Sign in to MiFlash under the same account as your phone.
anti-rollback check failTrying to stream an older version of MIUIDownload the same or newer version.
partition table doesn't existPartition table is damaged (often after a failed root)Fastboot Fastboot with a Flag --erase-all-data.

If the error is not specified in the table, check the logs in MiFlash (Log button) or run the following command in ADB:

adb logcat > log.txt

The log.txt file will help diagnose the problem on forums (e.g., 4PDA or XDA Developers).

FAQ: Frequent questions about Xiaomi reset via PC

Can you reset Xiaomi via PC without losing data?
Partly yes. Through ADB You can execute the recovery command. --wipe_cache, It's a cache-free application that only cleans the cache without affecting the photos and files (--wipe_data) Always deletes user data. If you want to save files but the device doesn't turn on, try extracting data through TWRP Recovery (requires an unlocked bootloader).
Why does the smartphone not turn on after reset via Fastboot?
Probable reasons: Not been stitched boot.img (The device is stuck on the logo. The firmware is damaged (for example, the wrong version was downloaded). MIUI). Failure to write modem partition (no network after activation). Solution: Sweep through the full firmware through MiFlash with the Clean all option.
How to reset Xiaomi if you forgot the pattern lock and debugging over USB is disabled?
This is only a Fastboot or EDL: If the bootloader is unlocked, use method 2 (Fastboot). If the bootloader is locked, you will need to use it. EDL-cable and authorized developer account. MIUI 12.5+ and the MediaTek processor (for example, Redmi Note 11) can try reset via SP Flash Tool, but it's risky without experience.
How long does it take to reset through MiFlash?
Time depends on the model and firmware version: Xiaomi with a Snapdragon processor (for example, Xiaomi 12): 8-12 minutes; MediaTek devices (for example, Redmi 10C): 12-18 minutes; EDL firmware: up to 30 minutes (due to low data transfer speeds). If the process is delayed by more than 20 minutes, check the cable connection and re-run the firmware.
Can you drop Xiaomi from Mac or Linux?
Yes, but with limitations: ADB/Fastboot runs on macOS and Linux out of the box (installe via brew install android-platform-tools or sudo apt install adb fastboot). MiFlash officially supports only Windows. On macOS, you can use MiFlashPro (an informal port) or a Windows virtual machine. Linux will also need to add udev rules to recognize Xiaomi devices in Fastboot.