[Moto G 2015 General] djibe89:
[GUIDE/TUTORIAL/HOWTO] Motorola Moto G3 from Stock to Android 12

[GUIDE/TUTORIAL/HOWTO] Motorola Moto G3 (2015 osprey or merlin) from Stock Android 12.1/LineageOS 19.1

Complete guide to install Android 12.1 on your Motorola Moto G3.

This tutorial only applies to this model, to check the correct version:

in Android, go to Settings > System > About phone, make sure it is one of these models:

Osprey variants (1.4 GHz quad core Snapdragon 410):

- XT1540

- XT1541

- XT1542

- XT1543

- XT1544

- XT1548

- XT1550

Details: https://wiki.lineageos.org/devices/osprey/

Merlin variants (Moto G3 Turbo 1.5 GHz octo core Snapdragon 615):

- XT1556

- XT1557

Remove back cover to see the model reference.

Netflix and Disney+ are working.

See all my tutorials at https://github.com/djibe/Android-tutorials

CHANGELOG

v1. Initial release

1) WHAT YOU NEED

- djibe Moto G3 pack: https://bit.ly/motoG3djibepack

(Contains link to Motorola Bootloader unlock + TWRP Recovery 3.7.0_9-0 + Magisk root + Motorola USB drivers x32/64 + fastboot + all cited files)

+ ROM Android 12 LineageOS Unofficial 19.1 for osprey: https://xdaforums.com/t/rom-12l-wip-lineageos-19-1-unofficial-osprey-merlin.4358885/

Download latest build here for osprey: https://sourceforge.net/projects/althafvly/files/los19/osprey/

Download latest build here for merlin: https://sourceforge.net/projects/althafvly/files/los19/merlin/

Or LineageOS Official 17.1 (Android 10): https://sourceforge.net/projects/althafvly/files/los17/nightly/

Or CrDroid Official 6 (Android 10): https://crdroid.net/osprey/6

Or CrDroid Unofficial 7.12 for merlin (Android 11): https://xdaforums.com/t/rom-11-0-unofficial-crdroid-v7-12-merlin.4326065/

+ BitGApps ARM 12.1: https://github.com/BiTGApps/BiTGApps-Release/releases

+ a microSD card formatted in FAT32: copy ROM, GApps (+/- Magisk). Insert it in phone

+ Charge phone to 100%

2) INSTALL DRIVERS

Install Motorola 64 bits drivers (32 or 64 bits depending on your Windows version).

Then plug Moto G5 to PC and let the install go on.

3) BACKUP YOUR DATA

When your phone is connected to Windows, search for all .jpg, .mp3, .mp4 files on your phone and make copies on your PC.

Sync your Google Account, WhatsApp and co.

Then, with an app like Backupyourmobile, backup all your SMS, MMS, contacts.

Make sure the backup is located on microSD card.

4) UNLOCK BOOTLOADER

Update your Moto G3 to the latest official Android 6 (aka Marshmallow).

In Android, go to Settings > About phone > System updates. Make sure you have latest version.

Back to Settings > System > About phone.

Android version must be 6.0.1.

Tap 7 times on Build number to unlock Developer options.

Go to Settings > Developer options.

Switch ON "OEM unlocking" and USB debugging.

### OEM unlocking is disabled ? Reset phone to factory settings and start all over.

Then, go to Motorola website (shortcut in my archive or right below):

Sign in to Motorola - Motorola Mobility LLC

Sign in to Motorola

accounts.motorola.com

Subscribe using your Google Account or email.

Shut down phone.

Power it on in fastboot mode: Hold Power et Volume- during 3-4 secondes and release.

Screen is black with lines of text, starting with AP Fastboot Flash Mode (Secure).

Connect phone to USB, wait for fastboot drivers to install.

In Windows, select the /flash subfolder you unzipped from my archive.

On keyboard, make a combo Shift + right click > Open command windows here.

(or type cmd in Address bar and then hit Enter)

Write this command in Windows terminal :

fastboot oem get_unlock_data

confirm using Enter.

Command sends back a message like this :

$ fastboot oem get_unlock_data
(bootloader) 3A55840996502715#5A593232333551
(bootloader) 4C3458004D6F746F4733000000#A30D
(bootloader) 7A8CCA2F5A312B797DF96C730F10CA5
(bootloader) 2440E#E94B1C1700000000000000000
(bootloader) 0000000
OKAY [ 0.235s]
Finished. Total time: 0.235s

