[Moto G6 Questions & Answers] frenksisco:
Hi, please help. I know little about it so even if you don't have the solution please tell me something, even the most obvious thing. Anything... I have brought back stock after root my Moto G6 Plus XT1926-3 following some guides including yours but I keep getting the System integrity is compromised in updates , SafetyNet CTS profile match: Fail, Play Protect: device is not certified.

So my banking apps no longer work and it is a monstrous mess for me.

I am writing you exactly what I understand from your directions to check if I am doing something wrong.

SITUATION BEFOR YOUR GUIDE

Root removed, re-flashed to stock rom with Lenovo RSA at least 3 times, and 10 more manual flash with guides like this but nothing worked (I mean for solving system integrity etc..)

Actual Rom situation: fully functional PPW29.116-20-28 stock rom found here except for the security issues mentioned above. Also re-unlocked the bootloader with "fastboot oem unlock (mycode)" to be able to follow your procedure.

Bootloader check with "fastboot getvar securestate" returns "securestate: flashing_unlocked" ok

START YOUR GUIDE POINT 1.

I flash stock ROM "XT1926-3_EVERT_RETEU_DS_9.0_PPW29.116-20-28_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip" found here with this series of commands run from .bat file

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 bluetooth BTFM.bin
fastboot flash dsp dspso.bin
fastboot flash boot boot.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_b system_b.img_sparsechunk.0
fastboot flash system_b system_b.img_sparsechunk.1
fastboot flash oem oem.img
fastboot flash oem_b oem_other.img
fastboot flash vendor vendor.img_sparsechunk.0
fastboot flash vendor vendor.img_sparsechunk.1
fastboot erase carrier
fastboot erase userdata
fastboot erase DDR
fastboot flash logo logo.bin
fastboot reboot

Its output is this below and as you can see there are many "Command failed" and "not found" I don't understand

G:\prova4>fastboot flash partition gpt.bin
(bootloader) is-logical:partition: not found
(bootloader) is-logical:partition: not found
(bootloader) is-logical:partition: not found
Warning: skip copying partition image avb footer (partition partition size: 0, partition image size: 38400).
Sending 'partition' (37 KB) OKAY [ 0.005s]
Writing 'partition' (bootloader) Validating 'gpt.default.xml'
(bootloader) Committing 'gpt.default.xml'
(bootloader) - flashing 'gpt_main0.bin' to 'partition:0'
OKAY [ 0.115s]
Finished. Total time: 0.125s

G:\prova4>fastboot flash bootloader bootloader.img
(bootloader) is-logical:bootloader: not found
(bootloader) is-logical:bootloader: not found
(bootloader) is-logical:bootloader: not found
Warning: skip copying bootloader image avb footer (bootloader partition size: 0, bootloader image size: 9748736).
Sending 'bootloader' (9520 KB) OKAY [ 0.226s]
Writing 'bootloader' (bootloader) Validating 'bootloader.default.xml'
(bootloader) Committing 'bootloader.default.xml'
(bootloader) - flashing 'xbl.elf' to 'xbl'
(bootloader) - flashing 'prov64.mbn' to 'prov'
(bootloader) - flashing 'cmnlib.mbn' to 'cmnlib'
(bootloader) - flashing 'cmnlib64.mbn' to 'cmnlib64'
(bootloader) - flashing 'abl.elf' to 'abl'
(bootloader) - flashing 'keymaster.mbn' to 'keymaster'
(bootloader) - flashing 'storsec.mbn' to 'storsec'
(bootloader) - flashing 'rpm.mbn' to 'rpm'
(bootloader) - flashing 'pmic.elf' to 'pmic'
(bootloader) - flashing 'hyp.mbn' to 'hyp'
(bootloader) - flashing 'tz.mbn' to 'tz'
(bootloader) - flashing 'devcfg.mbn' to 'devcfg'
OKAY [ 0.190s]
Finished. Total time: 0.420s

G:\prova4>fastboot flash modem NON-HLOS.bin
(bootloader) is-logical:modem_a: not found
(bootloader) is-logical:modem_a: not found
Sending 'modem_a' (77976 KB) OKAY [ 1.800s]
Writing 'modem_a' OKAY [ 5.394s]
Finished. Total time: 7.251s

G:\prova4>fastboot flash fsg fsg.mbn
(bootloader) is-logical:fsg_a: not found
(bootloader) is-logical:fsg_a: not found
Sending 'fsg_a' (7412 KB) OKAY [ 0.170s]
Writing 'fsg_a' OKAY [ 0.062s]
Finished. Total time: 0.242s

G:\prova4>fastboot erase modemst1
Erasing 'modemst1' OKAY [ 0.014s]
Finished. Total time: 0.014s

G:\prova4>fastboot erase modemst2
Erasing 'modemst2' OKAY [ 0.000s]
Finished. Total time: 0.000s

