[GUIDE] Moto G - Restore stock firmware

Search This thread

benjaminv

Member
Mar 16, 2011
33
0
Pre-requisites:



3b) If you downloaded and extracted a firmware in .xml.zip format.

Flash each of the partitions in sequence using mfastboot, you need to enter the following commands one-by-one checking that each one returns an [OKAY]
Code:
mfastboot flash partition gpt.bin
mfastboot flash motoboot motoboot.img
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash system system.img_sparsechunk1
mfastboot flash system system.img_sparsechunk2
mfastboot flash system system.img_sparsechunk3
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1 
mfastboot erase modemst2 
mfastboot flash fsg fsg.mbn
mfastboot erase cache 
mfastboot erase userdata 
mfastboot reboot
Downgrading:
The 1st command "mfastboot flash partition gpt.bin" will fail on 4.4.2 to 4.3 downgrade. Skip this command if you are downgrading and continue with the other commands, which should work.​

4) Wait, you should now be rebooted into a fully stock Moto G firmware.
THanks very much however in my case, i have used XT1032_RETAIL-GB_4.4.4_KXB21.14-L1.40_36_cid7_CFC_1FF.xml.zip for a standard UK retailer (P4U) and some of the lines have to change to:
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2

And after restoring to stock rom, when i checked software update, it says i am up to date. Now i believe i will need to flash the OTA then.
 

lept_2014

Senior Member
Nov 25, 2014
188
135
i9100
HTC Pico (Explorer)
THanks very much however in my case, i have used XT1032_RETAIL-GB_4.4.4_KXB21.14-L1.40_36_cid7_CFC_1FF.xml.zip for a standard UK retailer (P4U) and some of the lines have to change to:
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
....

It is for this things that you must check first the XML-files inside ZIP-ROM. You can check this Post in a Blog for more information. :good:
 

IcyBee

Member
Mar 17, 2015
9
1
None of this is working for me

Help!

I have somehow totally trashed my Android install.
While downloading the OTA lollipop update, the download appeared to stall. I decided to give up on the update, so I switched the phone off. When I turned it back on again, every single process crashes. "Unfortunately dialler/android.process.acore/Calendar/android.process.media/etc has stopped". I can keep tapping "OK" for ever to clear these notifications, but can't actually use the phone for anything at all.

So I decided to do a factory reset from fastboot. It made no difference.
I tried a factory reset from recovery. It made no difference.
Using fastboot, I installed the stock ROM according to this guide. Everything seemed to flash OK - got OKAY on the PC and no errors on the phone, but when it restarted, the phone was exactly the same - my wallpaper photo was still there, and the app icons that I could glimpse behind the endless notifications were my apps.
I tried several more times, this time flashing the 4.4.4 ROM (RETAIL-GB_4.4.4_KXB21.14-L1.40_36_cid7_CFC_1FF). Exactly the same results - nothing changes when I restart.

It's as if the mfastboot flash commands do nothing at all! I have run all the mfastboot commands described by this guide in the order given.

I've also tried booting to recovery and connecting to ADB, but the PC cannot see the device.
I've tried replacing the recovery with CWM and TWRP .img files, but the flash command, while seeming to work, doesn't change anything at all!

Does anybody have any idea what I am doing wrong?

(thanks for reading).
 
  • Like
Reactions: philcologne

hottu_doggu

Senior Member
Jul 16, 2014
60
24
I have an XT1032. The latest OTA I had was 4.4.4 enGB which I backed up in TWRP. After using stock brazil optimized 5.0.2 rom for a while I decided to restore the back-up, flash stock recovery and install the 5.0.2 OTA. It worked partially. However, the bootanimation and baseband were missing, the screen was flickering at boot which is fixed by turning the screen off and on again, and most importantly the bootloader version is still 41.13. I flashed cm12 and baseband and the phone works just fine but do you think it is safe to restore to stock 4.4.4 and try to install the OTA again?
 

philcologne

New member
Mar 21, 2015
1
0
Neuötting
at step 3b) (flashing the partitions) the command prompt always says <waiting for device> although I activated USB debugging and downloaded the Motorola drivers.
 

