[Android Q&A, Help & Troubleshooting] simon917:
Hello folks!

Long time lurker. Now it's me who's bricked their phone and needs help. I've already put over 30 hs troubleshooting this and I'm out of options.

I'm trying to revive a moto E5 Plus (XT1924-5).I fiddled with it trying to flash it back to stock and relock it.

It now boots directly into bootloader and probably needs stock to be reflashed. The problem is that flashing is locked and I cannot enable OEM unlock since I cannot access system. Information below:

fastboot getvar all
(bootloader) version: 0.5
(bootloader) version-bootloader: moto-msm8917-BE.4F
(bootloader) product: hannah
(bootloader) board: hannah
(bootloader) secure: yes
(bootloader) hwrev: P3
(bootloader) radio: 1
(bootloader) storage-type: emmc
(bootloader) emmc: 16GB SAMSUNG QE63MB RV=08 PV=03 FV=0000000000000003
(bootloader) ram: 2GB SAMSUNG LP3 DIE=8Gb M5=01 M6=06 M7=00 M8=1F
(bootloader) cpu: MSM8917
(bootloader) serialno: -----------
(bootloader) cid: 0x0032
(bootloader) channelid: 0x1a
(bootloader) uid: D8912C2100000000000000000000
(bootloader) securestate: flashing_locked
(bootloader) iswarrantyvoid: yes
(bootloader) max-download-size: 535822336
(bootloader) reason: UTAG "bootmode" configured as fastboot
(bootloader) imei: -----------
(bootloader) meid:
(bootloader) date: 09-20-2018
(bootloader) sku: XT1924-5
(bootloader) carrier_sku: XT1924-5
(bootloader) battid: SNN5989A
(bootloader) iccid:
(bootloader) cust_md5:
(bootloader) max-sparse-size: 268435456
(bootloader) current-time: "Sun Dec 29 3: 6:21 UTC 2019"
(bootloader) ro.build.fingerprint[0]: motorola/rhannah/rhannah:8.0.0/OPP
(bootloader) ro.build.fingerprint[1]: S27.91-179-8-9/14:user/release-key
(bootloader) ro.build.fingerprint[2]: s
(bootloader) poweroffalarm: 0
(bootloader) ro.build.version.full[0]: Blur_Version.27.311.14.rhannah.re
(bootloader) ro.build.version.full[1]: tail.en.US
(bootloader) ro.build.version.qcom: LA.UM.6.6.r1-04400-89xx.0
(bootloader) version-baseband: M8917_34.42.05.98R HANNAH_LATAM_CUST
(bootloader) kernel.version[0]: Linux version 3.18.71-perf-gb6c3df7 (hud
(bootloader) kernel.version[1]: soncm@ilclbld68) (gcc version 4.8 (GCC)
(bootloader) kernel.version[2]: ) #1 SMP PREEMPT Thu Dec 26 12:21:11 CST
(bootloader) kernel.version[3]: 2019
(bootloader) sbl1.git: git=MBM-NG-VBE.4F-0-g8ffb6ee
(bootloader) rpm.git: git=02a0726-dirty
(bootloader) tz.git: git=f9c74b2
(bootloader) devcfg.git: git=f9c74b2
(bootloader) keymaster.git: git=f9c74b2
(bootloader) cmnlib.git: git=f9c74b2
(bootloader) cmnlib64.git: git=f9c74b2
(bootloader) prov.git: git=f9c74b2
(bootloader) aboot.git: git=MBM-NG-VBE.4F-0-g4e3d3ac
(bootloader) frp-state: no protection (0)
(bootloader) ro.carrier: retar
(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.119s

>fastboot oem unlock
...
(bootloader) invalid boot state
OKAY [ 0.003s]
finished. total time: 0.004s

fastboot flashing unlock
...
(bootloader) Check 'Allow OEM Unlock' in Android Settings > Developer
(bootloader) Options.
OKAY [ 0.005s]
finished. total time: 0.006s

I've already tried the following:

1) Flash Stock downloaded from lolinet (firmware/moto/rhannah/official/RETAR/) and from Lenovo Moto Smart Assistant. They fail because flashing is locked.

2) Flashing through Lenovo Moto Smart Assistant. It fails with no comment/log. Probably because of the above.

3) Flashing boot and recovery using TWRP, then try to boot and/or flash stock. No luck.

4) I tried to change the flashing_locked flag using "adb shell setprop ro.oem_unlock_supported 1" and "adb shell setprop ro.oem_unlock_allowed 1". The flags don't get saved after the phone boots again into fastboot.

4) booting stock image using "fastboot boot boot.im" and try to flash stock. It's still not allowed.

As far as I know the potential solutions may be:

a) build a TWRP flashable image using the stock images. I tried doing it using ASSAYYED_KITCHEN but it does not seem to support sparsechung system images. I'm blocked.

b) intentionally hardbrick the phone and blankflash it. I don't know how to harbrick it and I don't have access to the blankflash image.

Any help or guidance may be highly appreciated :fingers-crossed:. Thanks os much in advance!