[G 2014 General] prathameshsd:
ALL IN ONE GUIDE

Unlock + Root + Backup + Restore + Downgrade

For Moto G 2014 (2nd Generation)

titan (3G) : XT1063, XT1064, XT1068, XT1069

thea (4G/LTE): XT1072, XT1077, XT1078, XT1079

(Updated 1st August, 2017)
​

Requirements:

1. Moto G 2014 2nd Generation (titan/thea)

2. Unmodified Stock ROM

3. Windows PC & Stable Internet Connection

4. Good Quality USB Cable & Functioning USB Port

5. Lots Of Patience & Common Sense

This guide is divided into 4 parts, read the below post & the comments before asking any question. Dont quote the entire post in the comments & ask what is only necessary.

PART I : UNLOCKING

This part is compulsory before proceeding to PART II. Your warranty will be voided after sending a request for an unlock key to Motorola used for unlocking process.

PART II : ROOTING

This part consists of 2 steps, flashing TWRP & flashing SuperSU Zip. After PART II is done, you can now flash custom ROMs, mods, scripts on your Moto G 2014.

PART III : RESTORING

This part is for those who wish to go back to the same stock firmware i.e. 6.0 to 6.0, 5.0.2 to 5.0.2 in case of boot loop, stuck at Motorola logo/boot-animation, BOOTLOADER UNLOCKED screen, OTA Update. You dont need an unlocked bootloader to flash the same stock firmware.

PART IV : DOWNGRADING

This part is for those who wish to revert back to previous Android version. i.e. 6.0 to .0.2 or 5.0.2 to 4.4.4. Please be very careful in this part as it can lead to dead devices if you dont follow the instructions correctly.

#include
/*
* Your warranty is now VOID !
*
* I am not responsible for bricked devices, dead SD cards,
* accidental data wipe or a thermonuclear war.
* If you have any concerns about steps included in this
* guide please do some research before trying it!
* YOU are choosing to make these modifications & if you
* point the finger at me for messing up , I will laugh at you.
*
* GOOD LUCK !
*/

PART I : UNLOCKING​

NOTE:

The warranty of all Non-European phones is lost permanently after UNLOCKING bootloader. LOCKING the bootloader again after UNLOCKING won't give your warranty back.

The warranty of all European phones is not lost after UNLOCKING bootloader. To claim warranty of an UNLOCKED European phone you will need to live in the European Union.

Requirements:

Minimal ADB + Fastboot Drivers v1.4.2

Motorola Device Manager Drivers v2.5.4

Unlock Bootloader Tutorial

Unlock Bootloader YouTube Video

Bootloader LOCKED, Status Code 0 : Bootloader was not UNLOCKED before by the user & is factory LOCKED, UNDER Warranty.

Bootloader UNLOCKED, Status Code 3 : Bootloader is UNLOCKED by the user, Warranty VOID.

Bootloader RELOCKED, Status Code 2 : Bootloader was UNLOCKED by the user & is LOCKED again by the user, Warranty VOID.

1. Users with LOCKED bootloaders will have to first UNLOCK their bootloader before proceeding, this will VOID your WARRANTY.

2. Users with UNLOCKED bootloader need not worry as this process will not wipe anything from the internal storage.

3. Users with RELOCKED bootloader will have to UNLOCK their bootloader again before proceeding, phone will be erased again after UNLOCKING.

4. After UNLOCKING the bootloader your phone's internal storage will be erased. Your installed apps, contacts, SMS, call logs, data like photos, music, videos in internal storage will be WIPED completely.

5. Use 'SuperBackup' App from Playstore & set the location of backup files to external sdcard.

6. Before proceeding make sure you backup everything & move your data from internal storage to external sdcard or PC.

PART II : ROOTING​

Requirements

Minimal ADB + Fastboot Drivers v1.4.2

Motorola Device Manager Drivers v2.5.4

TWRP v3.1.1-0 for titan

TWRP v3.1.1-0 for thea

SuperSU v2.82 Stable

A) Flashing TWRP

1. You need to unlock the bootloader before proceeding/

2. Install Motorola & Fastboot Drivers & restart your PC. Copy the SuperSU Zip inside your phone storage.

3. Go inside the installed adb fastboot folder. Hold "Shift" key & right click inside the folder & click on "Open CMD Window Here".

4. Copy the TWRP image file inside installed adb fastboot folder.

5. Switch off the phone, press & hold "Volume Down" & "Power" & release after 4-5 seconds.

6. Connect phone to PC . You will see "USB Connected" on the phone screen.

7. Type and press enter after each command

For titan (3G) : XT1063, XT1064, XT1068, XT1069

fastboot flash recovery twrp-3.1.1-0-titan.img
fastboot boot recovery twrp-3.1.1-0-titan.img

For thea (4G/LTE): XT1072, XT1077, XT1078, XT1079

fastboot flash recovery twrp-3.1.1-0-thea.img
fastboot boot recovery twrp-3.1.1-0-thea.img

7. Your phone will now boot into TWRP.

B) Backup Stock ROM (Optional)