rohmable

Member
Apr 19, 2014
6
1
Posting my "experience"

I reflashed the stock DE rom for my moto g, I first made the guide with windows, but when I did the command
Code:
mfastboot erase userdata
I had an error and it was impossible to flash anything until i switched to linux and rebooted the phone at the bootloader, then I re-made every passage and it all went smooth
 

lept_2014

Senior Member
Nov 25, 2014
188
135
i9100
HTC Pico (Explorer)
at step 3b) (flashing the partitions) the command prompt always says <waiting for device> although I activated USB debugging and downloaded the Motorola drivers.

When you are in Modo Bootloader/Fastboot, need different drivers. You need Google drivers from Android SDK Tools.

When you use 'adb.exe', you need Motorola drivers.
When you use 'mfastboot.exe' (or 'fastboot.exe'), you need Google drivers.
 
  • Like
Reactions: philcologne

MalachiMegara

New member
Mar 25, 2015
1
1
Trouble shooting

3b) If you downloaded and extracted a firmware in .xml.zip format.

Flash each of the partitions in sequence using mfastboot, you need to enter the following commands one-by-one checking that each one returns an [OKAY]
Code:
mfastboot flash partition gpt.bin
mfastboot flash motoboot motoboot.img
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash system system.img_sparsechunk1
mfastboot flash system system.img_sparsechunk2
mfastboot flash system system.img_sparsechunk3
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1 
mfastboot erase modemst2 
mfastboot flash fsg fsg.mbn
mfastboot erase cache 
mfastboot erase userdata 
mfastboot reboot
Downgrading:
The 1st command "mfastboot flash partition gpt.bin" will fail on 4.4.2 to 4.3 downgrade. Skip this command if you are downgrading and continue with the other commands, which should work.​

I've just tried it and have always gotten a "failure report" when entering the lines:

"mfastboot flash system system.img_sparsechunk1
mfastboot flash system system.img_sparsechunk2
mfastboot flash system system.img_sparsechunk3"

For all those having the same issue: CHECK THE FILE NAMES OF YOUR STOCK VERSION. In mine there was an additional "." right before the number of the sparsechunk. Also my sparsechunks were called 0,1 and 2. So I altered my commands to:

mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2

Sometimes it's the tiniest of things that cause the whole operation to fail!
 
  • Like
Reactions: CheyTac-12

eitanh1982

New member
Jul 29, 2014
4
0
firmware

hi i bought my moto g (1st gen NOT DUAL-SIM NO LTE) at spain.
can anybody tell what is the firmware please?
 
Last edited:

hannyso

Senior Member
Mar 14, 2012
65
14
If u want ,you can use my video in your thread!!

Pre-requisites:

a) Download and install Motorola Drivers:
http://xdaforums.com/showthread.php?t=2550635

b) Download and extract the stock firmware of your choosing from:
Looks like this link is now broken :'-( http://sbf.droid-developers.org/phone.php?device=14
The firmwares with '_umtsds' in the file name are for the 'dual-sim' versions of the Moto G, it's probably not a good idea to flash these onto single sim phones, or vice-versa.

Edit: More firmwares for international retail and carrier devices can be found here:
http://www.filefactory.com/folder/c6cdedc45a775d27

Edit: The firmware files have been updated most of the firmware archives are now in .tar.gz archives which include Motorola fastboot and flashing scripts for OSX, Linux and Windows.

On windows the .tar.gz archives need to be opened and extracted using a 3rd party archive manager. e.g. 7-zip, or PeaZip, Windows cannot extract these files natively, Linux and OSX can.

I used the retail British firmware (fastboot_falcon_retgb_user_4.3_14.10.0Q3.X-76-LGG-8_54_release-keys-cid7-Retail_GB.tar.gz), extracted to c:\

c) If the firmware file you downloaded is a .xml.zip file then download Motorola Fastboot View attachment 2427667 (attached to this post) and extract the .exe into the same folder as the stock firmware files (the same folder as the .bin and .img files). If your firmware is a .tar.gz file then skip this step.

