[GUIDE] Moto G - Restore stock firmware

Search This thread

yuwenjiesail

New member
Dec 23, 2013
1
0
Thanks for kindness help.
I need to reboot to a UK retail_GB version. I followed the instruction and stopped at the following step:
Executing ".\windows\fastboot.exe flash boot boot.img'
target max-sparse-size: 256MB
sending 'boot' <10240 KB>...
OKEY [0.404s]
writing 'boot'...
<bootloader> Preflash validation failed
Failed <remote failure>
finished. total time: 0.977s
.\windows\fastboot.exe flash boot boot.img failed

Could you help me how I can do now? Thanks in advance
Pre-requisites:

a) Download and install Motorola Drivers:
http://www.mymotocast.com/download/MDM?platform=windows

b) Download and extract the stock firmware of your choosing (Warning: downgrading is untested!) from:
http://sbf.droid-developers.org/phone.php?device=14

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.

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.

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://docs.google.com/file/d/0B1S0LCuXCnnmSWh6NGJmSE1BUWc

Disclaimer:

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

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

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


Steps to restore stock firmware:

1) Enable developer mode on the Moto G (Settings-> 'About Phone'. Tap 7 times on 'Build Number')
2) Enable USB debugging. (Settings -> 'Developer options' -> 'USB Debugging' -> check)
3) Connect phone to computer via USB, you should see a new ADB device detected and drivers installed.
4) Reboot to bootloader. 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
5) 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

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

Run the 'flashall.bat' script in windows or './flashall.sh' in Linux/OSX​

6b) 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

7) You should now be rebooted into a fully stock Moto G firmware.
 

lavao92

Member
Dec 20, 2013
7
0
But the system ui recognizes everything. I can't make downloads. The default gallery, well you saw the screenshot and the camera does not work too

Sent from my XT1032 using xda app-developers app

Try to do a factory reset.. if it doesn't solve this issue, try to flash the firmware again.
The .bat looks like it wouldn't clear the user data (and cache) by default, so maybe thats why you have these issues..
@yuwenjiesail: Try to download the firmware again. Maybe the files you've downloaded became corrupted while downloading..?
 
Last edited:

itsmesam

New member
Mar 16, 2011
3
0
are you trying to get a telus/koodo/ canadian phone working? i am too. I tried french retail because that sounds globalish and i could still read it if it wanted to speak french. I did get it loaded, but on the phone's terminal screen it threw up a lot of errors about "invalid piv signed system" when flashing the new ROM. I can open the phone, but lots of functions dont work (like settings from the top drag down menu.) i have not tried it with a sim in yet...

I am going to go back to telus ROM and then try US, i will let you know what happens. If anyone knows the correct facotry ROM for canada/telus (they say this is the "international" version i think) please let us know.

Also, i am a newb retard so maybe dont listen to me. ALSO (to people who do know what they are doing): will i succeed in getting around the SIM lock by flashing a factory firmware, or will i just end up with a factory phone that is still locked to telus?

---------- Post added at 07:25 PM ---------- Previous post was at 06:42 PM ----------



i am in a similar situation with a telus phone. i got the invalid PIV signed system errors, and eventually a half working phone.

I am now trying to reload telus ROM, but i get errors on: mfastboot flash system system.img_sparsechunk.0 , where the command line says <bootloader> permission denied. however, i still get the bootloader unlocked screen when i restart the phone, so i dont know why it says permission denied. any ideas? how did you get telus ROM back on the phone?

I gave up trying to install the US retail version. My wife broke her Nexus 4 so I reflashed the Telus images and gave her the phone.

PS you need to unlock the SIM by paying someone on ebay or such
 

eddvys

Senior Member
Nov 27, 2013
322
91
Grantham
Prob

Hello guys, having this problem forever now. Have tried DE and UK retail version. Plus can't upload anything to my phone says the phone was disconnected or stop working. Obviously I went somewhere wrong and now struggling put back things together need help :!
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    270.5 KB · Views: 817

toby913

Senior Member
Try to do a factory reset.. if it doesn't solve this issue, try to flash the firmware again.
The .bat looks like it wouldn't clear the user data (and cache) by default, so maybe thats why you have these issues..
@yuwenjiesail: Try to download the firmware again. Maybe the files you've downloaded became corrupted while downloading..?

