0
Ask Question
Join us on
Hovatek Forum DEVELOPMENT Android [Development] How to unlock and relock Android bootloader
with fastboot
[Development] How to unlock and relock Android
bootloader with fastboot
Post Reply
PAGES (6): 1 2 3 4 5 6 NEXT
hovatek
Administrator
26-07-2017, 02:47 PM #1
This guide will explain how to unlock and relock the bootloader of an Android device using
fastboot. Except for rare cases like Motorola devices, your bootloader must be unlocked to flash
even factory files via fastboot. While you can flash modified files (TWRP/GSI/Custom ROMs) to
your Mediatek (MTK), Spreadtrum (SPD) or Qualcomm (QLM) Android devices using their flash
tools on a locked bootloader, doing so is just asking for a boot loop or bricked device.
It is important to mention that this is a generic approach and doesn't work for all devices. Some
relevant guides on bootloader unlock to checkout include:
How to unlock Unisoc / Spreadtrum / SPD bootloader using an unlock token
How to unlock Xiaomi bootloader using Mi Unlock Tool
How to use mtkclient to unlock Mediatek bootloader
How to unlock Motorola bootloader
How to unlock and relock Samsung bootloader
How to unlock Sony Xperia bootloader
Requirements
Setup ADB-Fastboot on your PC. For Spreadtrum devices, follow this guide (in order to enable
adb detect your device)
Enable USB Debugging and OEM Unlocking (if available)
How to unlock Android bootloader using fastboot
Follow the steps below to unlock the Bootloader of an Android device
See the video tutorial below or @ https://youtu.be/DL5NMR-n4_Q
1. Open the adb folder
2. Hold Shift (on the keyboard) then right-click on a blank space in the folder > Select Open
Command window here
3. Command prompt screen (ADB) should now be open
4. Connect the device to the PC (via USB cord) while ON then run the command below (by "run", I
mean type then press Enter
Code:
adb devices
5. If you've set up everything right, the device should get detected under the List of devices
attached
6. Run the command below to get the device into Bootloader (fastboot)
Code:
adb reboot-bootloader
if that fails
Code:
adb shell reboot fastboot
7. The device should now boot into fastboot (a black or coloured screen with the text fastboot)
8. In fastboot, test detection/connection to the device using the command:
Code:
fastboot devices
9. If fastboot is set up right, you should see its ID printed out
10. Now, check the device's Bootloader lock status using either of the two commands below (if it's
locked or unlocked)
Code:
fastboot oem device-info
fastboot getvar unlocked
a. If you use the fastboot oem device-info command and the result is false then your
bootloader is locked but if the result is true then the bootloader is unlocked
b. If you use the fastboot getvar unlocked command and the result is no then your
bootloader is locked but if the result is yes then the bootloader is unlocked
11. If you've confirmed your bootloader is locked, then run the command below to unlock the
Bootloader
Code:
fastboot oem unlock
12. If that doesn't work then try the commands below:
Code:
fastboot oem unlock-go
fastboot flashing unlock
fastboot flash unlocking
fastboot bbk unlock_vivo
Note: Vivo phones require a custom fastboot binary (attached at the end of this post)
13. Some devices require you to also run:
Code:
fastboot flashing unlock_critical
14. You should get a prompt (on the device) asking you to press Volume up to confirm or Volume
down to cancel. Press Volume up on the device (for some phones it is actually the opposite;
Volume down would confirm while up would cancel or do nothing)
15. Once the Bootloader is unlocked, reboot the device using
Code:
fastboot reboot
16. The device might take a while to boot up (since it is a first boot) so be patient
How to relock Android bootloader using fastboot
It is important to return the device to stock ROM by flashing its factory/stock/official firmware
before relocking the bootloader. Relocking the bootloader with a custom partition (TWRP/Custom
ROM/GSI) still in place will brick the device.
Depending on the unlock command you used, try its corresponding bootloader relock command:
Code:
fastboot oem lock
fastboot oem lock-go
fastboot flashing lock
fastboot flash locking
fastboot bbk lock_vivo
Important Notice
This guide isn't guaranteed to work on all (Mediatek, Spreadtrum, Qualcomm, Exynos,
Hisilicon, Intel etc) Android devices
Ensure to backup your important stuff because unlocking your Bootloader wipes your data
(/userdata)
Unlocking the bootloader bricks some devices so ensure to relock or flash the firmware if you
find yourself in such a situation
If you successfully installed ADB / fastboot and your device still isn't detected then it is most
likely due to old ADB or drivers, fix it using the guide on fixing ADB and fastboot detection
problems
This post was last modified: 17-11-2023, 12:25 PM by hovatek.
Attached Files
vivo_fastboot_for_windows.zip
Size: 891.91 KB / Downloads: 84
Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you
can't wait.
sparleta
Junior Member
06-04-2018, 03:58 PM #2
hovatek (26-07-2017, 02:47 PM)
...
This post was last modified: 07-04-2018, 10:05 AM by hovatek.
Attached Files
IMG_20180406_175243.jpg
Size: 942.95 KB / Downloads: 300
freshtyt
Senior Member
06-04-2018, 10:27 PM #3
sparleta (06-04-2018, 03:58 PM)
Hi guys,I have been using the step by step guide to unlock my Infinix Hot5 Model X559C.
Unfortunately, once i send the code to unlock bootloader the screen pops out on my phone but
does not respond to either Volume Up/Down or Power button. What could be the case?
Attached is the image where it hangs
did you enable oem unlocking in settings before trying to unlock?
and why are you trying to unlock bootloader?
This post was last modified: 06-04-2018, 10:34 PM by freshtyt.
slichy
Enthusiastic Member
21-04-2018, 10:49 PM #4
i have been following the instructions to unlock my leagoo t5c. my phone is detected in adb, but
when i want to reboot in bootloader using adb reboot bootloader, my phone stuck in boot logo. and
when i checked in fastboot devices, is showed the message <waiting the devices>. whats wrong
with my phone ? i have installed the driver clearly. my phone is use spreadtrum sc 9853i. thanks
before
This post was last modified: 21-04-2018, 10:50 PM by slichy.
hovatek
Administrator
23-04-2018, 09:28 AM #5
slichy (21-04-2018, 10:49 PM)
i have been following the instructions to unlock my leagoo t5c. my phone is detected in adb,
but when i want to reboot in bootloader using adb reboot bootloader, my phone stuck in boot
logo. and when i checked in fastboot devices, is showed the message <waiting the devices>.
whats wrong with my phone ? i have installed the driver clearly. my phone is use spreadtrum
sc 9853i. thanks before
Boot into recovery mode and check if there's an option to boot into Bootloader from there
Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you
can't wait.
paeffiong
Senior Member
24-04-2018, 09:10 AM #6
Nice and well detailed. Could you please attach a video cos there are so many who learns faster
when taught with a video tutorial.
arip jumaing
Newbie
17-06-2018, 04:38 AM #7
Nice and well detailed. ADB AND FASTBOOT MODE FOR UBL..THANKS
Muhanad Samaty
Enthusiastic Member
03-07-2018, 04:36 AM #8
guys everything went well except rightnow how do i install supersu.zip when i dont have twrp or
philz recovery for my phone ,, im using Tecno CX AIR build number : cxair-H3713A-N-171207V139
please help.
hovatek
Administrator
03-07-2018, 10:31 AM #9
Muhanad Samaty (03-07-2018, 04:36 AM)
guys everything went well except rightnow how do i install supersu.zip when i dont have twrp
or philz recovery for my phone ,, im using Tecno CX AIR build number : cxair-H3713A-N-
171207V139 please help.
Use our TWRP or Philz porter @ https://www.hovatek.com/forum/forum-39.html
Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you
can't wait.
belinda1093
Newbie
09-07-2018, 09:42 PM #10
Great post, I am a newbie and it took me two days to get this far. I use both linux and windows and
first a lot of problems with the adb fastboot drivers...and all the familiar problems. Then after much
hassle I found out that my bootloader is already unlocked and I thought it wasn't.
Now my biggest issue is that I cannot find a suitable custom ROM for my phone (strange device I
have, a Mango C9 android marshmallow, kernel 3.10.65 (!) with quad core chipset). So I should
learn how to port a Rom, but I am in a hurry because I started this whole process because my
phone has a virus in android system file. So I have to completely wipe it clean. I cant find a stock
rom either. What would your advice be?
PAGES (6): 1 2 3 4 5 6 NEXT
Post Reply
Subscribe To This Thread View A Printable Version Send This Thread To A Friend
Search
Users browsing this thread:
Kimeto
Join us
Find us
Lagos, Nigeria
Call us
+2347049927303
Mail us
contact@hovatek.com
...just a button away
We provide professional, fast, and convenient solutions to your gadget problems and
questions.
Follow us
Useful Links
Online TWRP Builder Free T-Shirt
Firmware Forum FAQs
Announcements
Actions
Subscribe to notifications
Search our website
Search
Copyright © 2024, All Right Reserved | Hovatek. Software by MyBB. Theme designed by Curves
UI.