In this guide you would be able to unroot, unbrick Moto G4/Moto G4 Plus and flash stock firmware. Getting root access on any device is the purpose to hack the system administration that means you can perform changes and modify the system files. Sometimes root is necessary for even installing the custom recovery despite it advantaged there is another side that you will permanently lose the warranty, unable to receive the stock firmware updates and many other. So you need to un-root your device first and bring back it to stock for getting official OTA updates, if your device is stuck in boot-loop or bricked then there is the only option left and that is to flash the Stock firmware on your device to get it back to life.
The below described method will not only un-root, unbrick your device but also flash a stock un-rooted firmware on your Moto G4 and Moto G4 Plus. Just go ahead and follow the step by step process to know how to do that.
How to un-root,unbrick your Moto G4/Moto G4 Plus and install Stock firmware on it
Before you begin:
Disclaimer: This guide includes flashing stock firmware, un-root and other operations on your device. The writer is not responsible for any damage happens to your device during the whole operation neither we are forcing you to perform such operation.
Create a Backup of your device
Backup is the most necessary part for your device, so we recommend you to create a secure backup of your data.
Keep your battery charged or at least your device should contain at least 80% charge before the flashing operation.
Android USB drivers for your device should be installed on your PC, or you can download USB drivers for Motorola
Your device bootloader should be unlocked or follow this guide to do that.
Enable USB debugging and check the Allow Mock Locations option too. To enable USB debugging in your device go to Setting >> Developer options >> USB debugging. USB debugging is meant for the development purpose hence it will ask you for the confirmation so tap OK to confirm.
Sometimes “Developer options” are not visible in device settings menu, so what you need to do is, go to Settings >> About device >> Software information and there you will see an option build number. Tap it 7 times until a pop up arises with a message that you are now a developer, that’s it now go back and the Developers option is visible in the settings menu.
Download Stock firmware for Moto G4 and Moto G4 Plus
Once you done with the above preparations now it’s time to flash stock firmware on your Moto G4 and Moto G4 Plus. Just go ahead and follow the steps in sequence to avoid any issue while flashing stock firmware on Moto G4 and Moto G4 Plus.
Process to un-root, unbrick Moto G4 and Moto G4 Plus with Stock firmware
Just follow the steps to un-root, unbrick Moto G4 and Moto G4 Plus with Stock firmware
Extract the downloaded stock firmware file and copy all the files into mfastboot folder.
Now what you need to do is, connect your device to PC using USB cable.
Now inside the same folder press and hold SHIFT + Right-Click together and Right click on any empty space inside the folder and click on “Open command window here” as shown in the above pic.
A black command window will appear, now type the following command to reboot your device into fastboot/bootloader mode.
“adb reboot bootloader”
Once your device boots into fastboot/bootloader mode now type the following commands one by one in sequence to flash stock firmware on your Moto G4 and Moto G4 Plus.
mfastboot oem fb_mode_set oem
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 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
Once you are done with the above steps simply reboot your device by typing the final command.
Your device will reboot and you will find Stock firmware back on Moto G4 and Moto G4 Plus. If you have any query please let us know by posting your comment in the provided comment box.