Tutorial to flash stock MIUI using flash_all.bat
Why use Mi Flash when all it does is just running a file inside the rom folder?
- Windows:
Extract rom
Enter rom folder (you should see multiple folders and files, if not u extracted incorrectly)
Open cmd inside rom folder (not powershell!)
Run this command to download platform tools inside rom folder:
(Skip this if you already have platform tools accessible from anywhere somehow)
Make sure to be inside rom folder, connect phone in fastboot mode to computer
Run fastboot devices to make sure your phone is connected
Run
Stock rom should hopefully be flashed
- Linux:
Using your distro's package manager, install platform-tools
Extract rom
Enter rom folder (you should see multiple folders and files, if not u extracted incorrectly)
Open terminal inside rom folder
Make sure to be inside rom folder, connect phone in fastboot mode to computer
Run
Make it executable:
Run it:
Why use Mi Flash when all it does is just running a file inside the rom folder?
- Windows:
Extract rom
Enter rom folder (you should see multiple folders and files, if not u extracted incorrectly)
Open cmd inside rom folder (not powershell!)
Run this command to download platform tools inside rom folder:
curl -L https://raw.githubusercontent.com/itsaschoolbus/stuff/refs/heads/main/dl_adbtocd.bat -o "%TEMP%\dladb.bat" && "%TEMP%\dladb.bat" && del "%TEMP%\dladb.bat"
(Skip this if you already have platform tools accessible from anywhere somehow)
Make sure to be inside rom folder, connect phone in fastboot mode to computer
Run fastboot devices to make sure your phone is connected
Run
flash_all.bat, either by clicking in file explorer or typing in cmdStock rom should hopefully be flashed
- Linux:
Using your distro's package manager, install platform-tools
Extract rom
Enter rom folder (you should see multiple folders and files, if not u extracted incorrectly)
Open terminal inside rom folder
Make sure to be inside rom folder, connect phone in fastboot mode to computer
Run
fastboot devices to make sure your phone is connectedMake it executable:
chmod +x flash_all.shRun it:
./flash_all.sh👍1💩1