[UNIX][mFastboot] mFastboot on Linux and Mac OS X, and how to use it

Search This thread

danieliop

Senior Member
Jan 18, 2012
189
123
I'm a Linux Mint user, and I needed to flash back my Moto G 2014 with Motorola's Fastboot. As I haven't seen any topic regarding it here on this forum, I'm doing my job and posting it.

Download:

For Linux
For Mac OS X


Usage: Drop the file to somewhere - it's a good idea to drop on the same folder as the files you're going to flash.
Launch the terminal from where you downloaded it.
If you need, cd to the correct path.

First, turn it executable.
Code:
chmod +x linux-fastboot
(keep it named as this so it doesn't conflict with the default fastboot)

And that's it.
The commands now are issued as they always have been. In my computer, however, it acted weirdly if I didn't use it with sudo. So I did.
Example:

Code:
sudo ./linux-fastboot devices
sudo ./linux-fastboot flash boot boot.img
sudo ./linux-fastboot flash recovery recovery.img

And that's it.
 

danieliop

Senior Member
Jan 18, 2012
189
123

scryan

Senior Member
Oct 19, 2013
780
687
Because this command only works on Ubuntu based distro's. Not in Ach, Fedora or another distro.

Yeah but in Arch you can pacman -S android-tools if your only looking for adb/fastboot...
However I understand that mfastboot is something different. Where is mfastboot from, how can I know if/when its updated and get the latest version from?
 

smitharro

Senior Member
Jan 2, 2012
2,629
1,712
Blokker
Yeah but in Arch you can pacman -S android-tools if your only looking for adb/fastboot...
However I understand that mfastboot is something different. Where is mfastboot from, how can I know if/when its updated and get the latest version from?

I'm not entirely sure but I think the M stands fore 'motorola'. So mfastboot = motorola fastboot.
 

scryan

Senior Member
Oct 19, 2013
780
687
I'm not entirely sure but I think the M stands fore 'motorola'. So mfastboot = motorola fastboot.

Yes, that is true...

However is the mfastboot tool published by Motorola? Google searching has only lead to forum postings such as this, where someone shares the version they have for others to download...

However is there an official motorola development site where they offer these utilities, either as binaries or as source?

Is there a single official location where developers can check for news and or updates on mfastboot, that offers source or binaries for the latest stable&test builds and possibly older versions?

Basically just trying to find where the program is actually officially released, rather then just passed along versions (or if that is even the case).... Most linux utilities will have an official kind of "homebase" .. For instance in the samsung world a lot of flashing is done with odin, who's linux counterpart is heimdall http://glassechidna.com.au/heimdall/

Edit: FOUND IT! ok maybe its well know, but for those like me who didn't... mfastboot is offered by motorola and bundled with the recovery images they offer here: https://motorola-global-portal.custhelp.com/app/standalone/bootloader/recovery-images
Looks like you have to have an account, and request the image, and fastboot will be bundled with it
After downloading the image for your device:

Unzip the image.
Put your device in fastboot mode.
NOTE: You must use the Motorola fastboot utility to flash (included in the Darwin/, Linux/ or Windows/ directory). Please do NOT use the Android fastboot utility
So that is the official source for the latest version, but I doubt they update too often... and I am sure its OK to use the mfastboot offered here. (I was just interested to know/note the official source, I think its at least semi important)
 
Last edited:

smitharro

Senior Member
Jan 2, 2012
2,629
1,712
Blokker
Yes, that is true...

However is the mfastboot tool published by Motorola? Google searching has only lead to forum postings such as this, where someone shares the version they have for others to download...

However is there an official motorola development site where they offer these utilities, either as binaries or as source?

Is there a single official location where developers can check for news and or updates on mfastboot, that offers source or binaries for the latest stable&test builds and possibly older versions?

Basically just trying to find where the program is actually officially released, rather then just passed along versions (or if that is even the case).... Most linux utilities will have an official kind of "homebase" .. For instance in the samsung world a lot of flashing is done with odin, who's linux counterpart is heimdall http://glassechidna.com.au/heimdall/

Edit: FOUND IT! ok maybe its well know, but for those like me who didn't... mfastboot is offered by motorola and bundled with the recovery images they offer here: https://motorola-global-portal.custhelp.com/app/standalone/bootloader/recovery-images
Looks like you have to have an account, and request the image, and fastboot will be bundled with it

So that is the official source for the latest version, but I doubt they update too often... and I am sure its OK to use the mfastboot offered here. (I was just interested to know/note the official source, I think its at least semi important)

Well, maybe that's what they say. But i used the standard Ubuntu fastboot to restore and relock my device succesfully. All went fine. First I tried mfastboot in Windows 7. That didn't work for me however...
 

scryan

Senior Member
Oct 19, 2013
780
687
Well, maybe that's what they say. But i used the standard Ubuntu fastboot to restore and relock my device succesfully. All went fine. First I tried mfastboot in Windows 7. That didn't work for me however...
From digging around it seems a lot of people have had success on linux using regular fastboot, haven't read as many on windows... Not sure if that is coincidence, just the difference between windows users downloading the tools they are told to and linux users checking their repository, or an actual difference between the windows and linux versions.

The difference is allegedly that the mfastboot tool has been modified to work with larger partitions, so it could be possible that it is a case of us passing along old information, that fastboot historically could not handle the larger partition sizes used by motorola, but that as android has grown it has been given this capability... I don't really know, and I am not here to say... Ill probably just use mfastboot because why not.... I just wanted to make sure that if we are posting software we have a link back to the original source, much as is done with rom threads, so that if people want/need they can click through and find the most recent version rather then just finding this thread 2 years from now and only having a static link to a mirror of an outdated version.
 
  • Like
Reactions: Lynse and smitharro

chili81

Member
Nov 13, 2010
38
3
My quick reply is twofold...
1) To thank OP for posting the linux version.
2) To tell Motorola to rot in hell. Why such a hassle... I went to download the stock image and it redirected me to some f'ing g-drive site that I had to request access (and nothing happened). Are you kidding me? After I already had to wait 2 days for them to send me an unlock code for my dev edition which they botched a release on (so their site said it was ineligible).

