Congrats Flashing Xiaomi firmware with flash_all.bat (2023)

Status
Not open for further replies.

.::Greed::.

Friend's Martview
Jun 10, 2019
1,517
1,118
Flashing Xiaomi firmware with flash_all.bat (2023)


This article provides instructions on how to fix the flash_all.bat error on Xiaomi devices. The error occurs when trying to flash global firmware using the flash_all.bat file. The solution involves editing the flash_all.bat file using Notepad++ and removing the first few lines of code.

Requirements:

  • Xiaomi phone with bootloader unlocked
  • Fastboot mode
  • Notepad++
  • Android Debug Bridge ( adb fastboot )

Steps:

  • Copy the flash_all.bat file from the firmware folder to the images folder.
  • Copy the following files from the Android Debug Bridge folder to the images folder:
    • adb.exe
    • AdbWinApi.dll
    • AdbWinUsbApi.dll
    • fastboot.exe
    • libwinpthread-1.dll
  • Open the new flash_all.bat file from the images folder with Notepad++.

1698727346506.png
  • Select from the beginning to exit /B 1) and delete.

1698727391843.png
  • Copy %*
  • Press ctrl + H simultaneously on the keyboard to open the Replace dialog box.
  • Paste %* in the Find What field.
  • Press the Space key twice in the Replace with field.
  • Click Replace All.
  • Without closing the Replace dialog box, copy %~dp0images\.
  • Paste %~dp0images\ in the Find What field.
  • Press the Space key twice in the Replace with field.

  • Click Replace All.
  • Select from @echo to && exit / B 1 and delete.

  • Press ctrl + s on the keyboard to save the file.

To flash the firmware:
  1. Boot your phone into Fastboot mode.
  2. Connect your phone to your computer using a USB cable.
  3. Open the firmware folder and navigate to the images folder.
  4. Run the following file to flash the firmware:
flash_all.bat

Wait for the flashing process to complete. Once the process is complete, your phone will reboot into the new firmware.

Things to keep in mind:
  • Make sure to unlock your bootloader before flashing the firmware.
  • Make sure to use the correct firmware for your phone model.
  • Back up your data before flashing the firmware.
  • Flashing the firmware may void your warranty.
Troubleshooting:
  • If you get an error message while flashing the firmware, try restarting your phone and computer.
  • If you are still having problems, try flashing the firmware manually using fastboot commands.
Conclusion:
  • This is a simple guide on how to flash Xiaomi firmware with flash_all.bat using Notepad++. By following these steps, you can easily flash the firmware on your Xiaomi phone.
Download Link

If you find my post helpful, press like button
 
Status
Not open for further replies.
Top