[TOOL][Linux] MiFlash for Linux

Search This thread

complicazio

Senior Member
Jul 19, 2015
219
47
Redmi Note 10 Pro
This UNOFFICIAL tool allows you to flash in Linux an official Xiaomi firmware in fastboot (.tgz) format just like Miflash does on Windows machines; also it is possible to make a full backup of the ROM always in .tgz format only for device with Android Marshmallow or higher.


TESTED GUIDE WITH UBUNTU 17.10 64-bit


You must first install and configure adb and fastboot for Linux.

INSTRUCTIONS:


Open the terminal (ctrl + alt + t) and write the following commands


Code:
sudo add-apt-repository ppa:phablet-team/tools
Code:
sudo apt-get update
Code:
sudo apt-get install android-tools-adb
Code:
sudo apt-get install android-tools-fastboot

FLASH FIRMWARE

1) download the zip file from HERE and place it on the desk;

2) Restart the device in fastboot mode and connect it to the computer with USB cable;

3) on UBUNTU unpack the .zip by right-clicking on the file and selecting "extract here", now open the newly created folder and unpack the .tar file that you will find in it;

More generally, to extract .zip and .tar files from the terminal, you use the commands:

Code:
unzip nomefile.zip

Code:
tar -xvf nomefile.tar


in our case, from desk, give the following commands:

Code:
cd Scrivania

Code:
unzip XIAOMI-TOOL-MiFlash-for-Linux-by-IceMan-master

Code:
cd XIAOMI-TOOL-MiFlash-for-Linux-by-IceMan-master

Code:
tar -xvf Xiaomi_MiFlash_new.tar

D0cUAlK.png



5) To start the program, open a new terminal window (ctrl+alt+t) and type the following commands:

Code:
cd Scrivania

Code:
cd XIAOMI-TOOL-MiFlash-for-Linux-by-IceMan-master/Xiaomi_MiFlash_new && ./go.sh

L1LxWLV.png


fXr0FhK.png


6) copy the rom .tgz file to / XIAOMI-TOOL-MiFlash-for-Linux-by-IceMan-master / Xiaomi_MiFlash_new / XIAOMI-FILE folder


7) Select "1" for firmware flash


8) Select "1" to choose the rom file to install


aL1yEiT.png



9) Select one of the flash options and wait for the operation to complete:


O399SqN.png





BACKUP ROM FORMAT .TGZ


1) Start the phone in TWRP and connect it to the PC.

2) start the tool as in step 5 above and select option "2".

BACKUP ONLY WORK WITH TERMINALS WITH MARSHMALLOW OR SUPERIOR ANDROID VERSION.






Source

credits: Iceman-IT (developer)
 
Last edited:

dantopa

Member
Dec 9, 2014
7
5
Thank you, I use Linux a lot, this is really usefull. Good work, I will try it now

---------- Post added at 04:06 AM ---------- Previous post was at 04:01 AM ----------

You are amazing, this tool Works perfectly!!! Long life to linux
 

steadfasterX

Recognized Developer
Nov 13, 2013
6,246
15,484
127.0.0.1
OnePlus 7T Pro
This UNOFFICIAL tool allows you to flash in Linux an official Xiaomi firmware in fastboot (.tgz) format just like Miflash does on Windows machines; also it is possible to make a full backup of the ROM always in .tgz format only for device with Android Marshmallow or higher.

great tool.
I will add it to FWUL soon

.
 

anarchotaoist

Senior Member
Jun 2, 2018
109
17
TWRP

Hi. My phone is unlocked with oem debugging and I have installed ADB and Fasboot as instructed.
Can I go ahead and flash now?
What of TWRP? Does this miFlash tool have TWRP built in or do I have to find a way to install that separately?
What of supersu? Which comes first. I read that I need to install supersu first, then going to instructions about supersu it says I need TWRP installed!! This is very confusing!
Please help!
Thanks!
 
Last edited:
  • Like
Reactions: Mangel79

Mangel79

Senior Member
Jan 27, 2013
80
7
Hi. My phone is unlocked with oem debugging and I have installed ADB and Fasboot as instructed.
Can I go ahead and flash now?
What of TWRP? Does this miFlash tool have TWRP built in or do I have to find a way to install that separately?
What of supersu? Which comes first. I read that I need to install supersu first, then going to instructions about supersu it says I need TWRP installed!! This is very confusing!
Please help!
Thanks!

Did you found a answer? I'm in the same case. Thanks
 

tonyak88

New member
Oct 2, 2018
2
0
no bootloader neither baseband version