Thanks again OP - you unblocked me. Please excuse the rant... I just want root - not to waste hours of my life.
 
  • Like
Reactions: danieliop and Lynse

dork0900

New member
Nov 25, 2009
2
0
got sig errors and saw an error about allocating a certain number of bytes
I ran Android SDK Manager as an Administrator
went to Tool (Preview Channel)
put a checkmark by Android SDK Platform-tools**
put a checkmark by Android SDK Build-tools*
Installed them (double check to make sure they show as "Installed")
Closed out of Android SDK Manager
*version 23 rc2 and **23 rc3
ran flash-all.bat
saw errors about sig files, but this time it flashed successfully (no allocation error)
 

mattia.b89

Senior Member
Sep 22, 2010
425
35
35
I only used the regular fastboot of the repositories of Ubuntu/Mint. Both on my Moto G 2014 and on my Moto G4 Plus. Both have a smooth CyanogenMod running now!

Send with my Moto G4 Plus (XT1642) with CM13 using Tapatalk!

thank you very much for your feedback!
actually I encounter problems with my surnia (moto E 2015), and I'm trying to understand where is the problem since not even the original ROM solved the issue....!!!!

I flashed it using fastboot from official repo (I'm an Arch Linux user) and no errors were returned but I have to be sure... so I asked for it
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    I'm a Linux Mint user, and I needed to flash back my Moto G 2014 with Motorola's Fastboot. As I haven't seen any topic regarding it here on this forum, I'm doing my job and posting it.

    Download:

    For Linux
    For Mac OS X


    Usage: Drop the file to somewhere - it's a good idea to drop on the same folder as the files you're going to flash.
    Launch the terminal from where you downloaded it.
    If you need, cd to the correct path.

    First, turn it executable.
    Code:
    chmod +x linux-fastboot
    (keep it named as this so it doesn't conflict with the default fastboot)

    And that's it.
    The commands now are issued as they always have been. In my computer, however, it acted weirdly if I didn't use it with sudo. So I did.
    Example:

    Code:
    sudo ./linux-fastboot devices
    sudo ./linux-fastboot flash boot boot.img
    sudo ./linux-fastboot flash recovery recovery.img

    And that's it.
    3
    I'm not entirely sure but I think the M stands fore 'motorola'. So mfastboot = motorola fastboot.

    Yes, that is true...

    However is the mfastboot tool published by Motorola? Google searching has only lead to forum postings such as this, where someone shares the version they have for others to download...

    However is there an official motorola development site where they offer these utilities, either as binaries or as source?

    Is there a single official location where developers can check for news and or updates on mfastboot, that offers source or binaries for the latest stable&test builds and possibly older versions?

    Basically just trying to find where the program is actually officially released, rather then just passed along versions (or if that is even the case).... Most linux utilities will have an official kind of "homebase" .. For instance in the samsung world a lot of flashing is done with odin, who's linux counterpart is heimdall http://glassechidna.com.au/heimdall/

    Edit: FOUND IT! ok maybe its well know, but for those like me who didn't... mfastboot is offered by motorola and bundled with the recovery images they offer here: https://motorola-global-portal.custhelp.com/app/standalone/bootloader/recovery-images
    Looks like you have to have an account, and request the image, and fastboot will be bundled with it
    After downloading the image for your device:

    Unzip the image.
    Put your device in fastboot mode.
    NOTE: You must use the Motorola fastboot utility to flash (included in the Darwin/, Linux/ or Windows/ directory). Please do NOT use the Android fastboot utility
    So that is the official source for the latest version, but I doubt they update too often... and I am sure its OK to use the mfastboot offered here. (I was just interested to know/note the official source, I think its at least semi important)
    2
    Well, maybe that's what they say. But i used the standard Ubuntu fastboot to restore and relock my device succesfully. All went fine. First I tried mfastboot in Windows 7. That didn't work for me however...
    From digging around it seems a lot of people have had success on linux using regular fastboot, haven't read as many on windows... Not sure if that is coincidence, just the difference between windows users downloading the tools they are told to and linux users checking their repository, or an actual difference between the windows and linux versions.

    The difference is allegedly that the mfastboot tool has been modified to work with larger partitions, so it could be possible that it is a case of us passing along old information, that fastboot historically could not handle the larger partition sizes used by motorola, but that as android has grown it has been given this capability... I don't really know, and I am not here to say... Ill probably just use mfastboot because why not.... I just wanted to make sure that if we are posting software we have a link back to the original source, much as is done with rom threads, so that if people want/need they can click through and find the most recent version rather then just finding this thread 2 years from now and only having a static link to a mirror of an outdated version.
    2
    My quick reply is twofold...
    1) To thank OP for posting the linux version.
    2) To tell Motorola to rot in hell. Why such a hassle... I went to download the stock image and it redirected me to some f'ing g-drive site that I had to request access (and nothing happened). Are you kidding me? After I already had to wait 2 days for them to send me an unlock code for my dev edition which they botched a release on (so their site said it was ineligible).

    Thanks again OP - you unblocked me. Please excuse the rant... I just want root - not to waste hours of my life.
    1
    Why not the fast boot you can get from Linux? That's what I use anyway

    sudo apt-get install android-tools-adb android-tools-fastboot

    Because this command only works on Ubuntu based distro's. Not in Ach, Fedora or another distro.