[HowTo] Flash Fastboot ROM with Linux


Muhamed

Members
Jun 24, 2014
308
67
Tutorial for flashing/install xiaomi.eu Fastboot ROM's (Android 12 - MIUI 13) over Linux-Terminal.
First of all we need adb and fastboot. We will get all what we need over android-tools:

0.png

Arch Based distros (Manjaro, EndeavourOS, etc.)
sudo pacman -S android-tools

Debian based distros (Ubuntu, Linux Mint, PopOS, etc.)
sudo apt install android-tools

RPM based distros (Fedora, RedHat, Opensuse, etc.)

sudo dnf install android-tools

1.png


Download the ROM -> extract -> right click (empty space in folder) -> open in Terminal

2.png


1. Connect the phone with USB cable
2. run -> adb devices
3. a windows will pop up on your Xiaomi smartphone -> press yes/ok and "never forget"
4. run -> adb reboot bootloader -> wait few seconds, your phone will reboot in fastboot mode
5. run -> fastboot devices -> you need to see a number (if not switch USB port/cable)
6. with -> ls -> check if u see the firmware files (if not you are in wrong folder)
7. now u got 2 options:
fresh install -> ./linux_fastboot_first_install_with_data_format.sh -> will wipe all data and only for first install
update rom -> ./linux_fastboot_update_rom.sh -> will update without wipe

3.png


You need to wait untill you see this:

4.png


Finished and Rebooting. This will not happen immediately, just wait untill your phone reboot, than u can close the terminal and disconnect USB cable.

- you can use USB 3.0/3.1 but it's useless, because all Xiaomi's only got USB 2.0
- use the original cable, some cable will not work, I use deleyCON USB 3.0 cable and its working with any phone
- some Debian distros need a "sudo", so not "adb devices" but "sudo adb devices", just before any command here sudo ...
- don't touch it, don't disconnect, just wait untill it reboots
- first boot after flash/install can be 5-10 min. -> just wait and don't panic
- generally it works on Linux without any issue, any USB port but some cable doesn't, the original one from the box works always
 

Muhamed

Members
Jun 24, 2014
308
67
Quick update, I also try it on Fedora 35 (36 still not available)
1.png

2.png

It's working with USB 3.0 port and even on Type C USB 3.2 Gen 2 port but you need the sudo before any command.
3.png

4.png

This is just to take away the fear...
 
  • Like
Reactions: katerpanne