Follow this guide to restore stock firmware on Moto G. The instructions will work for Moto G 1st Gen, 2nd Gen, 3rd Gen, 4th Gen, Moto G5/Moto G5 Plus, and Moto G5S/Moto G5S Plus.
The Moto G series is the OEM’s most prominent handsets that do well with the hardware, design, as well as on the software. But if you have accidentally messed up your phone, removed the OS, don’t feel right on custom ROMs, or want to turn in your Moto G smartphone for servicing? Then this guide will assist you on how to restore Moto G stock firmware. The process is easy and only requires you to flash the stock firmware/factory image via fastboot commands.
Table of Contents
Guide to Restore Moto G Stock Firmware
Unlike many other OEMs, Motorola pushes fastboot flashable firmware in form of zips. You can use the image files in the zip and flash them in order to restore stock firmware on Moto G devices. The supported device list includes the following. In simple words, only the following could be restored using this tutorial.
- Moto G (1st Gen)
- Moto G (2nd Gen)
- Moto G (3rd Gen)
- Moto G4 (4th Gen)
- Moto G5 and G5 Plus
- Moto G5S and G5S Plus
All you will need to restore stock firmware on Moto G is the factory image for your model and variant. Be careful while searching for this, flashing the wrong files may permanently damage your phone. The procedure is nearly same for all the devices and could be followed correctly with a little awareness.
Download Moto G Stock Firmware
You can grab the full factory image for your Moto G model and variant directly from www.stockrom.net. Just visit the link and press Ctrl + F on your keyboard. Then search for your device, example – “moto g”.
Make sure to fulfill all the listed requirements before you go ahead and follow the instructions to restore stock firmware on Moto G.
- In order to flash stock firmware, you must first unlock bootloader on Moto G.
- Download and Install Motorola USB drivers on your PC.
- Also, install Android SDK tools on your PC.
- This process will erase your device completely, so backup your phone completely, include the internal storage.
- Charge your Moto G to at least 60% battery level to avoid any sudden shutdowns, during the procedure.
- Enable USB debugging on your Moto G.
Restore Stock Firmware on Moto G
- Download the factory image corresponding to your Moto G variant and model. Extract the downloaded firmware to the platform-tools folder.
- On an empty space inside the folder, press SHIFT key and right-click on an empty space. Select Open PowerShell window here from the pop-up that appears.
- Connect your phone to the PC, and make sure it is unlocked. Enter the following command in the command-line window:
adb reboot bootloader
- Your Moto G smartphone will now enter bootloader mode. This is where we will flash the factory image.
- Once it has, make sure that fastboot detects your device by entering the following command:
- The above command will return an output with the device ID. If it doesn’t, make sure that you have installed the drivers and reboot your machine.
- Enter the following commands now to flash the factory image and restore stock firmware on Moto G device. There may be a chance that your device or variant has an extra or a less number of system.img_sparsechunk file, so make sure to flash accordingly. If you are downgrading your Moto G’s firmware, do not flash gpt.bin and bootloader.img/motoboot.img files.
fastboot oem fb_mode_set fastboot flash partition gpt.bin fastboot flash bootloader bootloader.img fastboot flash logo logo.bin fastboot flash boot boot.img fastboot flash recovery recovery.img fastboot flash system system.img_sparsechunk.0 fastboot flash system system.img_sparsechunk.1 fastboot flash system system.img_sparsechunk.2 fastboot flash system system.img_sparsechunk.3 fastboot flash system system.img_sparsechunk.4 fastboot flash system system.img_sparsechunk.5 fastboot flash modem NON-HLOS.bin fastboot erase modemst1
fastboot erase modemst2 fastboot flash fsg fsg.mbn fastboot erase cache fastboot erase userdata fastboot erase customize fastboot oem fb_mode_clear
- Once everything is done, reboot the phone:
Once your device boots, you will see the initial setup instructions. Now, this is how you can restore stock firmware on Moto G and it’s pretty easy for anyone to follow. If you have any queries or feel stuck, let us know via the comments below.
do not flash gpt.bin and bootloader.img/motoboot.img files. this lines made mt day, thanks brother 🙂
Hi. You’re welcome!
Those two files hold immense importance. Flashing an older gpt.bin (partition table) or an older motoboot.img (bootloader) can potentially brick the phone, mostly beyond self-recovery. I have gone through this mishap back with Moto E 1st Gen, and it taught me a lesson; to not miss any details when meddling with anything.
Most novice users nowadays think that processes like rooting, unlocking the bootloader, flashing ROMs, and even restoring stock firmware, is quite easy. However, they forget the details, the processes may vary from manufacturer to manufacturer, sometimes even different between devices from the same manufacturer.
For anyone else reading this: If you are following any guide on our site, ensure that you thoroughly go through the complete post, without missing even a paragraph before proceeding.
I have a moto G5 S plus which suddenly entered in a boot loop last month.At first I tried to factory reset my phone through boot loader but it didn’t work out.I then unlocked my phone and tried to flash a custom ROM through TWRP.I followed the exact process by wiping the partions and then tried flashing the Rom.I did not take any backup of the files. The flashing didn’t work I repeatedly got the error 7.I Google for solution it asked me to use the latest TWRP software and to delete the asserts.I did exactly what it asked me to do.I still keep getting the same error over and over again.I even tried flashing other ROMs and even stock rom. It won’t work.Can you please tell me why is this happing and I wanna try the above process I understood every step but how would I know how may system.img_sparsechunk files my device has and how may should I write in the command.please help!
Hi Anurag. That definitely seems tricky. I would suggest you start by flashing the stock firmware on your Moto G5S Plus. The latest firmware I can find is this: https://androidfilehost.com/?fid=1322778262904011464
So, download it. Then make sure that ADB and Fastboot are installed on your PC. Once that is done, let me know.
Please tell me what to do in order to relpck the bootloader. I unlocked my phone and now i am having some glitches and bugs with power and network. So i would like to relock the bootloader. I know i hv to flash the custom rom but then next what to do?
Please yell tell me.
Thanks for your help on this topic. I couldn’t find this anywhere else on the internet.
Hi Ansh. Unlocking the bootloader has nothing to do with the software-related bugs. It’s just like a hardware switch that has no relation with the software’s performance whatsoever.
As for unlocking the bootloader on Motorola phones, I think it is not possible. Instead of that, I would suggest you take a full backup of all the data including internal storage and then flash the latest stock firmware available for your phone.
And don’t worry, an unlocked bootloader would not affect your phone’s ability to receive OTA updates in future.
fastboot flash partition gpt.bin
target reported max download size of 536870912 bytes
sending ‘partition’ (45 KB)…
OKAY [ 0.005s]
(bootloader) Validating ‘gpt.default.xml’
(bootloader) Security version downgrade
(bootloader) Image primary_gpt failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling ‘gpt.default.xml’
FAILED (remote failure)
finished. total time: 0.082s
Please avoid GPT.bin if you’re flashing a lower firmware. It might brick your device beyond recovery.
Bro ihave a moto g xt1033 which is only getting detected in fastboot mode..can see device id in fastboot mode..but not turning on at all…i dont have a unlocked bootloader or usb debugging enabled…how can i flash a fatboot rom..pls reply…
Hi Mahesh, I don’t think it would be possible to flash the ROM via Fastboot without an unlocked bootloader. You will first need to unlock the bootloader using the official Moto page: https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a
Once done, then you can easily flash the fastboot ROM.
As a suggestion, did you try doing a factory reset in stock recovery and see if the phone boots then?
By typing those commands it will wipe custom ROM or not please tell me
Hello Mani. Yes, it will wipe the existing OS completely.