5
August
2025
How to flash a smartphone from Linux in Fastboot mode
17:00

How to flash a smartphone from Linux in Fastboot mode

5 August 2025 17:00

How to flash the Xiaomi smartphone in Linux OS if the firmware in the TGZ archive format.

The article examined the Xiaomi Redmi 6 phone firmware from the Fastboot mode in Linux Mint.

The firmware is a risky event, you must understand the risk - if you sew Firmware from another device in your smartphone, you will get a "brick".

The PCGRUXM RU version firmware is made by Russian firmware, and the global version of PCGMIXM - global firmware.

For firmware from the FASTBOOT firmware mode in the form of files with TGZ extension.

1) firmware 11.0.5 for the phone Xiaomi Redmi 6 took from the site for developers (Androidfilehost.com), or a site in Russian:miuirom.org.

2) removed the contents of the firmware archive with the extension tgz :

tar -xf cereus_global_images_V11.0.5.0.PCGMIXM_20200916.0000.00_9.0_global_41e1db1e83.tgz 

3) went into the firmware folder for Fastboot

cd cereus_global_images_V11.0.5.0.PCGMIXM_20200916.0000.00_9.0_global

4) a team of viewing the contents of the catalog

ls

V folder there are three scripts in Shell:
* flash_all.sh * - full firmware, phone "like from a factory", i.e. Photos and videos of the user are deleted.
flash_all_except_data_storage.sh ** - Judging by the name - sew all sections of trome user data (photos should be preserved)
* Flash_all_Lock.sh - with a full firmware, the bootloader blocks (apparently if someone confuses Unlocked inscriptions during launch, it will no longer be lost, and the possibility of installing firmware will be lost).

I decided that they will run the script flash_all.sh For full firmware with removal of everything, but without locking the bootloader.

5) permission to perform a script for full firmware:

chmod +x flash_all.sh

6) If you can see the settings menu item - advanced settings - for developers, then you need to check that in the menu *#*#3646633#*#*- Band Mode for SIM1 and SIM2 set all the checkmarks against all available points. Put them.

7) turned off the phone. I connected the USB cable to the computer.

8) Squeezed "volume down" and "power" . After the vibration, he released them.
A picture appeared on the screen that depicts a schoolboy in a earpiece with a red star and a robot that he repairs. The phone is in Fastboot and is ready for firmware.

9) installed the FASTBOOT command line utility for firming a smartphone:

sudo apt install fastboot

10) connected a smartphone to a computer using a USB cable

11) completed the team in the terminal for the output of the device identifier in Fastboot mode:

fastboot devices

Select the device of the device and copy to the exchange buffer.

12) launching the software firmware operation in a smartphone:

./flash_all.sh -s 752d96687d21

where 752D96687D21 is the ID of the device, which is departed by the FASTBOOT DEVICES command

13) wait for the end of the firmware. The script will complete the work (the cursor will enter the command line of the terminal). At the same time, the phone will go for a reboot.

Fastboot_finish

14) The first launch after the device firmware lasts a long time, about 15 minutes.

15) We perform the initial setting of the phone - language, region, etc. ..

Addition: inclusion of Volte and Vowifi in Xiaomi

1) inclusion of VOLTE: in the numbers ##86583##

2) inclusion of vowifi: in the nomeronabaker ##869434##

3) In the phone settings, inclusion of VOLTE and Vowifi:

  • Settings - SIM cards and mobile networks - SIM cards settings - (select operator) -
    VOLTE and ZAZOVE via wifi in the inclusive position.

Source:
*XDA Forums



Related publications