G:\prova4>fastboot flash bluetooth BTFM.bin
(bootloader) is-logical:bluetooth_a: not found
(bootloader) is-logical:bluetooth_a: not found
Sending 'bluetooth_a' (400 KB) OKAY [ 0.012s]
Writing 'bluetooth_a' OKAY [ 0.008s]
Finished. Total time: 0.023s

G:\prova4>fastboot flash dsp dspso.bin
(bootloader) is-logical:dsp_a: not found
(bootloader) is-logical:dsp_a: not found
Sending 'dsp_a' (16384 KB) OKAY [ 0.375s]
Writing 'dsp_a' OKAY [ 0.110s]
Finished. Total time: 0.495s

G:\prova4>fastboot flash boot boot.img
(bootloader) is-logical:boot_a: not found
(bootloader) is-logical:boot_a: not found
Sending 'boot_a' (22301 KB) OKAY [ 0.515s]
Writing 'boot_a' OKAY [ 0.598s]
Finished. Total time: 1.135s

G:\prova4>fastboot flash system system.img_sparsechunk.0
(bootloader) is-logical:system_a: not found
(bootloader) is-logical:system_a: not found
Sending 'system_a' (524284 KB) OKAY [ 12.095s]
Writing 'system_a' OKAY [ 4.090s]
Finished. Total time: 16.526s

G:\prova4>fastboot flash system system.img_sparsechunk.1
(bootloader) is-logical:system_a: not found
(bootloader) is-logical:system_a: not found
Sending 'system_a' (524284 KB) OKAY [ 12.083s]
Writing 'system_a' OKAY [ 3.604s]
Finished. Total time: 16.015s

G:\prova4>fastboot flash system system.img_sparsechunk.2
(bootloader) is-logical:system_a: not found
(bootloader) is-logical:system_a: not found
Sending 'system_a' (524284 KB) OKAY [ 12.121s]
Writing 'system_a' OKAY [ 3.612s]
Finished. Total time: 16.059s

G:\prova4>fastboot flash system system.img_sparsechunk.3
(bootloader) is-logical:system_a: not found
(bootloader) is-logical:system_a: not found
Sending 'system_a' (490268 KB) OKAY [ 11.337s]
Writing 'system_a' OKAY [ 3.370s]
Finished. Total time: 15.025s

G:\prova4>fastboot flash system system.img_sparsechunk.4
(bootloader) is-logical:system_a: not found
(bootloader) is-logical:system_a: not found
Sending 'system_a' (441812 KB) OKAY [ 10.174s]
Writing 'system_a' OKAY [ 3.050s]
Finished. Total time: 13.504s

G:\prova4>fastboot flash system_b system_b.img_sparsechunk.0
fastboot: error: cannot load 'system_b.img_sparsechunk.0': No such file or directory

G:\prova4>fastboot flash system_b system_b.img_sparsechunk.1
fastboot: error: cannot load 'system_b.img_sparsechunk.1': No such file or directory

G:\prova4>fastboot flash oem oem.img
(bootloader) is-logical:oem_a: not found
(bootloader) is-logical:oem_a: not found
Sending 'oem_a' (104376 KB) OKAY [ 2.410s]
Writing 'oem_a' OKAY [ 0.744s]
Finished. Total time: 3.228s

G:\prova4>fastboot flash oem_b oem_other.img
(bootloader) is-logical:oem_b: not found
(bootloader) is-logical:oem_b: not found
Sending 'oem_b' (19624 KB) OKAY [ 0.452s]
Writing 'oem_b' OKAY [ 0.152s]
Finished. Total time: 0.622s

G:\prova4>fastboot flash vendor vendor.img_sparsechunk.0
(bootloader) is-logical:vendor_a: not found
(bootloader) is-logical:vendor_a: not found
Sending 'vendor_a' (524284 KB) OKAY [ 12.081s]
Writing 'vendor_a' OKAY [ 3.727s]
Finished. Total time: 16.145s

G:\prova4>fastboot flash vendor vendor.img_sparsechunk.1
(bootloader) is-logical:vendor_a: not found
(bootloader) is-logical:vendor_a: not found
Sending 'vendor_a' (105284 KB) OKAY [ 2.426s]
Writing 'vendor_a' OKAY [ 0.720s]
Finished. Total time: 3.219s

G:\prova4>fastboot erase carrier
Erasing 'carrier' OKAY [ 0.012s]
Finished. Total time: 0.013s

G:\prova4>fastboot erase userdata
Erasing 'userdata' OKAY [ 0.489s]
Finished. Total time: 0.490s

G:\prova4>fastboot erase DDR
Erasing 'DDR' (bootloader) Invalid partition name DDR
FAILED (remote: '')
fastboot: error: Command failed

