[Moto G5S Plus Questions & Answers] chiaotzu:
Hi guys,

I have Moto G5S Plus Indian variant phone - XT1804. I was trying to unlock the bootloader and root the phone. The phone already had stock firmware 8.1. During the process, I used the following firmware - SANDERS_OPS28.65-36_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.

The phone was able to unlock successfully, but during the boot, it is giving the following message:

Your device has been unlocked and can't be trusted again.

ID: bad key

Your device will boot in 5 seconds.

Although it says your device will boot in 5 seconds, nothing happens after 5 seconds. I am not to boot into the OS, but can into the fastboot mode by pressing volume down and power button. Below are my current getvar details:

(bootloader) version: 0.5

(bootloader) version-bootloader: moto-msm8953-C2.12

(bootloader) product: sanders

(bootloader) board: sanders

(bootloader) secure: yes

(bootloader) hwrev: P4

(bootloader) radio: 2

(bootloader) storage-type: emmc

(bootloader) emmc: 64GB SAMSUNG RC14MB 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) cid: 0x0032

(bootloader) channelid: 0xc0

(bootloader) uid: DC7B4C3F00000000000000000000

(bootloader) securestate: flashing_unlocked

(bootloader) iswarrantyvoid: yes

(bootloader) max-download-size: 534773760

(bootloader) reason: Volume down key pressed

(bootloader) meid:

(bootloader) date: 10-17-2017

(bootloader) sku: XT1804

(bootloader) carrier_sku:

(bootloader) battid: SB18C15119

(bootloader) iccid:

(bootloader) cust_md5:

(bootloader) max-sparse-size: 268435456

(bootloader) current-time: "Tue May 12 16:16:19 UTC 1970"

(bootloader) ro.build.fingerprint[0]: motorola/sanders_n/sanders_n:8.1.0

(bootloader) ro.build.fingerprint[1]: /OPS28.65-36/9fea:user/release-key

(bootloader) ro.build.fingerprint[2]: s

(bootloader) poweroffalarm: 0

(bootloader) ro.build.version.full[0]: Blur_Version.28.31.40.sanders.ret

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

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

(bootloader) version-baseband: M8953_27.36.07.41R SANDERS_INDIADSDS_CUST

(bootloader) kernel.version[0]: Linux version 3.18.71-perf-gd0e0d1a (hud

(bootloader) kernel.version[1]: soncm@ilclbld33) (gcc version 4.9.x 2015

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

(bootloader) kernel.version[3]: Fri Aug 10 22:52:41 CDT 2018

(bootloader) sbl1.git: git=MBM-NG-VC2.12-0-g698fb2f

(bootloader) rpm.git: git=MBM-NG-VC2.11-0-g92e5e21-dirty

(bootloader) tz.git: git=MBM-NG-VC2.11-1-g9a0b157

(bootloader) devcfg.git: git=MBM-NG-VC2.11-1-g9a0b157

(bootloader) keymaster.git: git=MBM-NG-VC2.11-1-g9a0b157

(bootloader) cmnlib.git: git=MBM-NG-VC2.11-1-g9a0b157

(bootloader) cmnlib64.git: git=MBM-NG-VC2.11-1-g9a0b157

(bootloader) prov.git: git=MBM-NG-VC2.11-1-g9a0b157

(bootloader) aboot.git: git=MBM-NG-VC2.12-0-g07ff23c

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

(bootloader) ro.carrier: retin

(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

I need help with three things.

1. Relock the bootloader and get back to Indian stock oreo 8.1 firmware. If you can provide the correct download link to restore stock firmware to Oreo 8.1.

2. Unlock the bootloader again with the correct stock ROM to get rid of the bad key message.

3. Possibly install twrp (not able to flash it right now) and PixelExperience ROM

I have tried the restore process with following commands on below firmwares, but does not help with locking the bootloader again.

fastboot getvar max-sparse-size

fastboot oem fb_mode_set

fastboot flash partition gpt.bin

fastboot flash bootloader bootloader.img

fastboot flash modem NON-HLOS.bin

fastboot flash fsg fsg.mbn

fastboot erase modemst1

fastboot erase modemst2

fastboot flash dsp adspso.bin

fastboot flash logo logo.bin

fastboot flash boot boot.img

fastboot flash recovery recovery.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 oem oem.img

fastboot erase cache

fastboot erase userdata

fastboot erase DDR

fastboot oem fb_mode_clear

fastboot erase customize

fastboot erase clogo

fastboot oem fb_mode_clear

fastboot reboot

I have tried with following steps to lock the bootloader with following commands, but still not working.

fastboot oem lock

fastboot oem lock

fastboot flash boot boot.img

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 boot boot.img

fastboot oem lock

I tried the above steps with the following firmware - SANDERS_RETAIL_8.1.0_OPSS28.65-36-6_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml, none of the steps are producing any errors except last. It is giving the following error in the last step.

(bootloader) Still require signed system.img and/or oem.img

Please help. :crying: