Simply put, fastboot oem lock puts your bootloader into a mode that prevents you from overwriting your recovery image, without a subsequent fastboot oem unlock. This serves as a security precaution, primarily where the default recovery and firmware is installed.
Because:
- The default recovery will only allow manufacturer/Google signed firmware to be installed and doesn't allow you to do much of anything else.
- Unlocking the bootloader will erase all data.
....you can rest assured that, under this configuration, no one can take your phone and, say, bypass a screen lock by installing a custom firmware where the security considerations are different.
Note that as this merely locks in your recovery, and then again only from bootloader-overwrites, this is most useful where the recovery is stock, and the installed ROM is an official one that has no security vulnerabilities. This is important because in most recoveries, and in some ROMs, there are ways to clandestinely access data via USB, bypass security settings with fixed button presses or unpatched backdoors, or install custom recoveries.
fastboot boot
command (I recall that from the Xoom, I think). – eldarerathis Apr 06 '12 at 17:18fastboot oem lock
my Nexus 5X phone and a prompt appeared, that this would do a factory reset too. I knew that unlocking would do that, but I would have not expected that to happen during a lock procedure. – ckujau Feb 19 '17 at 04:16