Unlock/Lock Bootloader
Anchal Singh!!! WARNING !!!
I) DO NOT DOWNGRADE TO OxygenOS 13 AFTER UNLOCKING THE BOOTLOADER.
II) NOTE FOR LOCKING: MAKE SURE TO UNROOT IT FIRST
Video Tutorial to Unlock: Click here
Video Tutorial to Lock: Click here
Items Required:
- Working Brain
- PC/Laptop with ADB and Fastboot Drivers
- Device with OOS 14 or above(only if Bootloader is available in above updates)
On to the Steps:
- Make sure to backup your files (use PC/ sdCard/ Google backup/ Swift backup app, whatever you wish), as unlocking(or locking) will erase internal storage.
- ADB drivers are updated & installed on your PC(if not check notes for that/ Official Google-USB-Drivers /Git: Latest-adb-fastboot-Drivers )
- Enable the 'USB-debugging' and 'Allow Bootloader Unlock' options from the Developers option in additional settings. (To enable the developer option, open settings>about phone>version> tap version no. 7-8 times ). Connect the device to the PC with USB.
- Download latest SDK-Platform-tools and extract it in PC. Now open the extracted folder and open an elevated cmd/powershell window here using shift + right click>Open in the terminal.
Use the command in the terminal, "adb devices " if a pop-up appears on the phone, then click on allow.
Again, use the command "adb devices" then a serial number device will appear. This means the device is connected to the ADB interface successfully.
You may need these while relocking.
To check current slot- fastboot getvar current-slot
To change slots- fastboot --set-active=a
write b in place of a if you want to flash in b slot instead of a.
Now follow the below commands:
adb reboot bootloader
You can also enter Bootloader/Fastboot Mode by pressing and holding all keys: volume +, volume - & power button.-
fastboot devices
(to check that the device is connected, it will show its serial no.) - I)
fastboot flashing unlock
(to unlock the device)
OR
II)fastboot flashing lock
(to lock device)
Two options will appear on the phone to unlock/lock or not
Using the volume keys, select Unlock/Lock and press the power button to confirm. - fastboot reboot
Enjoy bootloader will unlock now.