The bootloader is the first code that runs when you press the power button. It checks the signature on the boot image, decides the software is legitimate, and hands off to Android. Unlocking it means telling that check to relax. You gain the ability to flash unsigned images. You lose your data. Both things happen at once, every time.

What the unlock actually does
On unlock, the bootloader triggers a factory reset. Photos, apps, internal storage, gone. Verified boot gets replaced by a warning screen at every boot, and Google’s phrasing is cheerful about it: “Your device has been unlocked and can’t be trusted.” Widevine drops to L3 on many devices, so Netflix and friends stream in standard definition until you return to stock and relock.
Unlocking and rooting are separate moves. Unlocking lets you flash anything. Rooting is flashing a boot image that contains su. Plenty of people unlock, install LineageOS, and never touch root.
The manufacturer zoo
Pixels are the friendly ones: `fastboot flashing unlock`, tap yes, done in ninety seconds. OnePlus runs the same command. Motorola’s path involves `fastboot oem get_unlock_data`, pasting a hash into their website, and flashing back a key tied to your IMEI. Xiaomi requires the Mi Unlock tool on a PC, a signed-in Mi account, and a waiting period that runs from 72 hours to 168 hours for new accounts. Nothing tells you the timer started. You check back tomorrow and try again.
Samsung is its own country. The unlock lives in developer options, it wipes the phone, and it permanently trips the Knox warranty bit. That bit is a one-way fuse. Samsung Pay and Secure Folder stop working forever.
Sony still issues unlock codes from its developer portal, tied to the IMEI. Oppo and Realme vary by model, and some have no official path at all. For those, the XDA thread for your exact model is the source of truth. Huawei stopped issuing codes in 2018, so those phones stay locked unless you buy a gray-market code, which works until it doesn’t.
Warranty, in practice
Manufacturers write that unlocking voids the warranty. Reality depends on where you live. In the EU, a software modification generally does not void the hardware warranty unless the seller can show it caused the fault. The legal frame is Directive 1999/44/EC and its national transpositions. In the US it’s murkier, and manufacturers win by default because nobody fights a $200 claim. Google and OnePlus have historically been relaxed. Samsung’s Knox bit is unambiguous and permanent.
The practical rule: unlock the phone once the warranty is worth less to you than the ROM.
The steps
1. Back up everything on the phone. Unlocking wipes. See the checklist post if you skipped it. 2. Enable Developer options by tapping Build number seven times. Then turn on OEM unlocking and USB debugging. 3. Charge past 70 percent. Install platform-tools and your OEM’s drivers. 4. Get to the bootloader: `adb reboot bootloader`, or the button combo (usually power plus volume down). 5. Check the connection: `fastboot devices`. An empty list means cable or drivers. Fix it now, before anything else. 6. Unlock with `fastboot flashing unlock` on Pixels and most modern devices. Motorola: `fastboot oem unlock KEY`. Xiaomi: Mi Unlock on the PC. Older devices may want `fastboot oem unlock`. 7. Confirm with the volume keys. The phone wipes, reboots, and shows the setup screen with a tiny unlocked padlock on the warning page.
Relocking is the reverse command, with one rule: only relock on fully stock firmware. Relocking while a custom ROM is installed leaves you with a brick that fails verified boot on both slots. XDA threads fill up with these every month.
That’s the whole thing. The crying usually happens at step 5, and it’s about drivers.