Start the "XIAOMI TOOL" program from the terminal (cd Xiaomi_MiFlash/ && sudo ./go.sh) and copy the file
of the .tgz firmware inside the "/Xiaomi_MiFlash/XIAOMI-FILE/" folder;
Type "1" to start "FLASH Firmware";
Select the firmware file (tgz) and wait for the end of the operation;
Select the affected .sh file. The device will restart automatically.
Backup firmware:
Restart the device in TWRP mode;
Type "2" to start backup and end operations by pressing any key;
Flash TWRP:
Restart the device in fastboot mode;
Connect the device to the PC via USB cable;
Start the "XIAOMI TOOL" program from the terminal (cd Xiaomi_MiFlash/ && sudo ./go.sh) and copy the file
of the twrp recovery (.img) inside the "/Xiaomi_MiFlash/XIAOMI-FILE/" folder;
Type "3" to start "TWRP flash";
Select the recovery file for twrp (.img);
The device will automatically restart in TWRP mode.
Flash boot.img:
Restart the device in fastboot mode;
Connect the device to the PC via USB cable;
Start the "XIAOMI TOOL" program from the terminal (cd Xiaomi_MiFlash/ && sudo ./go.sh) and copy the file
boot.img inside the "/Xiaomi_MiFlash/XIAOMI-FILE/" folder;
Type "4" to start "flash boot.img";
Select the boot.img file);
The device will restart automatically in normal mode.