[Moto G5 Guides, News, & Discussion] freeZbies:
Someone managed to get the RSD Secure link for the FASTBOOT files of the final Oreo 8.1 release for RETAIL Moto G5/cedric.

With these files you'll be able to update to official oreo, relock your bootloader or simply go back to stock.

Using the guide I'll write below you'll be able to flash it from Linux, Windows and MacOS.

The new firmware is named OPP28.85-16 and Blur Version listed within the firmware package is:

Blur_Version.28.41.15.cedric.retail.en.US

whereas the OTA file for the corresponding Firmware lists it as:

Blur_Version.25.361.10.cedric.retail.en.US

I dont know which is "correct", but anyways, this should not alter your results when flashing this with fastboot.

DOWNLOAD

Gdrive: https://drive.google.com/file/d/1gNB7vNM8xH5ueTPKh5Qwev87gJpSpyyK/view?usp=sharing

RSD Secure: https://rsdsecure-cloud.motorola.co...ubsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

FLASHING IT

If your seeing this post long after Setember 2018 it may be the case you have updated your firmware past this one and got a different bootloader version, in that case, make sure to check you bootloader version is BELOW B8.31. Flashing bootloader of equal or minor version will hardbrick your device

UPDATING FROM PREVIOUS ANDROID VERSION

1. If you're on Windows/Mac, download motorola USB drivers here. (You shouldn't need these on Linux)

2. Download Android Platform Tools (ADB & Fastboot ) for Windows/Mac/ Linux here (if you're on Linux, get these from your distro's repo instead).

3. Extract the platform tools somewhere

4. Extract the firmware's ZIP too (I recommend extracting it to the same directory as platform tools, this will make your life easier).

5.Open a command prompt/terminal where you extracted platform tools (To do that on windows, Hold SHIFT + right Click some blank area within platform-tools directory, then click "Open Command Prompt Here".

6. Reboot into fastboot (power off and connect USB while holding Vol Down) and Execute the following commands

fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata

7. Reboot your phone by typing fastboot reboot or by selecting the "START" option in phone's screen and then pressing the power button

PS: Do not execute commands related to erasing the modemst1 and modemst2 partitions. This has been related to people losing their IMEI's.

RELOCKING YOUR BOOTLOADER

edit

Seems like my instructions on how to relock didn't work, but I want to thank Andrej_SK, who managed to do it and posted instructions on how to do it. Just remember that you should Not flash bootloader if you're already on B8.31 or past it. Flashing gpt.bin can also hardbrick your phone and there have been reports of it happening here on XDA and on telegram. I personally didn't flash it when moving from NPPS25.137-93-2-5 and had no problem at all, and I think you shouldn't too, unless you know you absolutely need it (which I think is unlikely, since the partition scheme looks the same on both nougat and Oreo)

DOWNGRADING FROM A FIRMWARE NEWER THAN OPP28.85-16

1. Follow steps one 1 up to five described in the first section UPDATING FROM PREVIOUS ANDROID VERSION

2. Omit these lines from step 6:

fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img

Notice that omitting these two lines is VERY IMPORTANT if you're downgrading, otherwise you'll hardbrick your device.

3.7. Reboot your phone by typing fastboot reboot or by selecting the "START" option in phone's screen and then pressing the power button

That's it. If you liked, press thanks

Ps: some of my friends have reported phone is rebooting right after flashing sparsechunk.5.

phone will apparently boot normally and show the setup wizard screen, but in actuality there will be missing files on the system partition.

in that case, reboot into fastboot and finish flashing the system normally, then boot your phone