How can I block my boot loader with adb

I tried to unlock my bootloader with fastboot but it did not work

> fastboot oem relock XXXXXXXXXXXXXXXX
FAILED (remote: & # 39; root type is risk & # 39;)
Finished. Total time: 0.014s

So I thought that ADB would work (if possible)