[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] resarfekim:
I was originally rooted, but after running the commands in this OP, I did nothing else.

I did save the results of all the Fastboot commands, please see below. A couple commands toward the end gave errors.

______________________________________________

E:\Phone\E4\Factory_restore_image>fastboot devices

ZY224PTXGW fastboot

E:\Phone\E4\Factory_restore_image> fastboot oem fb_mode_set

...

OKAY [ 0.016s]

finished. total time: 0.016s

E:\Phone\E4\Factory_restore_image>fastboot flash partition gpt.bin

(bootloader) has-slot:partition: not found

target reported max download size of 536870912 bytes

sending 'partition' (32 KB)...

OKAY [ 0.000s]

writing 'partition'...

(bootloader) Flashing primary GPT image...

(bootloader) Flashing backup GPT image...

OKAY [ 0.125s]

finished. total time: 0.140s

E:\Phone\E4\Factory_restore_image>fastboot flash boot boot.img

(bootloader) has-slot:boot: not found

target reported max download size of 536870912 bytes

sending 'boot' (16384 KB)...

OKAY [ 0.515s]

writing 'boot'...

(bootloader) Image signed with key bad key

OKAY [ 0.655s]

finished. total time: 1.186s

E:\Phone\E4\Factory_restore_image> fastboot flash recovery recovery.img

(bootloader) has-slot:recovery: not found

target reported max download size of 536870912 bytes

sending 'recovery' (16484 KB)...

OKAY [ 0.531s]

writing 'recovery'...

(bootloader) Image signed with key bad key

OKAY [ 1.970s]

finished. total time: 2.517s

E:\Phone\E4\Factory_restore_image> fastboot flash aboot aboot.mbn

(bootloader) has-slot:aboot: not found

target reported max download size of 536870912 bytes

sending 'aboot' (1536 KB)...

OKAY [ 0.047s]

writing 'aboot'...

OKAY [ 0.203s]

finished. total time: 0.265s

E:\Phone\E4\Factory_restore_image>fastboot flash cmnlib cmnlib.mbn

(bootloader) has-slot:cmnlib: not found

target reported max download size of 536870912 bytes

sending 'cmnlib' (251 KB)...

OKAY [ 0.001s]

writing 'cmnlib'...

OKAY [ 0.078s]

finished. total time: 0.079s

E:\Phone\E4\Factory_restore_image>fastboot flash cmnlib64 cmnlib64.mbn

(bootloader) has-slot:cmnlib64: not found

target reported max download size of 536870912 bytes

sending 'cmnlib64' (251 KB)...

OKAY [ 0.016s]

writing 'cmnlib64'...

OKAY [ 0.078s]

finished. total time: 0.094s

E:\Phone\E4\Factory_restore_image>fastboot flash devcfg devcfg.mbn

(bootloader) has-slot:devcfg: not found

target reported max download size of 536870912 bytes

sending 'devcfg' (128 KB)...

OKAY [ 0.016s]

writing 'devcfg'...

OKAY [ 0.062s]

finished. total time: 0.094s

E:\Phone\E4\Factory_restore_image> fastboot flash dsp dsp.img

(bootloader) has-slot:dsp: not found

target reported max download size of 536870912 bytes

sending 'dsp' (16384 KB)...

OKAY [ 0.531s]

writing 'dsp'...

OKAY [ 1.686s]

finished. total time: 2.217s

E:\Phone\E4\Factory_restore_image>fastboot flash modem modem.img

(bootloader) has-slot:modem: not found

target reported max download size of 536870912 bytes

sending 'modem' (102400 KB)...

OKAY [ 3.247s]

writing 'modem'...

OKAY [ 4.921s]

finished. total time: 8.168s

E:\Phone\E4\Factory_restore_image>fastboot erase modemst1

(bootloader) has-slot:modemst1: not found

erasing 'modemst1'...

OKAY [ 0.062s]

finished. total time: 0.062s

E:\Phone\E4\Factory_restore_image>fastboot erase modemst2

(bootloader) has-slot:modemst2: not found

erasing 'modemst2'...

OKAY [ 0.062s]

finished. total time: 0.062s

E:\Phone\E4\Factory_restore_image> fastboot flash fsg fsg.img

(bootloader) has-slot:fsg: not found

target reported max download size of 536870912 bytes

sending 'fsg' (8192 KB)...

OKAY [ 0.266s]

writing 'fsg'...

OKAY [ 2.795s]

finished. total time: 3.062s