Select all text > right click > select all.

Open a notepad editor, and paste text.

Rework the text to get it on 1 line, and remove all spaces and "(bootloader)" messages.

It should look like this: 3A55840996502715#5A5932323335514C3458004D6F746F4733000000#A30D7A8CCA2F5A312B797DF96C730F10CA52440E#E94B1C17000000000000000000000000

Now, copy this line and paste it in Motorola website: https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-b

Below, click on "Can my device be unlocked?" button.

Wait and then go to bottom of page.

I agree to be bound by the terms of the legal agreement: select Yes and click on "Request Unlock Key"

You get the unlock key by email, looking like: XVF3XJW4CY5VFHYEHM4K

Use this unlock key in the following Windows command:

fastboot oem unlock YOUR_UNLOCK_CODE

Confirm with enter and wait a moment until success is confirmed: (bootloader) Phone is unlocked successfully!

Keep Windows command opened.

4) FLASH RECOVERY

Now enter this command:

fastboot flash recovery twrp-3.7.0_9-0-osprey.img

### Or merlin according to your model

Confirm with Enter.

Terminal confirms : "Finished. Total time: 0.670s".

### For future TWRP updates, TWRP.img can be flashed from TWRP recovery itself (Install > Install Image).

Back to the phone (still in fastboot/bootloader mode).

Press Volume- to select "RECOVERY MODE". Confirm by pressing Power.

Welcome to TWRP 3.7 recovery.

TWRP asks for Keep System Read Only ? Swipe to Allow Modifications.

### You don't see this warning screen? Then you'll get "TWRP unable to mount storage" while trying to wipe partitions.

### > in TWRP, go to Reboot > Recovery so Recovery will refresh and popup the partition writing privilege.

Go to Wipe > Format data

Type yes and confirm with bottom right check icon.

Then go to Reboot > Recovery.

Go straight to Backup menu.

Select System, System Image and Boot partitions.

Tap on Select Storage and set Micro SD card.

Swipe to Backup and wait during backup.

### If MicroSD card is too small. Backup on data partition and after backup has ended, go to Mount and connect phone to PC to retrieve TWRP backup folder.

### Store this backup (aka nandroid backup) somewhere safe before going further.

5) WIPE PARTITIONS

Go to Wipe menu > Advanced wipe.

Select cache, data and system and swipe to wipe.

6) FLASH ROM, GAPPS +/- MAGISK

Back to TWRP Home menu. Then tap on Install > choose lineage*.zip,

(if you don't see the files, tap on Select Storage and make sure Micro SDCard is active).

then Add more Zips > GApps*.zip,

(optional: add Magisk*.zip)

then Swipe to confirm Flash.

Wait for operation to end.

Then tap Wipe cache/dalvik, swipe to confirm,

then Reboot System.

Android 12 is installed !

Wait for the phone to boot during 5 minutes.

7) ROOT WITH MAGISK (OPTIONAL)

### Only if you flashed Magisk via TWRP recovery

Do not connect to Android account.

Magisk root starts with Android.

You can manage permissions and extra modules with Magisk Manager app.

Open Files app > Install Magisk.apk.

Then in Magisk goto Settings > Hide magisk app and give it a name, switch Zygisk option ON.

Go to Modules Tab > Install from Storage: MagiskHidePropsConfig and safetynet.

Reboot phone.

You can use yasnac app to check Safetynet passes.

Then with Files App: install netflix and disney+ if needed.

10) OTHER APPS

- You can use GPS Status & Toolbox for faster GPS fix.

- Disable USB debugging to connect phone as storage to PC

- Developer options

Settings > About phone.

Tap 7 times on build number.

Back to Settings > System > Advanced > Developer options

Select USB Configuration > set MTP

Set Windows animation scale, Transition animation scale and Animator duration scale to .5x

That's it.

Enjoy ;-)

djibe

Thanks: @althafvly, LineageOS team, TWRP team, NikGapps team, TopJohnWu (Magisk)

--------------------------------------------------------------------------------------

BOOT INTO RECOVERY

- Shutdown phone

- Hold Power + Volume- until open droid logo shows up and release buttons

- Press Volume- twice to set RECOVERY MODE and press Power to confirm