[Moto G 2015 Q&A, Help & Troubleshooting] geminis3:
Hi there, i unlocked the bootloader of my Moto G 2015 XT1540 to play with it and install custom ROMs, but now i want to relock it because i want to gift it to my mother.

I've tried several tutorials about it but it fails. (I used XT1540_OSPREY_RETUS_2GB_6.0_MPI24.65-25.1_cid9 firmware from the index on XDA).

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot oem lock begin
...
(bootloader) Please fully flash the signed build before locking phone!
OKAY [ 0.027s]
finished. total time: 0.027s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot oem fb_mode_set
...
OKAY [ 0.007s]
finished. total time: 0.007s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot flash logo logo.bin
target reported max download size of 268435456 bytes
sending 'logo' (1352 KB)...
OKAY [ 0.049s]
writing 'logo'...
OKAY [ 0.051s]
finished. total time: 0.107s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot flash boot boot.img
target reported max download size of 268435456 bytes
sending 'boot' (16384 KB)...
OKAY [ 0.524s]
writing 'boot'...
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 1.060s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot flash recovery recovery.img
target reported max download size of 268435456 bytes
sending 'recovery' (16484 KB)...
OKAY [ 0.527s]
writing 'recovery'...
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 1.068s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot flash system system.img_sparsechunk.0
target reported max download size of 268435456 bytes
sending 'system' (251797 KB)...
OKAY [ 7.901s]
writing 'system'...
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 8.355s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot flash system system.img_sparsechunk.1
target reported max download size of 268435456 bytes
sending 'system' (257238 KB)...
OKAY [ 8.073s]
writing 'system'...
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 8.112s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot flash system system.img_sparsechunk.2
target reported max download size of 268435456 bytes
sending 'system' (262142 KB)...
OKAY [ 8.223s]
writing 'system'...
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 8.266s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot flash system system.img_sparsechunk.3
target reported max download size of 268435456 bytes
sending 'system' (262140 KB)...
OKAY [ 8.227s]
writing 'system'...
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 8.302s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot flash system system.img_sparsechunk.4
target reported max download size of 268435456 bytes
sending 'system' (262142 KB)...
OKAY [ 8.238s]
writing 'system'...
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 8.278s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot flash system system.img_sparsechunk.5
target reported max download size of 268435456 bytes
sending 'system' (255933 KB)...
OKAY [ 8.030s]
writing 'system'...
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 8.070s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot flash system system.img_sparsechunk.6
target reported max download size of 268435456 bytes
sending 'system' (112244 KB)...
OKAY [ 3.525s]
writing 'system'...
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 3.555s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot flash modem NON-HLOS.bin
target reported max download size of 268435456 bytes
sending 'modem' (36984 KB)...
OKAY [ 1.170s]
writing 'modem'...
OKAY [ 0.562s]
finished. total time: 1.739s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot erase modemst1
erasing 'modemst1'...
OKAY [ 0.020s]
finished. total time: 0.024s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot erase modemst2
erasing 'modemst2'...
OKAY [ 0.015s]
finished. total time: 0.019s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot flash fsg fsg.mbn
target reported max download size of 268435456 bytes
sending 'fsg' (2159 KB)...
OKAY [ 0.077s]
writing 'fsg'...
OKAY [ 0.059s]
finished. total time: 0.140s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot erase cache
erasing 'cache'...
OKAY [ 0.019s]
finished. total time: 0.024s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot erase userdata
erasing 'userdata'...
OKAY [ 0.081s]
finished. total time: 0.085s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot erase customize
erasing 'customize'...
OKAY [ 0.018s]
finished. total time: 0.022s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot erase clogo
erasing 'clogo'...
OKAY [ 0.028s]
finished. total time: 0.032s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot oem fb_mode_clear
...
OKAY [ 0.006s]
finished. total time: 0.011s

C:\Users\victo\Downloads\adb-fastboot-latest_win_linux>fastboot oem lock
...
(bootloader) Please flash valid signed images just after lock begin
(bootloader) command!
OKAY [ 0.033s]
finished. total time: 0.037s

Thanks in advance ;)