d) Get ADB (if you don't already have this, I suggest downloading and installing Minimal ADB and Fastboot by shimp208:
https://drive.google.com/file/d/0B1S0LCuXCnnmOWhnUk1ZWVdQakE

Disclaimer:

Follow these instructions at your own risk. If something goes wrong don't blame me!

I have only tested this on a UK Retail Moto G with an unlocked bootloader, however as these are the original stock signed image files from Motorola it should work on all devices.

See notes at the bottom of this post for downgrading from 4.4.2 to 4.3.

Edit: tkm89 reports that he was able to use this guide to restore Stock Retail British firmware on a bootloader locked Tesco-mobile Moto G


Steps to restore stock firmware:

1) Reboot the phone into bootloader mode. There are 2 ways to do this.
I) The 'hardware' way.
a) Unplug the USB cable and power off the phone.
b) Press and hold 'Volume down' then power on the phone.
c) Connect USB cable to your computer.​

II) The 'software' way.
a) Enable developer mode on the Moto G (Settings-> 'About Phone'. Tap 7 times on 'Build Number')
b) Enable USB debugging. (Settings -> 'Developer options' -> 'USB Debugging' -> check)
c) Connect phone to computer via USB, you should see a new ADB device detected and drivers installed.
d) Open "Minimal ADB and Fastboot". Type:
Code:
adb reboot-bootloader

You should see the Moto G bootloader screen with the following options:
Code:
Normal Powerup
Recovery
Factory
Switch Console [NULL: null]
Barcodes
BP Tools
2) Open a command prompt / terminal (Start -> cmd.exe in Win7) and browse to the folder with the extracted firmware.

In my case:
Code:
cd c:\falcon_retgb_user_4.3_14.10.0Q3.X-76-LGG-8_54_release-keys-cid7-Retail_GB

3a) If you downloaded and extracted a firmware in .tar.gz format

In windows, run the 'flashall.bat' script Type:
Code:
flashall.bat /eu
The "/eu" switch forces userdata to be erased from the device, this is the same as a factory reset or wipe this is recommended when restoring stock firmware.
In Linux/OSX run the flashall.sh script. Type:
Code:
chmod +x flashall.sh
./flashall.sh

Downgrading:
The scripts will fail with an error on downgrading from 4.4.2 to 4.3. Open the script in a text editor (notepad) and delete (or comment) the following:
Lines 89-90 in the flashall.bat file:
Code:
CALL :fastboot_flash partition gpt.bin
IF %errorlevel% NEQ 0 EXIT /b 1
Lines 120-121 in the flashall.sh file:
Code:
run $fastboot -s "$serial_number" flash partition gpt.bin
if [ $? -ne 0 ]; then echo "ERROR: fastboot failed."; exit -1; fi

3b) If you downloaded and extracted a firmware in .xml.zip format.

Flash each of the partitions in sequence using mfastboot, you need to enter the following commands one-by-one checking that each one returns an [OKAY]
Code:
mfastboot flash partition gpt.bin
mfastboot flash motoboot motoboot.img
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash system system.img_sparsechunk1
mfastboot flash system system.img_sparsechunk2
mfastboot flash system system.img_sparsechunk3
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1 
mfastboot erase modemst2 
mfastboot flash fsg fsg.mbn
mfastboot erase cache 
mfastboot erase userdata 
mfastboot reboot
Downgrading:
The 1st command "mfastboot flash partition gpt.bin" will fail on 4.4.2 to 4.3 downgrade. Skip this command if you are downgrading and continue with the other commands, which should work.​

4) Wait, you should now be rebooted into a fully stock Moto G firmware.

If u want you can use my video in your thread!! Its for getting stock Kitkat from lollipop.
Here is the link -
 
  • Like
Reactions: ezro

lept_2014

Senior Member
Nov 25, 2014
188
135
i9100
HTC Pico (Explorer)
Will these instructions work for downgrading from the Lollipop 5.0.2 OTA to 4.4.4?

With some conditions:
* You must have your bootloader unlock
* The two first commands will fail, so if you want, don't flash them.

