Hello,
in this tutorial I will show you how to install stock ROM on Motorola Moto G. It may be useful for branded devices to remove all the bloatware. Also it's good if you mess to much in your ROM and want it to work as you would remove the device from the box.
DISCLAIMER: You flash the ROM on your own risk! Remember that after the process you will lose all the data, including apps, messages and saved progress. Before installation, you may consider doing backup using Titanium Backup (available on Google Play).
P.S. You don't have to unlock the bootloader in order to successfully flash the system.
1. Download following:
a) Official Motorola drivers and install them:
https://motorola-global-portal.custhelp.com/app/answers/prod_answer_detail/a_id/97326/p/30,6720,9050/action/auth
b) Stock ROM of your choice and then extract:
http://sbf.droid-developers.org/phone.php?device=14
Remember: "ds" stands for Dual Sim so better do not install Dual Sim system on Single Sim and vice-versa
c) Motorola fastboot and extract it in place where are all ROM files.
https://www.dropbox.com/s/qurxaln5zfya6j0/mfastboot.zip
https://www.dropbox.com/s/qurxaln5zfya6j0/mfastboot.zip
d) ADB (I recommend light version compiled by shimp208):
https://www.dropbox.com/s/stgp6hce6r4e0iz/minimal_adb_fastboot_v1.1.3_setup.exe
https://www.dropbox.com/s/stgp6hce6r4e0iz/minimal_adb_fastboot_v1.1.3_setup.exe
2. Stock ROM installation
1) Turn on the developer mode options
Go to Settings -> About phone -> and tap 7 times"Build number"
2) Enable USB Debugging
Settings -> Developer options-> and check USB Debugging
3) Plug in Moto G to the computer
4) Boot Moto G into bootloader
a) Turn off the phone
b) When holding vol- press power button
5a) If your rom is in tar.gz file, run "flashall.bat" from the archieve. The phone should reboot itself after the installation is done.
Be careful when you downgrade using tar.gz file! Using notepad, you need to delete lines 89-90 in flashall.bat and 120-121 from file flashall.sh (if you have MAC/Linux).
These lines are:
89-90 in flashall.bat:
120-120 in flashall.sh:
5a) If your rom is in tar.gz file, run "flashall.bat" from the archieve. The phone should reboot itself after the installation is done.
Be careful when you downgrade using tar.gz file! Using notepad, you need to delete lines 89-90 in flashall.bat and 120-121 from file flashall.sh (if you have MAC/Linux).
These lines are:
89-90 in flashall.bat:
CALL :fastboot_flash partition gpt.bin
IF %errorlevel% NEQ 0 EXIT /b 1
120-120 in flashall.sh:
run $fastboot -s "$serial_number" flash partition gpt.bin
if [ $? -ne 0 ]; then echo "ERROR: fastboot failed."; exit -1; fi
5b) If your rom is in xml.zip file, run installed ADB program and type:
adb reboot-bootloader
6) In Windows open the folder where you have all the ROM files and fastboot.exe. There hold shift and press right click in free space. Then choose "Open Command Window Here" or open Command Prompt by holding windows logo on keyboard + R. Type cmd and hit enter. Then navigate to ROM's folder.
7) Command Prompt enter following commands one by one. Be careful to not make any mistake!
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_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
mfastboot reboot
8) Your phone should now reboot to your freshly installed stock rom. Remember that first boot may take longer time than usual.
FAQ:
1. Does the installation of stock rom lock the previously unlocked bootloader?
No
2. Phone does not want to boot/stuck on bootanimation
Do wipe data/factory reset in stock recovery and/or flash the system once again
TAGS: Moto G, stock rom, flash, install, restore
Polish: Jak wgrać stock ROM do Motoroli Moto G
adb reboot-bootloader
6) In Windows open the folder where you have all the ROM files and fastboot.exe. There hold shift and press right click in free space. Then choose "Open Command Window Here" or open Command Prompt by holding windows logo on keyboard + R. Type cmd and hit enter. Then navigate to ROM's folder.
7) Command Prompt enter following commands one by one. Be careful to not make any mistake!
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_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
mfastboot reboot
FAQ:
1. Does the installation of stock rom lock the previously unlocked bootloader?
No
2. Phone does not want to boot/stuck on bootanimation
Do wipe data/factory reset in stock recovery and/or flash the system once again
TAGS: Moto G, stock rom, flash, install, restore
Polish: Jak wgrać stock ROM do Motoroli Moto G
what if i flash the single sim rom on my dual sim? Then I will Only Be Able To Use One Sim Right?
ReplyDeleteYes, I think it will work but only with one sim. P.S. Why won't you jsut install the "ds" - dual sim soft?
DeleteHi, i did downgrade from lollipop to kitkat, then again again i did kitkat to lollipop, but my phone is died. its not switching ON, boot loading its not working totaly, but when i connect the in computer its detecting the port connected with something else. so is there any tools to flash the OS Without enabling bootloADER MODE.
Deletehi i did steps above and it says failed to validate system image
ReplyDeletefastboot reason: fall-through from normal boot mode
Which soft you had and which you wanted to install? The error appears on PC?
Deleteits shown on the phone
Deletethanks for the tutorial, you revived my moto g :)))
ReplyDeleteI'm glad it helped :)
DeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
Deletehello there, I have alrdy put my stock rom, AsiaRetail.en.03.. but when phone restarts it keeps showing this warning message, regarded the WARNING BOOTLOADER UNLOCKED.. How do i remove this ?
ReplyDeleteThere is fix for that. I'll do the tutorial soon :) (hope that this evening)
DeleteThank u very much..
ReplyDeleteDone :)
Deletehttp://motorola-g.blogspot.com/2014/03/how-to-remove-unlocked-bootloader.html
how to boot into boot loader??
ReplyDelete4) Boot Moto G into bootloader
Deletea) Turn off the phone
b) When holding vol- press power button
5) Run installed ADB program and type:
adb reboot-bootloader
my xt1033 is stuck in fastboot mode with low battery problem.neither i can charge my phone nor i can flash files.what should i do?
Deletemy xt1033 is stuck in fastboot mode with low battery problem.neither i can charge my phone nor i can flash files.what should i do?
Deletemy xt1033 is stuck in fastboot mode with low battery problem.neither i can charge my phone nor i can flash files.what should i do?
DeleteC:\adb\adb-tools\Compressed\falcon_asia_ds_user_4.3_14.10.0Q3.X-84-7-LCG-4_4_rel
ReplyDeleteease-keys-cid7-AsiaRetail_03>mfastboot flash system system.img_sparsechunk.0
error: cannot load 'system.img_sparsechunk.0'
i got this error:(
What system you had, and which you are trying to install?
Deletei am having windows 8.1....i tried to install flash rom by executing the commands you have given above...but after 3 commands on executing the 4th command this error came...
DeleteWhat is the file extension of the downloaded system? Do you see a flsashall.bat file? What system you had before on the phone and which version are you trying to install?
Deletei have same problem........i have 4.4.4 and wanted to install 4.4.2.....plz help as i wanted to downgrade the kitkat coz the new 4.4.4 has decreased moto g s wifi range
Deletei am using indian version moto g xt1033 now i want to install stock rom so which rom should i download there are many countrys given here but there is no retail indian rom in the link that you gave
ReplyDeleteplease help
Sorry, I have no idea where you could find Indian roms. Try asking here: http://forum.xda-developers.com/moto-g/help
DeleteI had the exact same error and found that when i looked in the file downloaded the system image on line 4 should read mfastboot flash system system.img_sparsechunk1
Deletemfastboot flash system system.img_sparsechunk2
mfastboot flash system system.img_sparsechunk3 if your files are the same as mine where just double click the download and then double click it once more and see if your files are as i stated above instead of .0 .1 .2 at the end if they are just change it to what i did and it worked great thanks for the help
Man, you saved my phone...
ReplyDeleteRespect man..... You made my day....Thank you so much...:))
ReplyDeletethanks bro it worked for me Thumbs up
ReplyDeleteI need help, It does not work :/ when I write mfastboot flash partition gpt.bin it says -bash: mfastboot: command not found. What can I do?
ReplyDeleteI installed a ROM on my XT 1032 (DE) and it dows not work but I dont have a nandroid backup. And I am on Mac. Can someone please help me?!
I have a problem with my moto g...
ReplyDeletemy moblile is unable to bootup
i was trying to reinstall stock ROM, i got a error (had check failed for boot) and (had check failed for recovery)
how can i fix this problem...
plz i need ur help..
will this work on xt1033
ReplyDeleteYes, but you need to instal ds- dualsim software. Otherwise you won't be anle to use Sim2.
ReplyDeleteHello thank you for this tutorial, but i am looking for rom for t-mobile carrier and i can't find it. I bought my moto g in another country, now i am home and i can't use my sim.
ReplyDeleteT-mobile for which country? And where did you buy your phone? Is it GSM model ?
DeleteThis comment has been removed by the author.
DeleteI bought my phone in Italy. Now i am in Macedonia. how can i see if is GSM model ?
DeleteWell, it has the sim slot :P you are looking for tmobile system for Macedonia? It may not exist. Anyway, the system is universal and branding doesn't change anything in basebands. You said you can't use your sim- why exactly? You can talk to me on hangouts or here ;)
DeleteWhen i put my sim, says put the network code. Someone told me, reflash the phone and it will work with your sim.
DeleteT-mobile for which country? And where did you buy your phone? Is it GSM model ?
ReplyDelete@Pierre I just wanted to say thank you for this post. you really helped me restore my phone, because I had the rom before i read your post and it did not work. The bit a bout removing line 89 and 90 is what did the trick. small notice though after step 5a) that should be it for tar.gz roms. thanks again
ReplyDeleteAwesome, I got stuck in CM 11 bootloop and couldn't remember the order to flash stock img in bootloader. Thanks!
ReplyDelete@ Pierre M. Please help! I follow your instructions to downgrade my phone to 4.3 but after I finished all the commands, the phone didn't reboot well, it keeps trying to reboot with message "warning, bootloader unlocked" (I rooted the phone before when I upgraded it from 4.4.2 to 4.4.4). Could you please give me some advices.
ReplyDeleteI have Moto G XT1032. I went through every possible thing which I have came across for restoring my phone. I can enter to AP Fastboot Flash Mode screen. Then using hardware fastboot commands will also go fine. But, after that when I enter recovery nothing happens it falls into bootloop. The recovery menu like Install from SD, wipe cache etc should show up but my mobile is not going to that menu intstead goes into rebooting loop. Please suggest some solution.
ReplyDeletei have a moto g XT1031 that i got brand new well long story sorta short i wanted to wifi teather with it for my computer and boost wanted me to pay for it (Ya right) so i rooted my phone and did the Falcon Teather Fix and Falcon Custom Recovery Everything was going good had no problems with the phone until last month when the new update came out i woke up in the middle of the night and was not paying attention and click my phone and ended up installing the new update only to find that when i woke up my phone would boot up to the point where it said Starting Services Then after about 45 secs it freezes and repeats the process i have done everything i can think of with it now i have about 15 of work on it since i broke it i have adb drivers and lots of other tools and programs i cannot get this thing to come alive and boot up how it needs to Any Help would be Appreciated So much
ReplyDeletePossibly someone point me in the right direction http://sbf.droid-developers.org/phone.php?device=14 and with this i don't know which one to choose
DeleteIf you have any problem with motorola then simply go and contact Motorola Repair UK
ReplyDeleteThank you very much for sharing this type of information with us..because this is very useful for me..If you are looking for More Best Brand Repair for your Motorola Gadgets then it's better to simply go for Motorola Repair Centre Leeds
ReplyDeletethank you so much , you made my day.
ReplyDeleteWe are the fastest growing organization in the present market and providing the technical support for the customers’ computers across the globe.
ReplyDeleteQuickbooks/ Family Tree application/Quickens/Turbo Tax not launching
Unable to boot the computer in normal mode
I have moto g3 with marshmallow 6.0.1, automatically all photos from camera folder are deleted, now I want to get back them.I searched about this,there is only one option, root my phone and then use recovery s/w but I want my phone as newer as it was in box(like in locked bootloader state by company). So provide me the way to root-->photos recovery --> unroot and newer like box.
ReplyDeletePlease provide me compete guide with software link.
I have moto g3 with marshmallow 6.0.1, automatically all photos from camera folder are deleted, now I want to get back them.I searched about this,there is only one option, root my phone and then use recovery s/w but I want my phone as newer as it was in box(like in locked bootloader state by company). So provide me the way to root-->photos recovery --> unroot and newer like box.
ReplyDeletePlease provide me compete guide with software link.
www.allfreeperks.in for all guides
ReplyDeleteI forget my moto g password. And im getting erroe no command in recovery. How can i swicth on my phone?
ReplyDeleteanyone plzz help....
ReplyDeletewhile flashing gpt.bin is failed and boot.logo is too failed. otherwise everything is installed correctly. but while booting it stuck at the your bootloader is unlock screen. i dont know what to do