Browse and select the main extracted firmware folder (the folder that contains the images folder, do not select the images folder itself). 3. Select the "Clean All" Option (Crucial Step)
: Install the necessary Xiaomi/Qualcomm USB drivers on your PC. flash all bat xiaomi link
Add :: at the beginning of each line to comment them out. Save the file and rerun MiFlash. Browse and select the main extracted firmware folder
packages. It is used to completely wipe a device and install a fresh factory image. Essential Requirements Unlocked Bootloader : This process will work if your device's bootloader is locked. Fastboot ROM : Ensure you download the version of the ROM (typically a file), not a "Recovery" ROM (typically a file). Use the Xiaomi Firmware Updater to find the correct version for your specific model. : Install the Xiaomi ADB and Fastboot drivers on your PC so it can recognize your phone in Fastboot mode. How to Use the Flash Script There are two primary ways to use the flash_all.bat Method 1: Using the Mi Flash Tool (Recommended) Extract the ROM : Unzip the downloaded file twice until you see a folder containing an folder and several Open Mi Flash : Launch the Official Mi Flash Tool to point it to the main extracted ROM folder (not the subfolder). Boot to Fastboot : Power off your phone, then hold Volume Down + Power until the Fastboot bunny logo appears. : Connect your phone to the PC, click in the tool, select at the bottom, and hit Method 2: Manual Flash (No tool required) Navigate to your extracted ROM folder. Double-click flash_all.bat while your phone is connected in Fastboot mode. Add :: at the beginning of each line to comment them out