Photos, apps, and settings are deleted.
For users who simply need to restore a working device, follow this recommended workflow: flash all bat xiaomi link
Download the latest Platform Tools for Windows. Photos, apps, and settings are deleted
Wipes all user data, flashes the factory software, and relocks your device’s bootloader. Prerequisites Before Flashing : The most thorough option
This script, found within official Xiaomi Fastboot ROMs, allows you to completely reset your device to its factory state. Here is everything you need to know about using it and where to find the right links. What is flash_all.bat?
: The most thorough option. It wipes all user data and internal storage before flashing the new system.
When the flashing process completes, the Mi Flash Tool will show a "Success" message. Your phone should automatically reboot. The first boot may take longer than usual (sometimes up to 5-10 minutes) as the system builds its cache and optimizes apps. Once the system starts up, you can then set up your phone as new.