[Moto Z Play Guides, News, & Discussion] jhonatanstv:
Right, here is the script that i ran:

XT1635-02_ADDISON_7.1.1_NPN26.118-22-2_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot getvar max-sparse-size

< waiting for device >

max-sparse-size: 268435456

finished. total time: 0.012s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem fb_mode_set

...

OKAY [ 0.005s]

finished. total time: 0.005s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash partition gpt.bin

target reported max download size of 536870912 bytes

sending 'partition' (45 KB)...

OKAY [ 0.009s]

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.087s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash bootloader bootloader.img

target reported max download size of 536870912 bytes

sending 'bootloader' (5115 KB)...

OKAY [ 0.203s]

writing 'bootloader'...

(bootloader) Validating 'bootloader.default.xml'

(bootloader) Committing 'bootloader.default.xml'

(bootloader) - flashing 'emmc_appsboot.mbn' to 'aboot'

(bootloader) - flashing 'rpm.mbn' to 'rpm'

(bootloader) - flashing 'tz.mbn' to 'tz'

(bootloader) - flashing 'devcfg.mbn' to 'devcfg'

(bootloader) - flashing 'cmnlib.mbn' to 'cmnlib'

(bootloader) - flashing 'cmnlib64.mbn' to 'cmnlib64'

(bootloader) - flashing 'keymaster.mbn' to 'keymaster'

(bootloader) - flashing 'prov.mbn' to 'prov'

(bootloader) - flashing 'sbl1.mbn' to 'sbl1'

OKAY [ 0.742s]

finished. total time: 0.950s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash modem NON-HLOS.bin

target reported max download size of 536870912 bytes

sending 'modem' (73864 KB)...

OKAY [ 2.833s]

writing 'modem'...

OKAY [ 1.191s]

finished. total time: 4.028s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash fsg fsg.mbn

target reported max download size of 536870912 bytes

sending 'fsg' (2612 KB)...

OKAY [ 0.103s]

writing 'fsg'...

OKAY [ 0.127s]

finished. total time: 0.233s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot erase modemst1

erasing 'modemst1'...

OKAY [ 0.042s]

finished. total time: 0.043s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot erase modemst2

erasing 'modemst2'...

OKAY [ 0.042s]

finished. total time: 0.043s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash dsp adspso.bin

target reported max download size of 536870912 bytes

sending 'dsp' (16384 KB)...

OKAY [ 0.625s]

writing 'dsp'...

OKAY [ 0.310s]

finished. total time: 0.939s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash logo logo.bin

target reported max download size of 536870912 bytes

sending 'logo' (2187 KB)...

OKAY [ 0.090s]

writing 'logo'...

OKAY [ 0.136s]

finished. total time: 0.230s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash boot boot.img

target reported max download size of 536870912 bytes

sending 'boot' (16384 KB)...

OKAY [ 0.642s]

writing 'boot'...

(bootloader) Image signed with key bad key

OKAY [ 0.457s]

finished. total time: 1.102s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash recovery recovery.img

target reported max download size of 536870912 bytes

sending 'recovery' (16484 KB)...

OKAY [ 0.633s]

writing 'recovery'...

(bootloader) Image signed with key bad key

OKAY [ 0.499s]

finished. total time: 1.136s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.0

target reported max download size of 536870912 bytes

sending 'system' (254735 KB)...

OKAY [ 9.624s]

writing 'system'...

OKAY [ 4.013s]

finished. total time: 13.640s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.1

target reported max download size of 536870912 bytes

sending 'system' (258152 KB)...

OKAY [ 9.777s]

writing 'system'...

OKAY [ 3.786s]

finished. total time: 13.569s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.2

target reported max download size of 536870912 bytes

sending 'system' (248454 KB)...

OKAY [ 9.391s]

writing 'system'...

OKAY [ 3.559s]

finished. total time: 12.954s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.3

target reported max download size of 536870912 bytes

sending 'system' (242885 KB)...

OKAY [ 9.340s]

writing 'system'...

OKAY [ 3.324s]

finished. total time: 12.667s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.4

target reported max download size of 536870912 bytes

sending 'system' (259562 KB)...

OKAY [ 9.797s]

writing 'system'...

OKAY [ 3.656s]

finished. total time: 13.455s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.5

target reported max download size of 536870912 bytes

sending 'system' (261927 KB)...

OKAY [ 9.928s]

writing 'system'...

OKAY [ 4.150s]

finished. total time: 14.083s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.6

target reported max download size of 536870912 bytes

sending 'system' (260267 KB)...

OKAY [ 9.848s]

writing 'system'...

OKAY [ 3.852s]

finished. total time: 13.703s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.7

target reported max download size of 536870912 bytes

sending 'system' (258485 KB)...

OKAY [ 9.818s]

writing 'system'...

OKAY [ 3.417s]

finished. total time: 13.239s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.8

target reported max download size of 536870912 bytes

sending 'system' (260875 KB)...

OKAY [ 9.844s]

writing 'system'...

OKAY [ 3.576s]

finished. total time: 13.424s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.9

target reported max download size of 536870912 bytes

sending 'system' (262078 KB)...

OKAY [ 9.918s]

writing 'system'...

OKAY [ 3.706s]