E:\Phone\E4\Factory_restore_image>fastboot flash keymaster keymaster.mbn

(bootloader) has-slot:keymaster: not found

target reported max download size of 536870912 bytes

sending 'keymaster' (251 KB)...

OKAY [ 0.016s]

writing 'keymaster'...

OKAY [ 0.078s]

finished. total time: 0.094s

E:\Phone\E4\Factory_restore_image>fastboot flash oem oem.img

(bootloader) has-slot:oem: not found

target reported max download size of 536870912 bytes

Invalid sparse file format at header magi

sending sparse 'oem' 1/2 (507490 KB)...

OKAY [ 17.457s]

writing 'oem' 1/2...

OKAY [ 28.001s]

sending sparse 'oem' 2/2 (59511 KB)...

OKAY [ 2.081s]

writing 'oem' 2/2...

OKAY [ 6.231s]

finished. total time: 53.804s

E:\Phone\E4\Factory_restore_image> fastboot flash prov prov.mbn

(bootloader) has-slot:prov: not found

target reported max download size of 536870912 bytes

sending 'prov' (187 KB)...

OKAY [ 0.016s]

writing 'prov'...

OKAY [ 0.062s]

finished. total time: 0.078s

E:\Phone\E4\Factory_restore_image>fastboot flash rpm rpm.mbn

(bootloader) has-slot:rpm: not found

target reported max download size of 536870912 bytes

sending 'rpm' (256 KB)...

OKAY [ 0.016s]

writing 'rpm'...

OKAY [ 0.078s]

finished. total time: 0.094s

E:\Phone\E4\Factory_restore_image>fastboot flash sbl1 sbl1.mbn

(bootloader) has-slot:sbl1: not found

target reported max download size of 536870912 bytes

sending 'sbl1' (507 KB)...

OKAY [ 0.016s]

writing 'sbl1'...

OKAY [ 0.047s]

finished. total time: 0.078s

E:\Phone\E4\Factory_restore_image> fastboot flash tz tz.mbn

(bootloader) has-slot:tz: not found

target reported max download size of 536870912 bytes

sending 'tz' (1792 KB)...

OKAY [ 0.062s]

writing 'tz'...

OKAY [ 0.265s]

finished. total time: 0.328s

E:\Phone\E4\Factory_restore_image>fastboot erase system

(bootloader) has-slot:system: not found

erasing 'system'...

(bootloader) Permission denied

FAILED (remote failure)

finished. total time: 0.016s

E:\Phone\E4\Factory_restore_image>fastboot erase system

(bootloader) has-slot:system: not found

erasing 'system'...

(bootloader) Permission denied

FAILED (remote failure)

finished. total time: 0.016s

E:\Phone\E4\Factory_restore_image> fastboot flash system system.img

(bootloader) has-slot:system: not found

target reported max download size of 536870912 bytes

Invalid sparse file format at header magi

sending sparse 'system' 1/5 (509553 KB)...

OKAY [ 17.319s]

writing 'system' 1/5...

OKAY [ 12.350s]

sending sparse 'system' 2/5 (523636 KB)...

OKAY [ 17.753s]

writing 'system' 2/5...

OKAY [ 11.928s]

sending sparse 'system' 3/5 (519086 KB)...

OKAY [ 17.869s]

writing 'system' 3/5...

OKAY [ 11.983s]

sending sparse 'system' 4/5 (521399 KB)...

OKAY [ 17.949s]

writing 'system' 4/5...

OKAY [ 20.356s]

sending sparse 'system' 5/5 (411602 KB)...

OKAY [ 14.302s]

writing 'system' 5/5...

OKAY [ 35.077s]

finished. total time: 176.895s

E:\Phone\E4\Factory_restore_image> fastboot erase DDR

(bootloader) has-slot:DDR: not found

erasing 'DDR'...

OKAY [ 0.000s]

finished. total time: 0.016s

E:\Phone\E4\Factory_restore_image>fastboot erase userdata

(bootloader) has-slot:userdata: not found

erasing 'userdata'...

OKAY [ 1.267s]

finished. total time: 1.267s

E:\Phone\E4\Factory_restore_image>fastboot erase cache

(bootloader) has-slot:cache: not found

erasing 'cache'...

OKAY [ 0.031s]

finished. total time: 0.031s

E:\Phone\E4\Factory_restore_image> fastboot oem fb_mode_clear

...

OKAY [ 0.016s]

finished. total time: 0.016s

E:\Phone\E4\Factory_restore_image>