How to lock your bootloader

Revert your phone to having a locked bootloader after rooting it

How to lock your bootloader

How to lock your bootloader

The bootloader is a hugely important part of your Android software. It’s what kicks everything off when you turn on your device, telling your phone or tablet what it should load. Most devices ship with a locked bootloader, which essentially means they’ll only run programs that have been verified by the bootloader. This means that it’s difficult or impossible to use a different OS to the one that the device ships with. Unlocking the bootloader gets past this and means you can root your device then install pretty much whatever you want on your phone or tablet. But there are times when you’ll want to shut that door. Maybe you’re trying to sell your device and you want it back to factory settings, or perhaps you just want to go back to a standard OS with the added security that the bootloader offers. In this tutorial, we’ll walk you through how to lock your bootloader. It’s a pretty fiddly process – you’ll need a computer at some point and you’ll need to set aside an hour or so. If you are unfamiliar with some of the terminology or steps that we take, then it might be better to do a bit more research before you attempt the task. This isn’t an easy thing to do by any means, but it’s worth a try if you’re interested in the deeper workings of your Android device. You’ll need to be a confident user of ADB as there is the potential for bricking your device if you get anything wrong, so do this at your own risk!


To start things off, you are going to need to install the drivers for your device on your computer. A quick Google search is sure to show you what you will need. Make sure you have the latest versions of these drivers installed and that you delete any earlier versions that might already be hiding on your computer. Next you’ll need to download and install Android Debug Bridge (ADB) on your computer. Getting this set up can be a pretty intensive process on its own, so if you don’t already have it running on your computer then it’ll be worth taking a look at some of our other tutorials on how to do this. Now you’ll need to make sure that USB debugging is turned on in the settings of your device. This is probably the easiest part of the process. Head to Settings on your phone or tablet, then into Developer options and make sure that the USB debugging box is ticked.


If you’re trying to reset your device to its factory settings, you’ll also need a recovery image of the original OS to install. Have a search to find the stock ROM for your device. There’s a list of some of the ones available here at Otherwise, a Google search will point you in the right direction. Now is the time to find out some more particular details on your own. You’ll need to search for ‘lock bootloader’ and the name of your device. It’s important you get the right device because the command lines you find will be different for each device. Now is the time to open up ADB. You will need the command lines you found with your searches. Make sure that you don’t connect your device until after you have opened up a command window. When you’re ready, insert your USB cable. It’s best to use the one that came in the box with your device.


Make sure that when you insert your USB cable, your device tells you that USB debugging is now running. It’s a good idea to turn off any media connections that your phone would automatically start as well, as these would interfere with the debugging process. If you’re trying to get your device back to factory settings, it doesn’t really matter whereabouts in the process you flash your ROM. If everything has worked correctly, the locked bootloader will still let you install the correct operating system. Best to wait until you’ve run the process to be safe. Now it’s time to use ADB to reset your lock. Use the ADB command panel and make sure you use the precise layout of the codes. It doesn’t take much of a mistake at this point in the process to leave your device permanently bricked. As usual, make sure you have made a backup of your device’s files. To see if the bootloader is now locked, restart your device. As it’s powering up, hold down the power and volume down buttons together. At the top of the screen, there should be a message letting you know that the bootloader is locked. If there isn’t, check the code and try again.