finished. total time: 13.627s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.10

target reported max download size of 536870912 bytes

sending 'system' (252083 KB)...

OKAY [ 9.534s]

writing 'system'...

OKAY [ 3.581s]

finished. total time: 13.119s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.11

target reported max download size of 536870912 bytes

sending 'system' (261025 KB)...

OKAY [ 9.875s]

writing 'system'...

OKAY [ 3.625s]

finished. total time: 13.503s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.12

target reported max download size of 536870912 bytes

sending 'system' (256541 KB)...

OKAY [ 9.698s]

writing 'system'...

OKAY [ 3.512s]

finished. total time: 13.211s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash oem oem.img

target reported max download size of 536870912 bytes

sending 'oem' (110454 KB)...

OKAY [ 4.164s]

writing 'oem'...

OKAY [ 1.542s]

finished. total time: 5.709s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot erase carrier

erasing 'carrier'...

OKAY [ 0.086s]

finished. total time: 0.087s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot erase cache

erasing 'cache'...

OKAY [ 0.015s]

finished. total time: 0.016s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot erase userdata

erasing 'userdata'...

OKAY [ 0.177s]

finished. total time: 0.179s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot erase DDR

erasing 'DDR'...

OKAY [ 0.007s]

finished. total time: 0.008s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem fb_mode_clear

...

OKAY [ 0.004s]

finished. total time: 0.005s

TO LOCK THE BLOADER

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem lock

...

(bootloader) WARNING: This command erases all user data.

(bootloader) Please re-run this command to continue.

OKAY [ 0.003s]

finished. total time: 0.004s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem lock

...

(bootloader) Flash valid Android images now

(bootloader) Then re-run this command to lock

OKAY [ 0.012s]

finished. total time: 0.013s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash oem oem.img

target reported max download size of 536870912 bytes

sending 'oem' (110454 KB)...

OKAY [ 4.277s]

writing 'oem'...

OKAY [ 8.446s]

finished. total time: 12.735s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.0

target reported max download size of 536870912 bytes

sending 'system' (254735 KB)...

OKAY [ 9.645s]

writing 'system'...

OKAY [ 6.959s]

finished. total time: 16.607s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.1

target reported max download size of 536870912 bytes

sending 'system' (258152 KB)...

OKAY [ 9.735s]

writing 'system'...

OKAY [ 7.059s]

finished. total time: 16.799s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.2

target reported max download size of 536870912 bytes

sending 'system' (248454 KB)...

OKAY [ 9.399s]

writing 'system'...

OKAY [ 6.120s]

finished. total time: 15.523s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.3

target reported max download size of 536870912 bytes

sending 'system' (242885 KB)...

OKAY [ 9.397s]

writing 'system'...

OKAY [ 5.653s]

finished. total time: 15.054s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.4

target reported max download size of 536870912 bytes

sending 'system' (259562 KB)...

OKAY [ 9.785s]

writing 'system'...

OKAY [ 6.104s]

finished. total time: 15.893s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.5

target reported max download size of 536870912 bytes

sending 'system' (261927 KB)...

OKAY [ 9.874s]

writing 'system'...

OKAY [ 8.443s]

finished. total time: 18.320s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.6

target reported max download size of 536870912 bytes

sending 'system' (260267 KB)...

OKAY [ 9.789s]

writing 'system'...

OKAY [ 10.026s]

finished. total time: 19.822s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.7

target reported max download size of 536870912 bytes

sending 'system' (258485 KB)...

OKAY [ 9.815s]

writing 'system'...

OKAY [ 5.819s]

finished. total time: 15.637s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.8

target reported max download size of 536870912 bytes

sending 'system' (260875 KB)...

OKAY [ 9.986s]

writing 'system'...

OKAY [ 6.052s]

finished. total time: 16.041s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.9

target reported max download size of 536870912 bytes

sending 'system' (262078 KB)...

OKAY [ 10.030s]

writing 'system'...

OKAY [ 6.704s]

finished. total time: 16.736s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.10

target reported max download size of 536870912 bytes

sending 'system' (252083 KB)...

OKAY [ 9.641s]

writing 'system'...

OKAY [ 6.188s]

finished. total time: 15.832s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.11

target reported max download size of 536870912 bytes

sending 'system' (261025 KB)...

OKAY [ 10.011s]

writing 'system'...

OKAY [ 7.995s]

finished. total time: 18.008s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system system.img_sparsechunk.12

target reported max download size of 536870912 bytes

sending 'system' (256541 KB)...

OKAY [ 9.836s]

writing 'system'...

OKAY [ 5.945s]

finished. total time: 15.783s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash boot boot.img

target reported max download size of 536870912 bytes

sending 'boot' (16384 KB)...

OKAY [ 0.652s]

writing 'boot'...

OKAY [ 0.471s]

finished. total time: 1.125s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem lock

...

(bootloader) Lock complete! Flash signed images after reboot if needed

OKAY [ 0.258s]

finished. total time: 0.258s

After this it goes to the moto splashcreen and nothing happens, even if i leave it alone for 10 minutes.

If i dont re-lock my bootloader after i flashed the ROM, i click "Start" and it stuck on the "Warning, bootloader unlocked", then i reboot the phone and it stucks in the ID:bad key screen