DIFFICULTY LEVEL: EASY (NOOB FREINDLY )
I HAVE TESTED THIS FULL PROCEDURE MYSELF. BUT I SHALL NOT BE HELD RESPONSIBLE FOR ANY PROBLEMS THAT MIGHT OCCUR BY USING THIS PROCEDURE, THOUGH I SHALL TRY MY BEST TO SOLVE THEM IF YOU FACE ANY. DUAL SIM USERS, ONLY SINGLE SIM WORKS BECAUSE IT IS A GPE FIRMWARE AND THERE IS NO WORKAROUND FOR IT. THIS PROCEDURE DOES NOT WORK WITH XT1031 (confirmed by @goldeneagle1972 )
THIS PROCEDURE WILL WIPE ALL YOUR DATA ON THE PHONE. SO TAKE A BACKUP.
EXISTING GPE 5.0.1/2 USERS, FLASH THE ORIGINAL GPE MODEMS FIRST AND MAKE SURE YOUR SYSTEM ISN'T MODIFIED. (eg: rooted ). THEN DIRECTLY GO TO STEP 5.
THE REST OF YOU, FLASH THE 5.1 GPE FIRMWARE [HERE] FOLLOWING INSTRUCTIONS IN STEP 2.2 AND THEN GO DIRECTLY TO STEP 6
You will need an unlocked boot loader. If you have not already unlocked it, refer to [this]
Download mfastbootv2 from [here]
Download the minimal sdk from [here]
Download and install adb drivers from [here]
Download the batch files for all the commands from [here]. (OBSOLETE)
Download the batch files for flashing 5.1 firmware and fixing network from [here]
Download Motorola drivers from [here]
Reboot system after installing drivers.
Download THE 5.1 GPE FIRMWARE [HERE] FOLLOWING INSTRUCTIONS IN STEP 2.2 AND THEN GO DIRECTLY TO STEP 6
Extract the GPE firmware archive, batchfiles archive and mFastbootv2 archive to the Minimal ADB and Fastboot folder (or your folder containing the platform-tools)
Download OTA update from [here]. Rename it to "ota".
Copy this archive to the same folder mention above (do not extract this archive).
Boot into fastboot (POWER+VOLUME DOWN) and connect phone to PC
If you are starting from scratch, skip 2.1 ) and go to 2.2 )
2.1 ) If you have already made a failed attempt to OTA, or have previously flashed the Brazilian OTA, then flash the GPE 4.4.4 firmware follow this step. SHIFT + RIGHT click in the folder where you have extracted everything and choose open command window here. Then double-click on "Step 2_1.bat" or type the following commands one by one.
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 modem NON-HLOS.bin mfastboot erase modemst1 mfastboot erase modemst2 mfastboot flash fsg fsg.mbn mfastboot erase cache mfastboot erase userdata mfastboot reboot
YOU WILL GET SOME ERRORS LIKE HAB CHECK FAILED. JUST IGNORE AND PROCEED.
2.2 ) For those who haven't attempted the OTA or are not on the Brazilian Firmware, use the following method to flash the 4.4.4 GPE firmware. SHIFT + RIGHT click in the folder where you have extracted everything and choose open command window here. Then double-click on "Step 2_2.bat" or type the following commands one by one. (Thank you @jmonster141 for pointing out my silly error).
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 modem NON-HLOS.bin mfastboot erase modemst1 mfastboot erase modemst2 mfastboot flash fsg fsg.mbn mfastboot erase cache mfastboot erase userdata mfastboot reboot
IT SEEMS THAT SOME 4.4.4 FIRMWARE HAVE NEWER PARTITION TABLES THAN GPE 4.4.4, SO THE GPT.BIN WILL FAIL TO FLASH. JUST SKIP IT AND YOU'L BE FINE (confirmed by @SickBeast ) or TAKE A LOOK AT [THIS] (thank you @t4n017 ).
AFTER ERASING USERDATA AND REBOOTING, YOUR PHONE MIGHT BOOT DIRECTLY INTO FASTBOOT AND IT WILL SAY "UTAG FLASHFAIL CONFIGURED AS FASTBOOT. JUST REFLASH THE BOOTLOADER TO FIX
mfastboot flash motoboot motoboot.img
YOU WILL GET SOME ERRORS LIKE HAB CHECK FAILED. JUST IGNORE AND PROCEED.
Now we shall flash the OTA. Boot into recovery. You shall see a weird android logo with an exclamation mark. AFTER THAT HOLD VOL+ FOR 15 SECONDS, THEN TAP POWER BUTTON (KEEP HOLDING THE VOL+ BUTTON) (thank you @thestory101) and choose apply update from adb in the recovery. Then double-click on "Step 3.bat" or type the following command:
adb sideload ota.zip
Once it has finished, select reboot system now from the recovery. DO NOT WIPE YOUR CACHE. YOU WILL BE STUCK AT THE GOOGLE BOOT LOGO SCREEN FOR AROUND 10-20 SECONDS. JUST BE PATIENT. If you are stuck for more than 20 seconds, just flash [this].
Now check your phone for and update and you shall get an update notification for 5.1 lollipop. Follow onscreen procedures and complete the update.
SKIP THIS if you have EUROPEAN XT1032.
Download XT1033 modems [here] if you have the Asian Moto G. THESE MODEMS APPARENTLY DON'T WORK. LOOK AT POST NO. 593 FOR FIX.
Download XT1034 modems [here] if you have the Canadian Moto G
Download XT1032 US GSM modems [here] if you have the us version (thank you @jmonster141)
I HAVE GIVEN LINKS TO ALL THE MODEMS OF THE COMMON VARIANTS OF THE MOTO G. IF YOU HAVE A DIFFERENT VARIANT, DOWNLOAD YOUR RESPECTIVE FIRMWARE, COPY THE "NON-HLOS.bin" and "fsg.bin" FROM YOUR ORIGINAL FIRMWARE TO THE FOLDER WHERE YOU HAVE THE SDK, mFastboot, GPE FIRMWARE AND OTA AFTER STEP 3 AND FOLLOW STEP 5 TO GET NETWORK. IT IS EXTREMELY TIME CONSUMING FOR ME TO HUNT DOWN MODEMS FOR ALL THE NUMEROUS VARIANTS AND LINK THEM IN THE OP (IM KINDA BUSY WITH MY STUDIES RIGHT NOW) SO PLEASE TAKE THE PAIN TO DO SO YOURSELF. ALSO, LINK THE MODEMS YOU USED,TO GET NETWORK, IN THE THREAD SO I CAN ADD IT TO THE OP AND HELP THE REST. (That's how the amazing XDA community works right ?! )
Link for Stock Roms to extract modem files:
(All Moto G Variants)
I'll just drop this here:
All variants/regions kernel/recovery/radio files...
mfastboot flash modem NON-HLOS.bin mfastboot erase modemst1 mfastboot erase modemst2 mfastboot flash fsg fsg.mbn mfastboot reboot
For anyone having difficulties with their network on an XT1033 , try using network fix.bat from here :
Download the latest superSU flashable zip from [here] and copy-paste it into to your phone.
Download the latest TWRP recovery image from [here]. Copy the image to the folder where you have adb and fastboot. Rename the image to "recovery". Open a command prompt in the folder containing this recovery (press shift + right-click, choose open command window here). Boot your phone into fastboot mode and execute the following code:
fastboot flash recovery recovery.img
Use your volume rockers to boot into the recovery. Go to install zip, and choose the SuperSU zip and flash it.
Reboot into rooted 5.1 GPE.
TO FIX THE LAGGY ANIMATIONS IN GOOGLE NOW LAUNCHER, SEE [THIS] POST.
- MOST IMPORTANT: please read and follow the steps as if your life depends on it. If you have any doubts, read the whole thread. I confirmed the steps with some other google searches wherever I thought I am confused. Luckily for me, if worked like a breeze for me the first time. Read all the messages on the command prompt / terminal on your computer and the information displayed on your phone while you are flashing all sorts of stuff. There are certain important information that you will on this displays. BE PATIENT