[Moto G 2015 General] KrisM22:
Edited Dec 22 -2017 <-- I may not always change this, but this is a work in progress!

[GUIDE][OSPREY] Moto G3 2015 - BEGIN: How to Unlock bootloader, flash TWRP, flash ROM, flash Root, Flash boot logo.

I started this because while trying to explain it to a user I kept running in to old info.

/*
* Your warranty is now void.
*
* This may destroy your phone. As with any modification to a phone,
* you must be prepared/willing to THROW IT AWAY without thinking twice.
* If you need it or it is your daily driver, don't mess with it.
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about the suggestions in this guide
* before following it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

This may well work on Merlin but I don't have one to test.

--> NOTE: I no longer use LineageOS so can't help there. Using AOSP 8. Should be no difference.

1a) Prep - before you do anything, in stock, go to settings/Development Options (which is turned on by tapping /settings/about phone/Build Number about 10 times.)

turn "OEM unlocking" ON

turn Debugging - "USB debugging" ON.

1b) Now! - To do anything, you must unlock your bootloader: This is done by going to the Motorola site and following their instructions completely.

https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a

They want you to "Install the Android SDK.". You only need adb and fastboot on your PC (windows or Linux).

Try this guide to get ADB and FASTBOOT onto your computer: https://xdaforums.com/showthread.php?t=2588979

For Ubuntu Linux simply type fastboot on the terminal and if it's missing a command will pop up as to how to add it - simple. same with adb.

ADDITIONAL THOUGHTS: a very helpful user suggested the following additional for unlock bootloader and getting adb and fastboot: [MENTION=8717477]Dave here[/MENTION] - see post 34ff.

2) Now that your phone is "bootloader unlocked" you will get an ugly screen on every bootup - we'll get to that in step 4.

- Now you must set up a custom recovery so you can back things up and change things. To do that you need to flash a recovery from your PC.

-> Follow squid2's guide: https://xdaforums.com/2015-moto-g/orig-development/twrp-twrp-moto-g-2015-t3170537

Hint - to get into fastboot mode on your Osprey, power off, THEN, hold power and vol-down for maybe 8 seconds until the fastboot screen pops up, Then connect USB cable phone to PC.

I recommend flashing his latest.

I also recommend doing it twice in a row, simply because once in a while that is needed.

3) okay, now you can boot into TWRP: power off, hold power and vol-down for a few secs until fastboot screen pops up. use vol-down to step through the options. Choose Recovery and press power to select. 10 secs later, you're in TWRP. If you get the dead android it means you still have the stock recovery - boot to fastboot and flash TWRP again.

IMMEDIATELY tap Backup and select to put backup on external storage - your SDcard. NOTE - if your SDcard has been converted to "internal storage" you will have to choose "internal storage" (em0). I did it twice. This is your stock ROM. YOU WILL NEED THIS LATER.

-- > For TWRP BACKUP I use the default settings of "system,data, and boot". Here is a nice article that explains the differences: https://twrp.me/faq/whattobackup.html .

At this point I recommend you boot back into stock and connect your phone to your PC via USB (slide down) and copy that backup in the TWRP folder to your PC. at least once, maybe twice, for safe keeping. You will need this if you wish to test if a problem exists only on a custom ROM but not on the stock ROM. You will also need this if you simply choose to run stock, instead of a custom ROM. Remember, you are now testing ROMs - nothing is certain!

4. Getting rid of the nasty boot message:

This has some nice ones: https://xdaforums.com/2015-moto-g/themes-apps/bootlogo-beautiful-logos-t3229167

Grab the one(s) you like and download - they're in .zip format. Put it on SDcard. Boot to TWRP, tap install, choose the one you want to flash. Voila.

Be aware there are some sites out there with logos that don't work on Moto G3.

5. To flash a custom ROM: Download to PC and put it on your SD card. Do same for gapps. (gapps - g-apps - google apps allow you to log in to your google account, use play store, etc. example http://opengapps.org/ (use arm, 7.1, whatever size you wish)(if you're new use full, mini, or micro until you know what you need. If you're on a 1GB phone, consider nano or pico.) )

https://download.lineageos.org/osprey or whatever ROM you want.

http://opengapps.org/ or whatever gapps you want.

Boot to TWRP.

Clean flash:

tap WIPE,

tap advanced, carefully checkmark:

Dalvic/ARTCache,

System,

Data,

Cache,

and then swipe the bottom swipe button. Takes a few sec. This is what makes a "clean flash".

Generally: Don't wipe "internal storage" or SDcard as this is where TWRP stores its backups/nandroids. - I always copy my TWRP backups to PC for safety.

Then back to menu screen and tap Install, select the rom, and swipe and let it do its thing.

Then back and tap Install, select the gapps and swipe to flash it.

THEN, and only then: tap Reboot (if you're at the main menu you also have to tap System to boot from system.)

The install takes 3 min or so before it starts asking questions.

Be sure to choose "

Set up as New

" or else you get whatever junk is in your google drive. This has cost errors and much time. <-----

6. Root: If you want to use bank apps, PokemonGo, etc, follow these instructions for Magisk:

https://xdaforums.com/2015-moto-g/general/guide-pass-safetynet-custom-roms-t3603609

read the whole thread.

- Else go to https://download.chainfire.eu/1019

and download the zip form of Chainfire's SuperSU 2.79 and boot to TWRP and flash (install) it.

Many thanks to [MENTION=2001582]acejavelin[/MENTION] for inspiration and information(which I probably shamelessly stole from him), to [MENTION=6485916]squid2[/MENTION] for his installation guide and his version of TWRP, to [MENTION=631273]Chainfire[/MENTION] for the tons of work that continue to go into superSU, to [MENTION=6217614]coolguy_16[/MENTION] for the safetynet/CTS work, and all the many Devs and helpers who make these ROMs possible, and as clean as they are! And to users like you who find bugs and file bug reports! Thank you!

Remember you are working with a Development ROM - a work in progress! (Even stock isn't perfect!!!)

Enjoy!