[Moto Z2 Play  Guides, News, & Discussion] leodexe:
[GUIDE] [STOCK] How to update your Moto Z2 Play to Android 9.0 Pie (fastboot)

Due to the forum rules there must be posted an english version of the original thread. Any questions you have you can ask here or DM directly.

FOR SECURITY REASONS YOUR BOOTLOADER MUST BE UNLOCKED, IF ITS LOCKED AND SOMETHING GOES WRONG DURING THE PROCESS YOU MIGHT BE UNABLE TO UNBRICK IT RENDERING IT UNUSABLE, I AM NOT RESPONSIBLE FOR FAILED INSTALLATIONS, BRICKS, ETC. IT IS STRONGLY RECOMMENDED TO BACKUP ALL YOUR PHONE DATA (SPECIALLY NFS SO YOU CAN RESTORE YOUR IMEI IF YOU LOSE IT SOMEHOW) WITH TWRP BEFORE STARTING.

This guide is based on @HTCDevil's guide, which was originally meant to upgrade from Nougat to Oreo, so I adapted his guide so it also works to update from Oreo to Pie and also updated it with more relevant information that isn't available on the old outdated guides.

It has been tested and it works with the following models of the Z2 Play:

XT1710-01, XT1710-02, XT1710-06, XT1710-07, XT1710-09 and XT1710-10 works without issues with the general same commands, it also works with the XT1710-08 and XT1710-11, the former needs to remove the two modemst lines and with the latter it needs to remove also those two lines, plus the modem and fsg lines, so I included all possible cases for every model.

A special, big, superb thanks to Junior Passos @Junior Passos the op of the motozbrasil thread. <<<

NOTE: This guide focuses mainly on upgrading to Android Pie with adb fastboot, so I am already assuming you have Android 8 (Oreo) installed, if your phone is still in Android 7 (Nougat), you might as well do the official OTA update since at this time and date it is now available for all models of the Z2 Play worldwide.

Steps to follow:

1) Download Drivers and all required files (links at the end of this post);

2) Install the drivers (Windows) in this order, and install Universal ADB Drivers, then install the Motorola Drivers and reboot your PC;

3) Unzip the firmware, ADB and the scripts everything in a single folder (special thanks to htcmania for the package);

4) Turn off your phone and put it into fastboot mode (Volume down + Power), then connect it to your PC, wait for drivers to install if they haven't installed yet;

5) Copy the corresponding script to the root folder where it is located the executable adb.exe

6) Depending on the model of your Z2 Play, execute the corresponding script .bat and follow instructions.

Profit.

It is recommended to do a clean install, that is, do a full wipe before updating.

To simplify things there are 3 entirely omitted lines that aren't really needed and in fact in can cause problems in the chinese variants, these files are:

fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2

It is known that the modem file (NON-HLOS.bin) that comes with Stock Pie causes audio issues during calls whenever a custom ROM is installed afterwards, because it distorts the audio to the point it becomes impossible to understand the call, so this file specifically should be skipped unless you are updating from Nougat to Oreo, in that case it should be flashed too. The modem file from Stock Oreo works flawlessly on all Stock and Custom ROMs, so stay with this one.

Also you will need a RETAIL Stock ROM, at the end of the post I will leave the link to get that and the modem.

If you have a corrupted boot.img and you are not able to flash (like bangood or other shops do with chinese model), you first have to give that:

fastboot flashing unlock

---STUCK ON LOGO AFTER INSTALLING MAGISK ON STOCK ROM --- HOW TO FIX IT

Sometimes when installing Magisk your phone may get stuck in bootloop forever, so here is one workaround to fix it, you can also flash uninstaller and try again with other version.

About Magisk in Oreo, you could give a thanks to Fabio Feher:

To install Magisk in Pie follow the same steps above, except you don't have fo follow steps 4 and 5, just flash it and reboot.

MAGISK IN GSIs: To install Magisk in Custom GSIs, you need to flash this modded version of phhusson's Magisk, also you cannot update it, so you have to stuck with that version, you can update the manager apk, tho. If your phone gets stuck on logo or keeps in bootloop flash the uninstaller provided at the end ot this post.

Moto Z logo

After unlocking your bootloader, whenever you turn on your phone you will notice that the Stock Moto Z boot logo is gone and instead it shows some ugly text telling what is already obvious, so in order to get rid of that and replace the Void Warranty text you can flash this Stock Moto Z logo with this command:

fastboot flash logo logoz.bin

It worked for me, so it should work for you too.

Hope is useful.

LINKS/RESOURCES

Universal ADB Drivers for Windows http://download.clockworkmod.com/test/UniversalAdbDriverSetup.msi

Motorola USB Drivers for Windows http://www.mediafire.com/file/akiha24e4z3sine/MotorolaDeviceManager_2.5.4.7z/file

latest adb platform tools: https://www.mediafire.com/file/pgmkw9vj1qut4ba/platform-tools_r30.0.3-windows%28adb%29.7z/file

ROM Stock RETAIL Pie 9.0 Update: https://mirrors.lolinet.com/firmwar...ubsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

Scripts https://www.mediafire.com/file/nwio62ttvch1vjd/scripts.7z/file

64-bit Treble TWRP (needed to flash Treble-based GSIs and Custom ROMs and also needed for backup of your phone partitions) https://androidfilehost.com/?fid=1322778262904007189

Magisk 20.4: https://www.mediafire.com/file/yh9jtc9rdqzmjeo/Magisk-v20.4.zip/file

Phhusson's Magisk v19.3 (for GSIs) https://github.com/phhusson/treble_experimentations/releases/download/v200/magisk-phh.zip

ExpressLuke's Magisk v20.3 (for GSIs) https://sourceforge.net/projects/ex...sk-ten/Magisk-v20.3-15bd2da8-phh.zip/download

Magisk Uninstaller https://github.com/topjohnwu/Magisk/releases/download/v20.4/Magisk-uninstaller-20200323.zip

Stock Oreo Modem http://www.mediafire.com/file/q8nbpybxc8mjyew/NON-HLOS-Z2P-STOCK-8-OREO.7z/file

Stock Moto Z Logo http://www.mediafire.com/file/lpcmsgtm2vs603r/logoz.bin/file

Mirrors of all the ROMs of the Z2 Play, if you are going to download Nougat or Oreo it is recommended to choose the one that belongs to your update channel. https://mirrors.lolinet.com/firmware/moto/albus/official/

Update to Android 9 Pie with the official OTA method (locked bootloader) https://www.youtube.com/watch?v=n57v9r2jysw

Here ends the guide, for the Linux guide and the complete list of commands to manually flash the ROM you can check @HTCDevil's original guide: https://xdaforums.com/z2-play/how-to/fastboot-rom-oreo-retail-via-fastboot-t3786153