ciao, credo tu sia italiano
la tua procedura descritta è perfetta ma ho un problema diverso: nel tentativo di installare un nuovo os per errore sono finito ad aver cancellato tutto, e nel fastboot non ho più il bootloader version ne la baseband version (praticamente non si avvia più nulla)...quindi dovrei installare una twrp nuova praticamente da zero e il mio pc non riconosce il dispositivo (attacco l'usb e il pc non lo vede)
potresti darmi una mano?

grazie mille,

Antonio
 

demolang

Member
Apr 12, 2018
6
0
ERROR on last gnome-terminal

Description on gnome-terminal after run ./go.sh :
# Option “-x” is deprecated and might be removed in a later version of gnome-terminal.
# Use “-- ” to terminate the options and put the command line to execute after it.
# watch_fast: "/org/gnome/terminal/legacy/" (establishing: 0, active: 0)
# unwatch_fast: "/org/gnome/terminal/legacy/" (active: 0, establishing: 1)
# watch_established: "/org/gnome/terminal/legacy/" (establishing: 0)
 

viking777

Senior Member
Aug 15, 2013
135
42
I am a new Xiaomi user, but an old Linux user, so this tool should be very useful for me. I have already got it going and done a rom backup with it. It certainly works well enough for backups - haven't tried flashing yet though. Thanks to OP for posting this and special thanks to IceMan for porting the tool to Linux.
 

HardikGandhi

New member
Nov 11, 2018
4
0
Pls help me

After selecting the flash option, it shows the selected file is etc. And don't show anything
The terminal is there but further it is blank
Still I kept for 10 mins than too nothing happened
Pls help:confused:

---------- Post added at 10:50 AM ---------- Previous post was at 10:44 AM ----------

After selecting the flash option, it shows the selected file is etc. And don't show anything
The terminal is there but further it is blank
Still I kept for 10 mins than too nothing happened
Pls help:confused:
I tried flash all except storage and flash all except data storage but it shows permission denied
I have my phone stuck in bootloop
Pls help flashing firmware using linuxmint
 

abhikanike

New member
Apr 21, 2019
1
0
Where is the firmware .tgz file

Hi,

From where can i download the firmware .tgz file.
It is required in the step of copying to FIRMWARE_NEW folder
 

nglpx1

Member
Mar 8, 2016
14
0
Description on gnome-terminal after run ./go.sh :
# Option “-x” is deprecated and might be removed in a later version of gnome-terminal.
# Use “-- ” to terminate the options and put the command line to execute after it.
# watch_fast: "/org/gnome/terminal/legacy/" (establishing: 0, active: 0)
# unwatch_fast: "/org/gnome/terminal/legacy/" (active: 0, establishing: 1)
# watch_established: "/org/gnome/terminal/legacy/" (establishing: 0)

use xterm
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    This UNOFFICIAL tool allows you to flash in Linux an official Xiaomi firmware in fastboot (.tgz) format just like Miflash does on Windows machines; also it is possible to make a full backup of the ROM always in .tgz format only for device with Android Marshmallow or higher.


    TESTED GUIDE WITH UBUNTU 17.10 64-bit


    You must first install and configure adb and fastboot for Linux.

    INSTRUCTIONS:


    Open the terminal (ctrl + alt + t) and write the following commands


    Code:
    sudo add-apt-repository ppa:phablet-team/tools
    Code:
    sudo apt-get update
    Code:
    sudo apt-get install android-tools-adb
    Code:
    sudo apt-get install android-tools-fastboot

    FLASH FIRMWARE

    1) download the zip file from HERE and place it on the desk;

    2) Restart the device in fastboot mode and connect it to the computer with USB cable;

    3) on UBUNTU unpack the .zip by right-clicking on the file and selecting "extract here", now open the newly created folder and unpack the .tar file that you will find in it;

    More generally, to extract .zip and .tar files from the terminal, you use the commands:

    Code:
    unzip nomefile.zip

    Code:
    tar -xvf nomefile.tar


    in our case, from desk, give the following commands:

    Code:
    cd Scrivania

    Code:
    unzip XIAOMI-TOOL-MiFlash-for-Linux-by-IceMan-master

    Code:
    cd XIAOMI-TOOL-MiFlash-for-Linux-by-IceMan-master

    Code:
    tar -xvf Xiaomi_MiFlash_new.tar

    D0cUAlK.png



    5) To start the program, open a new terminal window (ctrl+alt+t) and type the following commands:

    Code:
    cd Scrivania

    Code:
    cd XIAOMI-TOOL-MiFlash-for-Linux-by-IceMan-master/Xiaomi_MiFlash_new && ./go.sh

    L1LxWLV.png


    fXr0FhK.png


    6) copy the rom .tgz file to / XIAOMI-TOOL-MiFlash-for-Linux-by-IceMan-master / Xiaomi_MiFlash_new / XIAOMI-FILE folder


    7) Select "1" for firmware flash


    8) Select "1" to choose the rom file to install


    aL1yEiT.png



    9) Select one of the flash options and wait for the operation to complete:


    O399SqN.png





    BACKUP ROM FORMAT .TGZ


    1) Start the phone in TWRP and connect it to the PC.

    2) start the tool as in step 5 above and select option "2".

    BACKUP ONLY WORK WITH TERMINALS WITH MARSHMALLOW OR SUPERIOR ANDROID VERSION.






    Source

    credits: Iceman-IT (developer)
    3
    This UNOFFICIAL tool allows you to flash in Linux an official Xiaomi firmware in fastboot (.tgz) format just like Miflash does on Windows machines; also it is possible to make a full backup of the ROM always in .tgz format only for device with Android Marshmallow or higher.

    great tool.
    I will add it to FWUL soon

    .
    2
    I'm very new to Linux so any chance of making the instructions a bit more noob friendly?
    Like is nomefile.zip supposed to be namefile.zip? and Italian screenshots?
    I got it to install from the first set of command codes but nothing with the zip extracting codes.

    Help appreciated.

    nomefile=namefile

    Scrivania=Desktop
    1
    TWRP

    Hi. My phone is unlocked with oem debugging and I have installed ADB and Fasboot as instructed.
    Can I go ahead and flash now?
    What of TWRP? Does this miFlash tool have TWRP built in or do I have to find a way to install that separately?
    What of supersu? Which comes first. I read that I need to install supersu first, then going to instructions about supersu it says I need TWRP installed!! This is very confusing!
    Please help!
    Thanks!
    1
    PLease upgrade, not fittable for bionic versions. thanks!