G:\prova4>fastboot flash logo logo.bin
(bootloader) is-logical:logo_a: not found
(bootloader) is-logical:logo_a: not found
Sending 'logo_a' (2384 KB) OKAY [ 0.055s]
Writing 'logo_a' OKAY [ 0.030s]
Finished. Total time: 0.092s

G:\prova4>fastboot reboot
Rebooting OKAY [ 0.000s]
Finished. Total time: 0.001s

GUIDE POINT 2 AND 3

The phone reboots, starts normally without any problems, everything works perfectly.

I don't check for security issues because I know it's there.....

GUIDE POINT 4

Re-lock the bootloader by putting your commands in a .bat file

fastboot oem lock
fastboot oem lock
fastboot oem lock
fastboot flash boot boot.img
fastboot oem lock
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 vendor vendor.img_sparsechunk.0
fastboot flash vendor vendor.img_sparsechunk.1
fastboot flash oem oem.img
fastboot oem lock
fastboot reboot

Its output this and again many "Command failed" and "not found"

G:\prova4>fastboot oem lock
(bootloader) ***************************************
(bootloader) WARNING: This command erases user data!
(bootloader) Please re-run this command to confirm.
(bootloader) ***************************************
OKAY [ 0.006s]
Finished. Total time: 0.011s

G:\prova4>fastboot oem lock
(bootloader) Bootloader is now locked
OKAY [ 0.724s]
Finished. Total time: 0.729s

G:\prova4>fastboot oem lock
(bootloader) Already locked
OKAY [ 0.000s]
Finished. Total time: 0.000s

G:\prova4>fastboot flash boot boot.img
(bootloader) is-logical:boot_a: not found
(bootloader) is-logical:boot_a: not found
Sending 'boot_a' (22301 KB) OKAY [ 0.515s]
Writing 'boot_a' (bootloader) flash permission denied
FAILED (remote: '')
fastboot: error: Command failed

G:\prova4>fastboot oem lock
(bootloader) Already locked
OKAY [ 0.000s]
Finished. Total time: 0.000s

G:\prova4>fastboot flash system system.img_sparsechunk.0
(bootloader) is-logical:system_a: not found
(bootloader) is-logical:system_a: not found
Sending 'system_a' (524284 KB) OKAY [ 12.095s]
Writing 'system_a' (bootloader) flash permission denied
FAILED (remote: '')
fastboot: error: Command failed

G:\prova4>fastboot flash system system.img_sparsechunk.1
(bootloader) is-logical:system_a: not found
(bootloader) is-logical:system_a: not found
Sending 'system_a' (524284 KB) OKAY [ 12.085s]
Writing 'system_a' (bootloader) flash permission denied
FAILED (remote: '')
fastboot: error: Command failed

G:\prova4>fastboot flash system system.img_sparsechunk.2
(bootloader) is-logical:system_a: not found
(bootloader) is-logical:system_a: not found
Sending 'system_a' (524284 KB) OKAY [ 12.119s]
Writing 'system_a' (bootloader) flash permission denied
FAILED (remote: '')
fastboot: error: Command failed

G:\prova4>fastboot flash system system.img_sparsechunk.3
(bootloader) is-logical:system_a: not found
(bootloader) is-logical:system_a: not found
Sending 'system_a' (490268 KB) OKAY [ 11.330s]
Writing 'system_a' (bootloader) flash permission denied
FAILED (remote: '')
fastboot: error: Command failed

G:\prova4>fastboot flash system system.img_sparsechunk.4
(bootloader) is-logical:system_a: not found
(bootloader) is-logical:system_a: not found
Sending 'system_a' (441812 KB) OKAY [ 10.170s]
Writing 'system_a' (bootloader) flash permission denied
FAILED (remote: '')
fastboot: error: Command failed

G:\prova4>fastboot flash vendor vendor.img_sparsechunk.0
(bootloader) is-logical:vendor_a: not found
(bootloader) is-logical:vendor_a: not found
Sending 'vendor_a' (524284 KB) OKAY [ 12.075s]
Writing 'vendor_a' (bootloader) flash permission denied
FAILED (remote: '')
fastboot: error: Command failed

G:\prova4>fastboot flash vendor vendor.img_sparsechunk.1
(bootloader) is-logical:vendor_a: not found
(bootloader) is-logical:vendor_a: not found
Sending 'vendor_a' (105284 KB) OKAY [ 2.426s]
Writing 'vendor_a' (bootloader) flash permission denied
FAILED (remote: '')
fastboot: error: Command failed

G:\prova4>fastboot flash oem oem.img
(bootloader) is-logical:oem_a: not found
(bootloader) is-logical:oem_a: not found
Sending 'oem_a' (104376 KB) OKAY [ 2.413s]
Writing 'oem_a' (bootloader) flash permission denied
FAILED (remote: '')
fastboot: error: Command failed

