[Moto G5S Plus Questions & Answers] jpurban:
Hi,

I could use some help... One of my G5S Plus phones boots into stock recovery "No command" screen every time I power on. I work around this by entering the stock recovery (Power + Vol Up) and selecting bootloader. Once bootloader loads, I simply hit start and the phone boots properly. All else seems fine -- operation is good.

I've had this issue ever since I unlocked/rooted/TWRP/magisk when I first got the phone. To be honest, I'm not sure I got the mods installed correctly, which is why I have given up and returned to stock. So, I recently flashed the stock Oreo via fastboot and relocked the bootloader. Again, all works fine except for the boot to recovery mode after powering up.

I researched the forum on this issue, but didn't find any solution, though it seems many others have the issue. I'm hoping there is a guru here that knows how to fix this. Examples of others with similar issues:

https://xdaforums.com/android/help/moto-g5s-plus-twrp-recovery-boot-loop-t3762077

https://xdaforums.com/moto-g4-plus/help/moto-g4-plus-recovery-boot-loop-t3772621

https://xdaforums.com/moto-g4/help/moto-g4-recovery-boot-loop-t3608348

One thing I did find here on the forums... but it was related to the G5 -- Something to do with the misc partition???:

https://xdaforums.com/g5/how-to/fix-phone-reboots-recovery-mode-started-t3705325

Here's my Getvar all...

(bootloader) version: 0.5
(bootloader) version-bootloader: moto-msm8953-C2.12
(bootloader) product: sanders
(bootloader) board: sanders
(bootloader) secure: yes
(bootloader) hwrev: P5
(bootloader) radio: 5
(bootloader) storage-type: emmc
(bootloader) emmc: 32GB SAMSUNG RX1BMB RV=08 PV=07 FV=0000000000000007
(bootloader) ram: 3GB SAMSUNG LP3 DIE=6Gb M5=01 M6=05 M7=00 M8=7B
(bootloader) cpu: MSM8953
(bootloader) serialno: Deleted
(bootloader) cid: 0x0032
(bootloader) channelid: 0x8d
(bootloader) uid: E3DC2DC800000000000000000000
(bootloader) securestate: oem_locked
(bootloader) iswarrantyvoid: yes
(bootloader) max-download-size: 534773760
(bootloader) reason: Volume down key pressed
(bootloader) imei: Deleted
(bootloader) meid:
(bootloader) date: 09-17-2017
(bootloader) sku: XT1806
(bootloader) carrier_sku:
(bootloader) battid: SB18C15119
(bootloader) iccid:
(bootloader) cust_md5:
(bootloader) max-sparse-size: 268435456
(bootloader) current-time: "Mon May 11 10: 8:29 UTC 1970"
(bootloader) ro.build.fingerprint[0]: motorola/sanders/sanders:8.1.0/OPS
(bootloader) ro.build.fingerprint[1]: 28.65-36/9fea:user/release-keys
(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_41.50.07.79R SANDERS_NA_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 (77)
(bootloader) ro.carrier: retus
(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

Here are the commands I used to flash -- I tried to erase DDR, but permission was denied:

fastboot oem fb_mode_set
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 system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot oem fb_mode_clear

Followed by these commands to relock the bootloader

fastboot oem lock
fastboot oem lock
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 system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash boot boot.img
fastboot oem lock