Download the ROM suitable for your device from the MIUI site
Extract the downloaded archive
Install the Android SDK
Make sure
adbandfastbootare in your path$ export PATH=path/to/android/sdk/platform-tools:$PATH
Check if your device is detected
$ adb devices
If device is listed, reboot to bootloader
$ adb reboot bootloader
Check if your device is detected by fastboot
$ fastboot devices
You may need to use
sudobeforefastbootif you get a permission denied errorThere are two scripts for flashing the ROM:
flash_all.sh- Flash ROM and erase user dataflash_all_except_data_storage.sh- Flash ROM without erasing user data
Whichever script you decide to use, make sure that the interpreter is mentioned at the top of the script like
#!/bin/sh
If the above line is missing, add it to the top of the script
Run the script (I've chosen
flash_all.sh)$ cd path/to/extracted/ROM/archive
$ ./flash_all.sh
You may need to run
sudo ./flash_all.shif you had to usesudowithfastbootSit back and relax. The script needs no user interaction. After flashing the ROM, the scipt will reboot your device.
Reboot will take quit a bit of time. Don't panic.
-
-
Save 00Kush00/adaab77071454967a292c1175b3962fe to your computer and use it in GitHub Desktop.
How to flash MIUI Fastboot ROM from Linux
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment