Moto g 3 root failure mashmallow i tried to root my moto g3 with king root and after some time it rebooted and got hanged on bootloader and said
AP fastboot flash mode(secure)
hab check failed for boot
failed to verify hab image boot
failed to validate boot image
ERROR:failed to pass validation ,backup to fastboot
Fastboot reason :fallthrough from charger boot mode
TLDR answer: You will need to reflash your phone back to stock or flash TWRP and install a custom ROM image, links and instructions below on how to return to stock and properly root... If you want to ROM your device, a little reading in XDA's Moto G 2015 section will get you there. 

Long answer:

Kingroot, and most all Chinese/3rd party root tools, will brick the Moto G 2015, regardless of whether they say will work or not. Rooting a stock Moto G is almost as simple as rooting a Nexus device and it can be done with little effort, it should always be done manually.

To repair your phone, first make sure you have ADB &amp; fastboot properly working, with connectivity to your device, then download the factory image from this XDA thread, DO NOT obtain the firmware from anywhere but this thread or Lenovo/Moto itself (who has not publicly released these images). Use the image that matches your device model and is the same or newer release, do not attempt to downgrade on a phone that has had an attempted Kingroot exploit applied, it may hard brick. Extract the files to a directory that can be easily accessed with fastboot.

Return to Stock

Detailed instructions and help flashing the image are available in this XDA thread, but here is the quick and dirty of it.


Factory reset in stock recovery... this is absolutely MANDATORY or else bootloop will occur and you will need to start all over again.
Reboot into Bootloader (fastboot) mode
Flash the files with fastboot - Do commands manually, one at a time - checking that each one returns an [OKAY] response. NOTE: Do not simply copy and paste these commands! - system.img_sparsechunks may differ in number and name. Always check contents of folder you're working with. You must flash all of the sparsechunk files you have. Also, some steps may take considerable time, especially erase commands, so be patient. 


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 system system.img_sparsechunk.6 (If included in your image file)
fastboot flash system system.img_sparsechunk.7 (If included in your image file)
fastboot flash system system.img_sparsechunk.8 (If included in your image file)
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 erase clogo
fastboot oem fb_mode_clear
fastboot reboot  

4) The phone should now reboot and be operational in 5-15 minutes. Remember with ART the initial boot can take what seems like forever, be patient. 

Properly Root

To properly root, obtain the latest TWRP for the Moto G 2015 and the latest SuperSU ßeta and place it in the device's storage (internal or SD card). 

Boot or flash the TWRP image, I prefer to boot it the first time and do a complete backup and move it off device, then flash TWRP from the bootloader with fastboot flash recovery *twrp.img* replacing twrp.img with the current TWRP image filename you downloaded from above. Now reboot into the bootloader and start Recovery, TWRP should load after the Bootloader Unlock warning screen. 

The Moto G 2015 needs to rooted with systemless root, which SuperSU does not auto-detect in this device, so we need to force it in TWRP prior to flashing by entering the TWRP terminal and entering echo SYSTEMLESS=true&gt;&gt;/data/.supersu. 

After you have done this, you can just use TWRP to flash (Install) the SuperSU ZIP file you downloaded/copied to the phone from the link above and reboot.

You should now be fully functional and rooted on the stock ROM.