The final commands sequence would be:
Code:
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1 
mfastboot erase modemst2 
mfastboot flash fsg fsg.mbn
mfastboot erase cache 
mfastboot erase userdata
And finally, if you want:
Code:
mfastboot reboot
 
  • Like
Reactions: rsdevil9

butthurtlocker

Senior Member
Oct 29, 2013
637
63
Victoria
really need help!

Hey guys im really struggling and could use some help. Have a telus xt1032 and no matter what i do am stuck at warning boot loader unlocked screen. Can anyone offer any help?? please and thank you
 

Top Liked Posts

  • There are no posts matching your filters.
  • 356
    Pre-requisites:

    a) Download and install Motorola Drivers:
    http://xdaforums.com/showthread.php?t=2550635

    b) Download and extract the stock firmware of your choosing from:
    Looks like this link is now broken :'-( http://sbf.droid-developers.org/phone.php?device=14
    The firmwares with '_umtsds' in the file name are for the 'dual-sim' versions of the Moto G, it's probably not a good idea to flash these onto single sim phones, or vice-versa.

    Edit: More firmwares for international retail and carrier devices can be found here:
    http://www.filefactory.com/folder/c6cdedc45a775d27

    Edit: The firmware files have been updated most of the firmware archives are now in .tar.gz archives which include Motorola fastboot and flashing scripts for OSX, Linux and Windows.

    On windows the .tar.gz archives need to be opened and extracted using a 3rd party archive manager. e.g. 7-zip, or PeaZip, Windows cannot extract these files natively, Linux and OSX can.

    I used the retail British firmware (fastboot_falcon_retgb_user_4.3_14.10.0Q3.X-76-LGG-8_54_release-keys-cid7-Retail_GB.tar.gz), extracted to c:\

    c) If the firmware file you downloaded is a .xml.zip file then download Motorola Fastboot View attachment mfastboot-v2.zip (attached to this post) and extract the .exe into the same folder as the stock firmware files (the same folder as the .bin and .img files). If your firmware is a .tar.gz file then skip this step.

    d) Get ADB (if you don't already have this, I suggest downloading and installing Minimal ADB and Fastboot by shimp208:
    https://drive.google.com/file/d/0B1S0LCuXCnnmOWhnUk1ZWVdQakE

    Disclaimer:

    Follow these instructions at your own risk. If something goes wrong don't blame me!

    I have only tested this on a UK Retail Moto G with an unlocked bootloader, however as these are the original stock signed image files from Motorola it should work on all devices.

    See notes at the bottom of this post for downgrading from 4.4.2 to 4.3.

    Edit: tkm89 reports that he was able to use this guide to restore Stock Retail British firmware on a bootloader locked Tesco-mobile Moto G


    Steps to restore stock firmware:

    1) Reboot the phone into bootloader mode. There are 2 ways to do this.
    I) The 'hardware' way.
    a) Unplug the USB cable and power off the phone.
    b) Press and hold 'Volume down' then power on the phone.
    c) Connect USB cable to your computer.​

    II) The 'software' way.
    a) Enable developer mode on the Moto G (Settings-> 'About Phone'. Tap 7 times on 'Build Number')
    b) Enable USB debugging. (Settings -> 'Developer options' -> 'USB Debugging' -> check)
    c) Connect phone to computer via USB, you should see a new ADB device detected and drivers installed.
    d) Open "Minimal ADB and Fastboot". Type:
    Code:
    adb reboot-bootloader

    You should see the Moto G bootloader screen with the following options:
    Code:
    Normal Powerup
    Recovery
    Factory
    Switch Console [NULL: null]
    Barcodes
    BP Tools
    2) Open a command prompt / terminal (Start -> cmd.exe in Win7) and browse to the folder with the extracted firmware.

    In my case:
    Code:
    cd c:\falcon_retgb_user_4.3_14.10.0Q3.X-76-LGG-8_54_release-keys-cid7-Retail_GB

    3a) If you downloaded and extracted a firmware in .tar.gz format

    In windows, run the 'flashall.bat' script Type:
    Code:
    flashall.bat /eu
    The "/eu" switch forces userdata to be erased from the device, this is the same as a factory reset or wipe this is recommended when restoring stock firmware.
    In Linux/OSX run the flashall.sh script. Type:
    Code:
    chmod +x flashall.sh
    ./flashall.sh

    Downgrading:
    The scripts will fail with an error on downgrading from 4.4.2 to 4.3. Open the script in a text editor (notepad) and delete (or comment) the following:
    Lines 89-90 in the flashall.bat file:
    Code:
    CALL :fastboot_flash partition gpt.bin
    IF %errorlevel% NEQ 0 EXIT /b 1
    Lines 120-121 in the flashall.sh file:
    Code:
    run $fastboot -s "$serial_number" flash partition gpt.bin
    if [ $? -ne 0 ]; then echo "ERROR: fastboot failed."; exit -1; fi

    3b) If you downloaded and extracted a firmware in .xml.zip format.

    Flash each of the partitions in sequence using mfastboot, you need to enter the following commands one-by-one checking that each one returns an [OKAY]
    Code:
    mfastboot flash partition gpt.bin
    mfastboot flash motoboot motoboot.img
    mfastboot flash logo logo.bin
    mfastboot flash boot boot.img
    mfastboot flash recovery recovery.img
    mfastboot flash system system.img_sparsechunk1
    mfastboot flash system system.img_sparsechunk2
    mfastboot flash system system.img_sparsechunk3
    mfastboot flash modem NON-HLOS.bin
    mfastboot erase modemst1 
    mfastboot erase modemst2 
    mfastboot flash fsg fsg.mbn
    mfastboot erase cache 
    mfastboot erase userdata 
    mfastboot reboot
    Downgrading:
    The 1st command "mfastboot flash partition gpt.bin" will fail on 4.4.2 to 4.3 downgrade. Skip this command if you are downgrading and continue with the other commands, which should work.​

    4) Wait, you should now be rebooted into a fully stock Moto G firmware.
    8
    Firmware Lolipop

    Mirror
    XT1032 BR 5.0.2
    Google Drive : DOWNLOAD

    XT1033 BR 5.0.2

    Google Drive : DOWNLOAD

    XT1033 Asia 5.0.2

    Google Drive : DOWNLOAD

    MFastboot
    Google Drive : DOWNLOAD

    :fingers-crossed:
    5
    Now I have this message
    C:\Motorola\falcon_retbr_ds_user_4.3_14.10.0Q3.X-76-LCG-8_60_release-keys-cid12-
    Brasil_BR>mfastboot flash system system.img
    sending 'system' (524288 KB)...
    OKAY [ 18.111s]
    writing 'system'...
    Multi-Flash is not supported any more!
    Please download latest fastboot from: xxxxxx

    the link don´t work
    Can you try mfastboot.exe from the attached zip. This is taken from the south american firmware release.
    5
    High speed mirrors for

    XT1032_RETAIL-EU_4.4.4_KX21.14-L1.40_36_cid7_CFC_1FF.xml.zip:
    http://tweaksparadise.com/download/rawdealer/index.php?action=list&folder=65490


    XT1032_RETAIL-DE_4.4.4_KXB21.14-L1.40_36_cid7_CFC_1FF.xml.zip:
    http://tweaksparadise.com/download/rawdealer/index.php?action=list&folder=65444

    I hope it will be useful for someone. :)
    5
    Im on US 4.4.2 ROM @ UK XT1032. I tried to downgrade to Retail UK 4.3 ROM and Im using motorola fastboot. Im getting error "Preflash validation failed" when I enter the command "fastboot flash partition gpt.bin" inside of the UK 4.3 ROM folder.

    Open the flashall.bat in Notepad and remove the following two lines:

    Code:
    CALL :fastboot_flash partition gpt.bin
    IF %errorlevel% NEQ 0 EXIT /b 1

    The gpt.bin cannot be downgraded so the flashing fails and stops the rest of the script from running. Removing those lines will allow the script to flash everything else and you'll have a working phone. This also works for other 4.3 roms in tar.gz format like the German and French ROMs.