[Moto G5 Plus Questions & Answers] sda23:
Edit: SOLVED. Flashed 8.1.0 October update before rebooting and everything went fine

First I unlocked the bootloader using this guide.

Then I immediately flashed TWRP using this guide from the TWRP site. After rebooting, I was unable to access "Recovery" in the bootloader as I was shown an error message, "Moto G5 Plus is unlocked and can't be trusted, bad key error", as seen in this post. A user on the post said to flash the stock ROM and then reflash TWRP.

I rebooted into bootloader and flashed the Android 7.1 stock rom. While still in the bootloader, I then realized that I messed up and should've flashed the the 8.1.0 stock ROM as that is what the device initially had. I then download the 8.1.0 ROM from here and flash it in fastboot using this guide.

However, while flashing 8.1.0, the following errors were output (I removed the successful outputs):

fastboot oem fb_mode_set
OKAY [ 0.002s]
Finished. Total time: 0.003s
PS C:\Users\subha\Downloads\POTTER_RETAIL_8.1.0_OPS28.85-17_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml> fastboot f
lash partition gpt.bin
Sending 'partition' (45 KB) OKAY [ 0.006s]
Writing 'partition' (bootloader) Validating 'gpt.default.xml'
(bootloader) Security version downgrade
(bootloader) Image primary_gpt failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'gpt.default.xml'
FAILED (remote failure)
Finished. Total time: 0.079s
PS C:\Users\subha\Downloads\POTTER_RETAIL_8.1.0_OPS28.85-17_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml> fastboot f
lash boot boot.img
Sending 'boot' (16384 KB) OKAY [ 0.383s]
Writing 'boot' (bootloader) Image signed with key bad key
OKAY [ 0.258s]
Finished. Total time: 0.645s
PS C:\Users\subha\Downloads\POTTER_RETAIL_8.1.0_OPS28.85-17_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml> fastboot f
lash recovery recovery.img
Sending 'recovery' (20580 KB) OKAY [ 0.467s]
Writing 'recovery' (bootloader) Image signed with key bad key
OKAY [ 0.350s]
Finished. Total time: 0.823s
PS C:\Users\subha\Downloads\POTTER_RETAIL_8.1.0_OPS28.85-17_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml> fastboot e
rase customize
Erasing 'customize' (bootloader) Permission denied
FAILED (remote failure)
Finished. Total time: 0.007s
PS C:\Users\subha\Downloads\POTTER_RETAIL_8.1.0_OPS28.85-17_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml> fastboot e
rase clogo
Erasing 'clogo' (bootloader) Permission denied
FAILED (remote failure)
Finished. Total time: 0.120s

I'm still sitting in the bootloader as I'm afraid of rebooting in fear of potentially hardbricking the device. The

image_primary gpt

error in particular seems kind of scary - Googling it, it seems people only encountered it when hardbricking the device.

Here is an output of my

fastboot gervar all

:

(bootloader) version: 0.5
(bootloader) version-bootloader: moto-msm8953-C0.92
(bootloader) product: potter
(bootloader) board: potter
(bootloader) secure: yes
(bootloader) hwrev: P3B
(bootloader) radio: 1
(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) serialno: removed
(bootloader) cid: 0x0032
(bootloader) channelid: 0x8d
(bootloader) uid: removed
(bootloader) securestate: flashing_unlocked
(bootloader) iswarrantyvoid: yes
(bootloader) max-download-size: 534773760
(bootloader) reason: Reboot mode set to fastboot
(bootloader) imei: removed
(bootloader) meid:
(bootloader) date: 03-12-2017
(bootloader) sku: XT1687
(bootloader) carrier_sku:
(bootloader) battid:
(bootloader) iccid:
(bootloader) cust_md5:
(bootloader) max-sparse-size: 268435456
(bootloader) current-time: "Fri Jan 16 3:38:17 UTC 1970"
(bootloader) ro.build.fingerprint[0]: motorola/potter/potter:8.1.0/OPSS2
(bootloader) ro.build.fingerprint[1]: 8.85-17-2/945e:user/release-keys
(bootloader) poweroffalarm: 0
(bootloader) ro.build.version.full[0]: Blur_Version.28.211.2.potter.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: M8953_41.50.07.85R POTTER_NA_CUST
(bootloader) kernel.version[0]: Linux version 3.18.71-perf-gea366bb-0000
(bootloader) kernel.version[1]: 4-g7402761 (hudsoncm@ilclbld34) (gcc ver
(bootloader) kernel.version[2]: sion 4.9.x 20150123 (prerelease) (GCC) )
(bootloader) kernel.version[3]: #1 SMP PREEMPT Wed Oct 10 09:19:54 CDT
(bootloader) kernel.version[4]: 2018
(bootloader) sbl1.git: git=MBM-NG-VC0.92-0-gd009c3b
(bootloader) rpm.git: git=MBM-NG-VC0.91-0-g92e5e21-dirty
(bootloader) tz.git: git=MBM-NG-VC0.91-2-g26cc248-dirty
(bootloader) devcfg.git: git=MBM-NG-VC0.91-2-g26cc248-dirty
(bootloader) keymaster.git: git=MBM-NG-VC0.91-2-g26cc248-dirty
(bootloader) cmnlib.git: git=MBM-NG-VC0.91-2-g26cc248-dirty
(bootloader) cmnlib64.git: git=MBM-NG-VC0.91-2-g26cc248-dirty
(bootloader) prov.git: git=MBM-NG-VC0.91-2-g26cc248-dirty
(bootloader) aboot.git: git=MBM-NG-VC0.92-0-g3ea8df0
(bootloader) frp-state: no protection (0)
(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
all: listed above
Finished. Total time: 0.273s

Is my device okay, and am I okay to reboot? If something is wrong, is there anything I can do to fix it? Thanks!