1. Inside TWRP, select 'Backup', select 'System', 'Boot' & 'PDS' partitions & swipe to backup your Stock ROM.

C) Flashing SuperSU Zip

1. Select "Install" option, Select the location of SuperSU Zip & flash it, go back & select "Reboot", select "System".

2. Open the App Drawer & check for SuperSU app & then download 'Root Checker' app from Play store to check for root access.

PART III : RESTORING​

Requirements

Minimal ADB + Fastboot Drivers v1.4.2

Motorola Device Manager Drivers v2.5.4

Softbrick : Stock 5.0.2 Factory Firmware Image Installer

Hardbrick : Unbrick Moto G 2014 (2nd Gen)

1. You won't need to UNLOCK the bootloader to flash the firmware of your variant for your region. i.e. You can flash firmware on a LOCKED bootloader. However to flash a firmware for different region, your bootloader needs to be UNLOCKED. Check your Moto G 2nd Gen Model No & Regional Variant from here before proceeding. You will need it for downloading factory images for your corresponding phone.

2. If your device gets stuck in following situations it has soft bricked.

- Stuck on Motorola logo or "Unlocked Bootloader" screen.

- Stuck on boot animation or device restarts automatically (boot loop)

- Cannot boot into recovery mode.

- Can boot into fastboot mode only.

3. If your device gets stuck in following situations it has hard bricked.

- Cannot boot into fastboot mode.

- Cannot power on or cannot charge.

- Cannot boot into recovery mode.

Step By Step Troubleshooting Of Your Device

1. Check if it switches on or boots into fastboot menu, if it doesnt maybe the battery is depleted. Use a minimum 1A output charger & keep it plugged in overnight for atleast 10-12 hours. Repeat for 2-3 days. If it still doesnt power on, this means your phone is hardbricked & recovery may or may not be possible. Motherboard replacement might be needed. You will loose all your data & your IMEI number will be changed after your motherboard is replaced.

2. If it switches on & is stuck on Motorola logo/bootanimation or "Unlocked Bootloader" screen, hold power button till phone screen turns off. Your phone will restart, let it continue the booting process. If it still stuck, hold power button till phone screen turns off. After it turns off immediately press volume down while holding power button. Release both after 2-3 seconds. You will now boot into fastboot menu. This means your phone is softbricked & can be recovered by flashing correct factory image for your device. Flashing incorrect image or downgrading from a higher Android version to lower (Eg Marshmallow to Lollipop) may render your device permanently hard-bricked/dead.

PART IV : DOWNGRADING​

Requirements

Unlock Bootloader Here

Unlock Bootloader YouTube Video

Minimal ADB + Fastboot Drivers v1.4.2

Motorola Device Manager Drivers v2.5.4

5.0.2 Factory Firmware Image Installer

1. Boot into fastboot mode. Check your bootloader version from top 2nd line. It should say something like "48.86 (sha-5497-c9). 4886 is your bootloader version.

2. Marshmallow 6.0 to Lollipop 5.0.2 : If your bootloader version is 4886 (Marshmallow Bootloader), you need to make some changes in the easyinstaller.bat file inside the Stock Factory Firmware Image that you download or while flashing the ROM manually.

- Download Lollipop 5.0.2 Factory Firmware image zip from PART III RESTORING Section

- Unzip the contents & open easyinstaller.bat with notepad.

- Find the 2 lines "mfastboot.exe flash motoboot motoboot.img" & delete both of them.

- Delete the motoboot.img file inside the extracted contents.

- Run the easyinstaller.bat

- Do not type "mfastboot.exe flash motoboot motoboot.img" while flashing the Lollipop ROM manually

3. Lollipop 5.0.2 to Kitkat 4.4.4 : If your bootloader version is 4882/4883(Lollipop Bootloader), you need to make some changes while flashing the ROM manually.

- Download Kitkat 4.4.4 Factory Firmware image zip.

- Unzip the contents.

- Delete the motoboot.img file inside the extracted contents..

- Do not type "mfastboot.exe flash motoboot motoboot.img" while flashing the Kitkat 4.4.4 firmware image manually.

4. If you downgrade your bootloader version i.e flash a 4883 Lollipop bootloader on your existing 4886 Marshmallow bootloader, your phone will be hard-bricked / permanently dead. Therefore follow the instructions above carefully. I am not responsible for dead phones.

CREDITS

[MENTION=5857550]Lucas Eugene[/MENTION] for his thread 'Unlock Bootloader - Moto G (2nd Gen) [UPDATED]'

[MENTION=4246643]Tomsgt[/MENTION] for his YouTube video 'How to unlock the boot loader on your Motorola phone Moto X, G, & E all versions'.

[MENTION=631273]Chainfire[/MENTION] for creating CF Auto Root & SuperSU.

[MENTION=5778309]luca020400[/MENTION] for maintaining TWRP.

[MENTION=3548061]reefuge[/MENTION] for his thread '[STAGE FRIGHT][XT106x][5.0.2][LXB] Stock 5.0.2 Easy Installer via FastBoot Tool'
​