I wonder whether there is a way to prevent someone to use
fastboot to flash an Android device.
Indeed, while one must be able to turn on USB debug in order to run
adb, the bootloader does not offer any protection AFAIK.
You may only make
And one old rule: if anybody has physical access to device - software protection will not help.