Note: If this tutorial worked for you (and it should work), please leave a comment below. Thanks.
Why Android Bootloaders Come Locked
A device with a locked bootloader will only boot the operating system currently on it. You can’t install a custom operating system – the bootloader will refuse to load it.
Android Wipes Itself When You Unlock Your Bootloader
This is obnoxious to people who just want to root their device without going through a long setup process, but it’s an important security precaution. Your PIN or password protects access to your Android device, and unlocking the bootloader opens holes that allow people with physical access to your device to bypass your PIN or password.
Bypassing Your PIN or Password
If your Android phone or tablet’s bootloader is unlocked when a thief gets their hands on it, they could reboot your device into its bootloader and boot your custom recovery environment (or flash a custom recovery and then boot that). From the recovery mode, they could use the adb command to access all the data on your device. This bypasses any PIN or password used to secure your device
However, Android’s boot loader comes locked for a reason. With Android phones being used by businesses and governments, a locked boot loader provides additional security protection against corporate espionage and other governments’ spies should a phone become stolen or lost.