[Android Q&A, Help & Troubleshooting] devhere_:
Sorry for my broken English,

Hey guys i just unlocked the boot-loader to install android 9.0 in it to just enjoy android PIE

and another day i didn't find that custom ROM stable so i flashed the android 7.0 nougat Rom in it through a video a guy posted(how to go back to stock Rom)

Stock Rom name - XT1681-XT1683_POTTER_BRASIL_LATAM_MEXICO_NPN25.137-15_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml (this is the Rom that i had flashed)

and after that an OTA update just arrived and i quickly started downloading it and after it was going to update through restating the phone it just got hard bricked

i searched the whole day then got a fix through QCOM blank-flash file okayyy then went back to boot-loader,

and after this i have tried every moto g5 plus rom out there but none of it works

i have even tried to flashed the latest firmware

Name - XT1686_POTTER_RETIN_8.1.0_OPS28.85-17-6-2_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml

but still the boot-loader says security version downgrade,

.

.

This is exactly what it says :

writing 'bootloader'...

(bootloader) Validating 'bootloader.default.xml'

(bootloader) Security version downgrade

(bootloader) Image tz failed validation

(bootloader) Preflash validation failed

(bootloader) Security version downgrade

(bootloader) Image devcfg failed validation

(bootloader) Preflash validation failed

(bootloader) Cancelling 'bootloader.default.xml'

FAILED (remote failure)

finished. total time: 0.501s

.

i have tried to boot into recovery through TWRP and the Stock and had done everything but it loops in this

{ Your device has been unlocked and cant be trusted.

to learn more , visit motorola bla bla bla

ID: bad key

Your device will boot in 5 seconds. }

.

.

.

.

This is the fastboot getvar all about bootloader

-

(bootloader) version: 0.5

(bootloader) version-bootloader: moto-msm8953-C0.C5

(bootloader) product: potter

(bootloader) board: potter

(bootloader) secure: yes

(bootloader) hwrev: P3B

(bootloader) radio: 6

(bootloader) storage-type: emmc

(bootloader) emmc: 32GB SAMSUNG RX14MB RV=08 PV=07 FV=0000000000000007

(bootloader) ram: 4GB SAMSUNG LP3 DIE=8Gb M5=01 M6=05 M7=00 M8=5F

(bootloader) cpu: MSM8953

(bootloader) serialno: ZY2243GTRP

(bootloader) cid: 0x0032

(bootloader) channelid: 0xc0

(bootloader) uid: 00409F3400000000000000000000

(bootloader) securestate: flashing_unlocked

(bootloader) iswarrantyvoid: yes

(bootloader) max-download-size: 536870912

(bootloader) reason: Volume down key pressed

(bootloader) imei: 351892082852554

(bootloader) meid:

(bootloader) date: 03-28-2017

(bootloader) sku: XT1686

(bootloader) battid:

(bootloader) iccid:

(bootloader) cust_md5:

(bootloader) max-sparse-size: 268435456

(bootloader) current-time: "Tue Jan 13 20: 0: 2 UTC 1970"

(bootloader) ro.build.fingerprint[0]: motorola/potter_n/potter_n:7.0/NPN

(bootloader) ro.build.fingerprint[1]: 25.137-15/14:user/release-keys

(bootloader) poweroffalarm: 0

(bootloader) ro.build.version.full[0]: Blur_Version.25.11.14.potter.reta

(bootloader) ro.build.version.full[1]: il.en.US

(bootloader) ro.build.version.qcom: LA.UM.5.6.r1-01900-89xx.0

(bootloader) version-baseband[0]: M8953_8000.128.06.42u POTTER_INDIADSDS

(bootloader) version-baseband[1]: _CUST

(bootloader) kernel.version[0]: Linux version 3.18.31-perf-g708ac5e (hud

(bootloader) kernel.version[1]: soncm@ilclbld34) (gcc version 4.9 201501

(bootloader) kernel.version[2]: 23 (prerelease) (GCC) ) #1 SMP PREEMPT T

(bootloader) kernel.version[3]: hu Jan 12 12:24:19 CST 2017

(bootloader) sbl1.git: git=MBM-NG-VC0.C5-0-g98be833

(bootloader) rpm.git: git=MBM-NG-VC0.C5-0-g5578f74

(bootloader) tz.git: git=MBM-NG-VC0.C5-0-g3d71f29

(bootloader) devcfg.git: git=MBM-NG-VC0.C5-0-g3d71f29

(bootloader) keymaster.git: git=MBM-NG-VC0.C5-0-g3d71f29

(bootloader) cmnlib.git: git=MBM-NG-VC0.C5-0-g3d71f29

(bootloader) cmnlib64.git: git=MBM-NG-VC0.C5-0-g3d71f29

(bootloader) prov.git: git=MBM-NG-VC0.C5-0-g3d71f29

(bootloader) aboot.git: git=MBM-NG-VC0.C5-0-g99aa1c1

(bootloader) qe: qe 0/0

(bootloader) frp-state: no protection (0)

(bootloader) ro.carrier: retin

.

.

.

please guys every help is appreciated

thank you in advanceeeee :(