Already did that both of them twice. I just flashed KitKat back for now

Sent from my XT1034 using xda app-developers app
 

lavao92

Member
Dec 20, 2013
7
0
Hello guys, having this problem forever now. Have tried DE and UK retail version. Plus can't upload anything to my phone says the phone was disconnected or stop working. Obviously I went somewhere wrong and now struggling put back things together need help :!

Well, this looks strange.. but I don't think it's your phone. it's look like the bat-file ('find') doesn't work. Try to flash manually by hand:
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
@toby913: Alright, but where did you get the KitKat-image?
 
Last edited:

toby913

Senior Member
Well, this looks strange.. but I don't think it's your phone. it's look like the bat-file ('find') doesn't work. Try to flash manually by hand:
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
@toby913: Alright, but where did you get the KitKat-image?

Its the ZIP file from josalito. Something else. After using the flashall.bat the phone is not wiped

Sent from my XT1034 using xda app-developers app
 
Last edited:

eddvys

Senior Member
Nov 27, 2013
322
91
Grantham
Well, this looks strange.. but I don't think it's your phone. it's look like the bat-file ('find') doesn't work. Try to flash manually by hand:
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
@toby913: Alright, but where did you get the KitKat-image?

The problem was I couldn't use gallery and camera that's why I wanted to come back to original firmware. (No external storage available.) Nothing worked. So I did complete factory reset using TWRP then flashed back CMW and using sideload installed http://xdaforums.com/showthread.php?t=2581548 it fixed from third time. Now what's about downgrading it to stock firmware? Will it work? Afraid to do anything from this point.
 

toby913

Senior Member
The problem was I couldn't use gallery and camera that's why I wanted to come back to original firmware. (No external storage available.) Nothing worked. So I did complete factory reset using TWRP then flashed back CMW and using sideload installed http://xdaforums.com/showthread.php?t=2581548 it fixed from third time. Now what's about downgrading it to stock firmware? Will it work? Afraid to do anything from this point.

That's exactly what I experienced. This is why I'm using kit kat now. But I want back do my original rom

Sent from my XT1034 using xda app-developers app
 

eddvys

Senior Member
Nov 27, 2013
322
91
Grantham
Well, this looks strange.. but I don't think it's your phone. it's look like the bat-file ('find') doesn't work. Try to flash manually by hand:
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
@toby913: Alright, but where did you get the KitKat-image?

Kit kat moto g not is good? We in Brazil waiting kk.

Enviado de meu XT1033 usando Tapatalk

I don't know about about Brazil OTA updates and what is your question really is but there is a thread - http://xdaforums.com/showthread.php?t=2581548&page= - This is a full KitKat version ported to all devices. It has some minor bugs, but they can be fixed.
 

makcode

Member
Dec 28, 2010
19
3
I have some issues when comming back to stock 4.3 from 4.4 KitKat (from this Thread: [REPACK][UNLOCKED BL] Android 4.4.2 For Moto G(All variants))

I can't get the Wifi working on my retail (amazon) Moto G anymore.

I can flash all the stock firmware of 4.3 (UK, DE, Global US) but no wifi.

Also if I flash the Global US (not the AWS) and do a sideload the new OTA for KitKat, also wifi won't work.

anyone maybe has some more info that could help me?

thanks
 

m.mcrespo

Senior Member
Nov 19, 2012
194
10
Thanks bro. Kit kat will launch officially here for moto g in January. But I think the guys in the USA received kit kat and not like this. Anyway thanks for the answer I will look.

Enviado de meu XT1033 usando Tapatalk
 

SickBeast

Senior Member
May 15, 2011
1,086
313
Hey can we not use rsd lite to flash the firmware? Also, I want to go from my Koodo 4.3 firmware straight to the US retail 4.4 rom. Can I do this with the bootloader locked?
 

m.mcrespo

Senior Member
Nov 19, 2012
194
10
No warranty for boot unlocked . but I have root so no warranty here.

Enviado de meu XT1033 usando Tapatalk
 

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.