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:
- Go to Settings β About Phone β MIUI version and tap 7 times on the build number to activate Developer Mode.
- 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_dataIf 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
- Turn off your smartphone and press Volume Down + Power before the Fastboot logo appears.
- Connect the device to your PC and open the command line in the folder with fastboot.
- 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
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\).
- Run MiFlash.exe on behalf of the administrator.
- Click Select and point the way to the firmware folder.
- Connect the switched off smartphone in Fastboot mode (clamp Volume down + Power).
- In MiFlash, press Refresh β the device should appear.
- 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
| Method | Requires unlocking of the loader | It works on a locked screen. | Saves the data. | Difficulty | Implementation 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):
- Enter your previous account. If you've reset your device, just log in.
- Contact the previous owner (if you bought a used smartphone) and ask them to remove the device from the Mi Account.
- 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)
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 faulty | Install 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 authorized | Unlock the bootloader via the Mi Unlock Tool. Sign in to MiFlash under the same account as your phone. |
| anti-rollback check fail | Trying to stream an older version of MIUI | Download the same or newer version. |
| partition table doesn't exist | Partition 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.txtThe log.txt file will help diagnose the problem on forums (e.g., 4PDA or XDA Developers).