[GUIDE] Moto G - Restore stock firmware

t-bon3

Senior Member
May 16, 2010
262
511
0
Pre-requisites:

a) Download and install Motorola Drivers:
http://forum.xda-developers.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.
 
Last edited:

Allewar

Senior Member
May 3, 2013
261
121
0
Wich of these stock rooms are the Brazilian XT1033 for the 16gb dual chip???

fastboot_falcon_retbr_ds_user_4.3_14.10.0Q3.X-76-LCG-8_60_release-keys-cid12-Brasil_BR.tar.gz

fastboot_falcon_retbr_user_4.3_14.10.0Q3.X-76-LCG-8_41_release-keys-cid12-Brasil_BR.tar.gz
 

t-bon3

Senior Member
May 16, 2010
262
511
0
Is the bootloader warning Logo also removed?
If you just follow the guide above then no, your unlocked bootloader and warning will remain after flashing.

The procedure for relocking the bootloader is to issue the following command in fastboot before flashing:

Code:
mfastboot oem lock begin
then after flashing but before rebooting enter the following:

Code:
mfastboot oem lock
This should lock the bootloader BUT I have seen reports that even after re-locking there is still a warning screen saying that the bootloader has been previously unlocked!
 

t-bon3

Senior Member
May 16, 2010
262
511
0
Wich of these stock rooms are the Brazilian XT1033 for the 16gb dual chip???

fastboot_falcon_retbr_ds_user_4.3_14.10.0Q3.X-76-LCG-8_60_release-keys-cid12-Brasil_BR.tar.gz

fastboot_falcon_retbr_user_4.3_14.10.0Q3.X-76-LCG-8_41_release-keys-cid12-Brasil_BR.tar.gz
first one with ds 'dual-sim' in the name
 
  • Like
Reactions: captivatingtab

djmgermanos

Member
Aug 21, 2007
32
3
28
Castelldefels
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_sparsechunk.0
error: cannot load 'system.img_sparsechunk.0'

I had this message when I try, the previous commands worked right!

Daniel
moto g 16gb dual chip
 

t-bon3

Senior Member
May 16, 2010
262
511
0
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_sparsechunk.0
error: cannot load 'system.img_sparsechunk.0'

I had this message when I try, the previous commands worked right!

Daniel
moto g 16gb dual chip
The south american firmwares do not have multi-part /system images. In that case use this command instead:
Code:
mfastboot flash system system.img
 
  • Like
Reactions: DigitalSnow

geminihc

Senior Member
Jun 5, 2008
283
22
38
some of the lines show errors for me:

Sparsechunk2: Failed to validate sparse image
Sparsechunk0: Invalid signed image

other wise, it seems to work fine

thanks,
 

t-bon3

Senior Member
May 16, 2010
262
511
0
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.
 

Attachments

djmgermanos

Member
Aug 21, 2007
32
3
28
Castelldefels
Now it works

Thanks

Daniel
Moto G 16gb dual chip Brazil
XT1033

---------- Post added at 12:25 PM ---------- Previous post was at 12:13 PM ----------

Wich of these stock rooms are the Brazilian XT1033 for the 16gb dual chip???

fastboot_falcon_retbr_ds_user_4.3_14.10.0Q3.X-76-LCG-8_60_release-keys-cid12-Brasil_BR.tar.gz

fastboot_falcon_retbr_user_4.3_14.10.0Q3.X-76-LCG-8_41_release-keys-cid12-Brasil_BR.tar.gz


Esta
fastboot_falcon_retbr_ds_user_4.3_14.10.0Q3.X-76-LCG-8_60_release-keys-cid12-Brasil_BR.tar.gz