If you flash a lot of custom ROMs and suddenly you have a problem with your Moto G and have to send it back, you have to restore your phone to a stock firmware so warranty won’t be voided.
Before starting with the restore process, here are some things you should have:
You should also backup your phone just in case something goes wrong and you might have to restore your apps and data.
To restore stock firmware on Moto G:
1. Go to Settings > About Phone and quickly tap 7 times on Build Number to activate Developer Mode option.
2. Go to Developer Options, scroll down and select USB Debugging. This will allow your PC to install the new stock firmware.
3. Connect your phone to your computer. If you have correctly installed Motorola drivers, a notification will appear on your PC saying “New ADB device detected.”
4. Boot your phone into bootloader and select “Minimal ADB & Fastboot”.
5. Type: “adb reboot-bootloader”
6. A new screen with different menus like “Normal Powerup”, “Recovery”, “Factory” will appear.
7. On your computer go to Start > Run and type cmd. This will open Command Prompt.
8. There browse your PC folders, find and select the firmware you downloaded.
9. The firmware you selected should have a file called “flashball.bat”. Select it and the firmware will quickly be installed.
10. Reboot your Moto G.
That’s it. Now you are using a stock firmware and your warranty isn’t voided anymore.