To completely return the Pixel or Pixel XL to stock, you can follow these instructions below to learn how to relock the bootloader.
I recently showed you how to unlock the bootloader of the Pixel and Pixel XL. This process is relatively straight forward, especially if you follow the instructions I outlined in the tutorial. I then showed you how to root the Pixel and Pixel XL, but some people might feel they want to go back to the way things were.
So yesterday I showed you how to return the Pixel to stock Android so that you can start to accept OTA updates again.
Sadly, having an unlocked bootloader is interfering with Android Pay for some people. It’s unclear if this is how Google intended SafetyNet to work (since others have no problem using Android Pay on an unlocked bootloader), but that is how things are for some people. So I thought it would be a good idea to show Pixel and Pixel XL owners how to relock the bootloader of their device.
Note – Locking the bootloader, just like unlocking it, will perform a factory data reset. However, it is advised to completely return to stock using these instructions before you locking the bootloader to prevent your phone from going into a bootloop.
Pixel Lock Bootloader
- Download and install the Minimal ADB & Fastboot tools
- Then install Google’s Android USB drivers on your PC
- You’ll then want to reboot the PC after the drivers have been installed
- Enable Developer Mode on the Pixel
- Enable USB Debugging Mode on the Pixel
- Launch the Minimal ADB & Fastboot shortcut
- Then type the following into the Command Prompt. . .
- adb devices
- . . .and press Enter on the keyboard
- Make sure it says the daemon has been successfully started
- Connect the Pixel to the PC with a USB cable
- Grant USB Debugging access to the Pixel from PC
- Disconnect the USB cable from the Pixel
- Boot the Pixel into Fastboot Mode
- Plug the USB cable back into the Pixel again
- Type the following command into the command prompt. . .
- fastboot flashing lock
- . . .then press Enter on the keyboard
- Press the Volume Up button on the Pixel to highlight the ‘Yes’ option
- Press the Power button to confirm you want to lock the bootloader
- Wait for 5-15 seconds while the Pixel bootloader is being locked
- Press the Power button to select the ‘Start’ option after you’re taken back into Fastboot Mode
Explanation
If you’ve already followed the Pixel bootloader unlocking guide, then most of this will already be familiar and most of it has likely already been setup by you. Like before, you just need to make sure you have ADB & Fastboot tools installed and that you have USB drivers installed on your PC as well. You’ll then need to enable Developer Mode on the Pixel or Pixel XL, so that you can go into that section and enable USB Debugging Mode.
Once that is done, you should then go ahead start up the ADB service as described in the guide above. With the daemon started successfully, you can then connect the Pixel to the computer with a USB cable so that you can grant USB Debugging access. After that, you should disconnect the USB cable, boot the Pixel or Pixel XL into Fastboot Mode and then reconnect that USB cable to the smartphone.
From here, go ahead and type out the fastboot flashing lock command into the Command Prompt and press Enter on the keyboard. If all went according to plan, you should be greeted with a special confirmation screen on the Pixel or Pixel XL. It asks you if really want to lock the bootloader of your phone, because doing so will perform a factory data reset and erase all of your important data.
As long as you have your stuff manually backed up, or backed up to the cloud, then you’re safe to proceed. Just press the Volume Up button on the side of the phone and the Yes option should be highlighted(or highlight the No option if you don’t want to continue). You’ll then want to press the Power button to select this option and then wait 5-15 seconds for the data reset to be completed and for the bootloader to be locked again.
This will take you back to the Fastboot Mode menu screen, and you should see the very bottom line of text says you that the device is currently locked. With the Start option highlighted (which should be by default), you can simply press the Power button to select the Start option and reboot the phone back into Android. Because you have just done a factory reset, this first boot cycle will take longer than normal (as demonstrated by the video above), and then you’ll be taken to the typical Android activation screen.
From here you can activate Android like normal and then connect your Google account to the phone again.
You literally just ruined my Pixel, thanks.
And how did I do that?
Your help was very useful. I tried it some days ago and didnot succeed. Now I tried it again, following every step (!) and the bootloader is back in the lock position. Sorry for my previous message. I donated $10. Great job, keep going.
Thanks Doug.
Thank you so much for the donation! That was incredibly generous of you.
I’m sorry you had issues with the tutorial the first time through, but I can certainly understand it. I’ve had that happen many times with things Android tips I’m just trying for the first time.
Thank you,very simple process to lock back the boot-loader.
Good Job!
There where to many posts of yours open and instead of flashing a stock rom I locked back the bootloader and now I got a bootloop 🙁 Can you help me please unlock it? It says: C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flashing unlock
…
FAILED (remote: oem unlock is not allowed)
finished. total time: 0.047s
What do you mean too many posts? You’re in very tight spot, not gonna lie. You can try Flashing the Stock Software but Flashing the stock rom requires an unlocked bootloader I think, maybe not. You can give flashing stock rom from the official factory images provided by Google a try. Maybe these resources can be of help, though they are for other Pixel Variants: https://xdaforums.com/t/locked-bootloader-no-recovery-stuck-in-bootloop-is-it-dead.3935903/
https://www.reddit.com/r/GooglePixel/comments/15ysf2g/pixel_7_bootloader_locked_oem_locked_no_os_found/
There were to many posts of yours open and instead of flashing a stock rom (flash-all.bat) I locked back the bootloader (fastboot flashing lock). And now I got a bootloop Can you help me please unlock it? Or maybe there is another way of how can I flash the stock ROM using other software apps?
What do you mean too many posts? You’re in very tight spot, not gonna lie. You can try Flashing the Stock Software but Flashing the stock rom requires an unlocked bootloader I think, maybe not. You can give flashing stock rom from the official factory images provided by Google a try. Maybe these resources can be of help, though they are for other Pixel Variants: https://xdaforums.com/t/locked-bootloader-no-recovery-stuck-in-bootloop-is-it-dead.3935903/
https://www.reddit.com/r/GooglePixel/comments/15ysf2g/pixel_7_bootloader_locked_oem_locked_no_os_found/