G:\prova4>fastboot oem lock
(bootloader) Already locked
OKAY [ 0.000s]
Finished. Total time: 0.000s

G:\prova4>fastboot reboot
Rebooting OKAY [ 0.000s]
Finished. Total time: 0.004s

The phone reboots, starts normally without any problems, everything works perfectly except for....

System integrity is compromised" in updates , SafetyNet CTS profile match: Fail, Play Protect: device is not certified

So as a last step I turn usb debugging back on again, reboot into fastboot and run a fastboot getvar all to see what the current situation is

C:\adb-fastboot\platform-tools>fastboot getvar all
(bootloader) kernel: uefi
(bootloader) version-bootloader: MBM-3.0-evert_retail-7884113c1a-200826
(bootloader) product: evert
(bootloader) board: evert
(bootloader) secure: yes
(bootloader) hwrev: PVT1
(bootloader) radio: EMEA
(bootloader) storage-type: eMMC
(bootloader) emmc: 64GB SAMSUNG DH6DMB RV=08 PV=05 FV=0000000000000005
(bootloader) ufs: N/A
(bootloader) ram: 4GB SAMSUNG LP4x DIE=16Gb M5=01 M6=06 M7=10 M8=12
(bootloader) cpu: SDM630 1.0 (6)
(bootloader) serialno: ZY322PKS4H
(bootloader) cid: 0x0032
(bootloader) channelid: 0x00
(bootloader) uid: 8D585BF5
(bootloader) securestate: flashing_locked
(bootloader) verity-state: disabled (0)
(bootloader) iswarrantyvoid: yes
(bootloader) max-download-size: 536870912
(bootloader) reason: Reboot mode set to fastboot
(bootloader) imei: XXXXXXXXXXXXXXX
(bootloader) meid:
(bootloader) date: 04-28-2018
(bootloader) sku: XT1926-3
(bootloader) carrier_sku: XT1926-3
(bootloader) battid: SB18C20873
(bootloader) battery-voltage: 4273
(bootloader) iccid:
(bootloader) cust_md5:
(bootloader) max-sparse-size: 268435456
(bootloader) ro.build.fingerprint[0]: motorola/evert_n/evert_n:9/PPW29.1
(bootloader) ro.build.fingerprint[1]: 16-20-28/042db:user/release-keys
(bootloader) poweroffalarm: 0
(bootloader) ro.build.version.full[0]: Blur_Version.29.391.19.evert.reta
(bootloader) ro.build.version.full[1]: il.en.US
(bootloader) ro.build.version.qcom: LA.UM.7.2.r1-05300-sdm660.0
(bootloader) version-baseband: M660_30.77.01.101R EVERT_EMEADSDS_CUST
(bootloader) kernel.version[0]: Linux version 4.4.153-perf-g28e27408fc01
(bootloader) kernel.version[1]: (hudsoncm@ilclbld154) (gcc version 4.9.
(bootloader) kernel.version[2]: x 20150123 (prerelease) (GCC) ) #1 SMP P
(bootloader) kernel.version[3]: REEMPT Wed Aug 26 10:49:45 CDT 2020
(bootloader) git:abl: MBM-3.0-evert_retail-7884113c1a-200826
(bootloader) git:xbl: MBM-3.0-evert_retail-4149b81ab-200826
(bootloader) git:pmic: MBM-3.0-evert_retail-4149b81ab-200826
(bootloader) git:rpm: MBM-3.0-evert_retail-cf74f0b-200826
(bootloader) git:tz: MBM-3.0-evert_retail-7534c15a6-200826
(bootloader) git:hyp: MBM-3.0-evert_retail-7534c15a6-200826
(bootloader) git:devcfg: MBM-3.0-evert_retail-7534c15a6-200826
(bootloader) git:cmnlib: MBM-3.0-evert_retail-7534c15a6-200826
(bootloader) git:cmnlib64: MBM-3.0-evert_retail-7534c15a6-200826
(bootloader) git:keymaster: MBM-3.0-evert_retail-7534c15a6-200826
(bootloader) git:prov: MBM-3.0-evert_retail-7534c15a6-200826
(bootloader) git:storsec: MBM-3.0-evert_retail-7534c15a6-200826
(bootloader) frp-state: no protection (0)
(bootloader) ro.carrier: reteu
(bootloader) current-slot: a
(bootloader) running-bl-slot: _a/_a
(bootloader) running-boot-lun: 0
(bootloader) slot-count: 2
(bootloader) slot-successful:_a: yes
(bootloader) slot-successful:_b: no
(bootloader) slot-unbootable:_a: no
(bootloader) slot-unbootable:_b: no
(bootloader) slot-retry-count:_a: 6
(bootloader) slot-retry-count:_b: 0
all: listed above
Finished. Total time: 0.076s

C:\adb-fastboot\platform-tools>

For God's sake what more can I do? Where do I go wrong?