Reset a Xiaomi device using MiFlash

This guide requires Microsoft Windows to follow
This procedure will wipe all data on the device

This guide is based on this guide on4pda

Important Notice

Your IMEI's might be lost!

Instructions

  1. Download the MiFlash tool

  2. Download the device's official firmware in .tgz format

  3. Unpack MiFlash and create a log folder in it's directory

  4. Open XiaoMiFlash.exe

  5. When promted to install drivers, do that

  6. Unpack the firmware (you may have to do that twice)

  7. Press "select" and select the firmware dir

  8. Choose the flashing mode: "clean all" to wipe user data, "save user data" to keep itDo not choose the default: "clean all and lock". It will lock the bootloader

  9. Plug in your phone while in fastboot mode

  10. Press "refresh" and "flash"error: flash timeout, error: Not catch checkpoint (and probably others) are ok. They just mean that the device wasn't locked