Moto G4, Moto G4 Plus and Moto G4 Play are the latest handsets by Motorola. However, you might want to restore stock (official) firmware on your Moto G4/G4 Plus/G4 Play for various reasons. To unroot a rooted phone, if it stuck at boot logo after flashing a wrong ROM, feel nostalgic about stock ROM after flashing a custom ROM, restore a soft-bricked Moto G4 or whatever reasons your Moto G4 needs stock firmware.

In this tutorial, we show you how to restore original stock firmware on Moto G4/G4 Plus/G4 Play as well as lock the bootloader in case you have already unlocked it. However, note that there is no guarantee that the process will revert back your Moto G4 to factory state for warranty purpose.



The below tutorial assume that you have knowledge on ADB, Fastboot, and how to issue fastboot commands. If you have followed the guide carefully, you can unroot or restore stock firmware on your Moto G4.

How to Reinstall Official Firmware on Moto G4, G4 Plus and G4 Play

Disclaimer: Follow the guide carefully and at your own risk. We will not take any responsibility if anything went wrong. This guide is intended only for technically talented users.


a) Download and install Motorola USB Drivers on your computer (download)

b) ADB and Fastboot setup on your computer (guide)

c) Enable USB Debugging. To do so, go to Settings -> About and tap Build version 7 times. It will unlock the Developer options. Then, go to Settings -> Developer options and enable USB Debugging.

Instruction to Restore Stock Firmware

1. Download the correct firmware for your device from here (confirm your device model number before downloading the firmware)

2. Extract the downloaded firmware zip file and save all the contents into the ADB installation folder.

3. Reboot your Moto G4 into the Bootloader Mode. To do so, turn off your phone and then press and hold the Volume Down & Power buttons simultaneously for a few seconds.

4. Connect your phone to your PC via USB cable.

5. Now, launch a command window from inside the ADB folder (where firmware files are saved). To do, click shift key, right click and select open command window here option).

6. In the command window, issue the following commands one by one:

mfastboot oem fb_mode_set
mfastboot flash partition gpt.bin
mfastboot flash bootloader bootloader.img
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash dsp adspso.bin
mfastboot flash oem oem.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash system system.img_sparsechunk.3
mfastboot flash system system.img_sparsechunk.4
mfastboot flash system system.img_sparsechunk.5
mfastboot flash system system.img_sparsechunk.6
mfastboot flash system system.img_sparsechunk.7
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1
mfastboot erase modemst2
mfastboot flash fsg fsg.mbn
mfastboot erase cache
mfastboot erase userdata
mfastboot erase customize
mfastboot erase clogo
mfastboot oem fb_mode_clear

8. And, finally, reboot your device by issuing the below command:

mfastboot reboot

Your Moto G4 will reboot now. If you have unlocked Bootloader warning, then do the following:

1. Download the logo.img file from here, unzip it and move the content into ADB installation folder.

2. From ADB, open a command prompt and issue the following commands one by one:

mfastboot flash logo logo.bin
mfastboot reboot


If your phone stuck at boot loop or unable to boot, turn off the device, go to Bootloader mode, launch command window and issue below commands:

mfastboot erase cache
mfastboot erase userdata
mfastboot reboot

It will reboot your phone and you will have the stock firmware back on your phone. Leave your views in the comment section below (source)

Previous articleDownload and Install Google’s Upcoming Pixel Launcher
Next articleHow to Turn Your Samsung Galaxy Phone’s Physical Home Button into a Touch Key
Kannan is a computer and Android enthusiast, a blogger by passion and a tech freak. His always ready-to-help attitude, knowledge and hard work is what drives him.


  1. I can’t fix my phone, i have the same issue, but i did all the tutorial and doesn’t work. How do you do it? I have the same model that you have

  2. anyone know where i can download the logo.bin file for unlocked bootloaders cos the post on xda has been deleted 🙁

  3. Hi,
    I tried all of the commands but when trying to flash sparsechunk 6, I got an error and now the phone is in a bootloop. Can anybody help? (I skippied flashing gpt.bin and logo.bin)

  4. Anyone know the command to flash stock rom on xt1609? It’s bit differ from unlocked variants. There are some more files to flash.
    Thank you

  5. Thank you so much. I flashed another rom because my phone was not working after an update and it worked great except for the bluetooth that would only work sometimes. This worked perfectly. Thank you.

  6. I was unable to make calls on my xt1609 (Verizon model) only data worked . It did not flash firmware but did work to fix the modem!
    Thanks a bunch my $80 was not wasted

  7. I’ve got it:
    I found a posting of someone with the same problem on and he was told to skip the “fastboot flash partition gpt.bin”. So I tried to issue the other commands … but there was another problem which I realized after a moment: I tried to flash the phone without the battery inserted, just with the USB-cable attached. After I inserted the battery, I successfully run all other commands and the phone booted the stock image.

  8. No, I’ve downloaded the correct firmware from here:
    Seems you’re as clueless as I am.

  9. I think you have downloaded wrong firmware file for your device. Download correct one and try and then let us know.

  10. I also want to revert back to the stock-fimrware.
    But if I do “fastboot flash partition gpt.bin”, I get “preflash validation failed”.
    What’s wrong

  11. You may download it from forum:

  12. there are no attachments for logo.omg link,the website says invalid attachment specified,the attachment has been removed,i need the logo.img because still my mobile is showing boot loader unlocked in my mobile after the coding

  13. No you cannot issue commands without unlocking the bootloader, but you can install OTA update with locked bootloader

Comments are closed.