[Moto G5 Questions & Answers] GrizzlyBear45:
So, long story short, a friend of mine endend up buying a new smartphone because his Moto G5 (XT1676, country: Italy) didn't startup anymore. He gave it to me.

There was a black screen with "Your device has failed verification and may not work properly.".

I've done some research and find out it happened a lot on many moto devices, and a common cause was an android crash or failure during an OTA update.

So, the smartphone was never rooted, nor had the usb debugging enabled nor was bootloader unlocked.

I somehow managed to flash a stock ROM(CEDRIC_RETAIL_8.1.0_OPPS28.85-13-6_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip. I picked this one becuase it was the one it was already installed, altough it was corrupted) from the fastboot using a PC.

It loaded up and everything was working fine on first startup.

I then decided to unlock the bootloader, just in case, and tried to install TWRP + Magisk.

Before doing that, I actually never tried to reboot more than 1 time.

Now, I can't tell if the smartphone was already unstable, but at this point it started to reboot itself very randomly:

freezing during boot animation and then reboot itself;

arrriving at android setup with language selection etc. and then reboot itself;

never even arrive at boot animation, just to the logo, and the reboot itself.

But just most of the times. Sometimes I can actually get into the phone and use it normally, until I reboot or power off and startup again. Sometimes it reboots like 6 times and finally get to works. So, very unstable.

I tried of course to remove Magisk and TWRP reflashing the same ROM, but also other stock ROMs like:

CEDRIC_RETAIL_8.1.0_OPP28.85-19-4-2_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

XT1676_CEDRIC_RETEU_DS_8.1.0_OPPS28.85-13-6_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml

XT1676_CEDRIC_TEFES_8.1.0_OPPS28.85-19-4_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml

And always got the same strange behaviour.

So, now I got no TWRP, no Magisk. Just trying to get the stock rom to be stable and I ran out of ideas.

Bonus facts:

It's the first time I try to do something like this. I already rooted my personal Moto G3 and flashed TWRP but never flashed any ROM. So please excuse me if I may say of have done something really wrong.

I followed the procedure descripted by [MENTION=4728903]TheFixItMan[/MENTION] : https://xdaforums.com/g5/help/moto-g5-stuck-bootloop-t3915569 , no errors during the flash.

The battery of the smartphone may not be in its best health, because sometimes give the system wrong info about the charge status.(For example, power off at 93%,reboot and get 80%). I have been thinking that maybe the failure happened during the update that broke everything was due to battery failure.

Any help would be really appreciated. The smartphone would be already in trash because my friend is not that of a nerd. I would like to save it and maybe use it myself in replace of my Moto G3. I would also like to use it with root, but for know it would be enough to get it to work properly on non rooted stock rom.

Thank you in advance!

Video proof of the behaviour right after flashing a stock rom: https://streamable.com/tgu9o

fastboot getvar all:

Microsoft Windows [Versione 10.0.18362.418]
(c) 2019 Microsoft Corporation. Tutti i diritti sono riservati.

C:\Users\***>fastboot getvar all
(bootloader) version: 0.5
(bootloader) version-bootloader: moto-msm8937-B8.31
(bootloader) product: cedric
(bootloader) board: cedric
(bootloader) secure: yes
(bootloader) hwrev: P5
(bootloader) radio: 4
(bootloader) storage-type: emmc
(bootloader) emmc: 16GB SKHYNIX HAG4a2 RV=08 PV=A4 FV=00000000000000A4
(bootloader) ram: 2GB SKHYNIX LP3 DIE=8Gb M5=06 M6=04 M7=00 M8=1F
(bootloader) cpu: MSM8937
(bootloader) serialno: ZY3222JCMF
(bootloader) cid: 0x0032
(bootloader) channelid: 0x40
(bootloader) uid: 3E7D58F000000000000000000000
(bootloader) securestate: flashing_unlocked
(bootloader) iswarrantyvoid: yes
(bootloader) max-download-size: 535822336
(bootloader) reason: Volume down key pressed
(bootloader) imei: *
(bootloader) meid:
(bootloader) date: 02-22-2017
(bootloader) sku: XT1676
(bootloader) carrier_sku:
(bootloader) battid:
(bootloader) iccid:
(bootloader) cust_md5:
(bootloader) max-sparse-size: 268435456
(bootloader) current-time: "Tue Mar 5 0: 8:17 UTC 2019"
(bootloader) ro.build.fingerprint[0]: motorola/cedric/cedric:8.1.0/OPPS2
(bootloader) ro.build.fingerprint[1]: 8.85-13-6/04442:user/release-keys
(bootloader) poweroffalarm: 0
(bootloader) ro.build.version.full[0]: Blur_Version.28.271.7.cedric.reta
(bootloader) ro.build.version.full[1]: il.en.US
(bootloader) ro.build.version.qcom: LA.UM.6.6.r1-08600-89xx.0
(bootloader) version-baseband: <not found>
(bootloader) kernel.version[0]: Linux version 3.18.71-perf-g6fc7aba (hud
(bootloader) kernel.version[1]: soncm@ilclbld33) (gcc version 4.8 (GCC)
(bootloader) kernel.version[2]: ) #1 SMP PREEMPT Thu Feb 7 01:47:04 CST
(bootloader) kernel.version[3]: 2019
(bootloader) sbl1.git: git=MBM-NG-VB8.31-0-g77d3670
(bootloader) rpm.git: git=bd76357-dirty
(bootloader) tz.git: git=4942431
(bootloader) devcfg.git: git=4942431
(bootloader) keymaster.git: git=4942431
(bootloader) cmnlib.git: git=4942431
(bootloader) cmnlib64.git: git=4942431
(bootloader) prov.git: git=4942431
(bootloader) aboot.git: git=MBM-NG-VB8.31-0-g0b9dae9
(bootloader) frp-state: no protection (0)
(bootloader) ro.carrier: reteu
(bootloader) current-slot:
(bootloader) slot-suffixes: _a
(bootloader) slot-count: 1
(bootloader) slot-successful:_a: INVALID
(bootloader) slot-successful:_b: INVALID
(bootloader) slot-bootable:_a: INVALID
(bootloader) slot-bootable:_b: INVALID
(bootloader) slot-retry-count:_a: unknown
(bootloader) slot-retry-count:_b: unknown
all: listed above
finished. total time: 0.062s