Command error by running "fastboot oem unlock" I am unable to use the following command on an HTC One M7

# fastboot oem unlock 
...
(bootloader) [ERR] Command error !!!
OKAY [  0.001s]
finished. total time: 0.001s


Why do I get this error and how to unlock my bootloader?

In addition

# fastboot flashing unlock
...
FAILED (remote: not allowed)
finished. total time: 0.000s
You don't unlock an HTC phone like this - in fact most phones can't.

Provided yours is unlockable (i.e. not an AT&amp;T/Verizon variant), you need to sign up and apply for unlock here and use the token you acquired to complete the unlock process. The site itself will walk you through thoroughly.