If you’re given to tweaking and customizing software, unlocking the bootloader on your Android smartphone is very useful as it gives you the ability to flash custom firmware, factory images, install custom recoveries like TWRP, get root privilege which gives you access to do even more than you can fathom on your phone. However, there are times when you need to relock the bootloader in order to get an official OTA software upgrade, get access to some OEM services or get back your warranty, as performing advanced tweaks on a smartphone voids your warranty. This is a guide on how to relock bootloader on Moto G5S Plus.

I’ve already covered how to remove the warning message that comes with unlocking the bootloader on the Moto G5S and Moto G5S Plus here. If you’ve done that and for some reason(s), you need to relock the bootloader, read on to see how.

Problem: Need to relock bootloader on Moto G5S Plus

Before You Start:

Here is everything you need to know before you start the process of relocking the bootloader on your Moto G5S and Moto G5S Plus. This includes file downloads you need to make, things you need to set up on your phone and PC, and guides you should refer to if you’re new to this.

Guides

  • How to install ADB and Fastboot on Windows.
  • How to install ADB and Fastboot on Mac.
  • Download Motorola USB Drivers.

Downloads

  • Moto G5S Plus Stock ROM Main Download Link || Alternative Download Link.

Process

  • Install ADB and Fastboot, if you haven’t already.
  • The Moto G5S Plus Stock ROM will be downloaded in .zip format. Extract it into the same folder where you installed ADB and Fastboot.
  • Turn off your smartphone and unplug it from any socket or power outlet.
  • Boot it into bootloader by pressing and holding down the volume down and power buttons together for around 6 seconds.
  • When the bootloader screen comes on, connect the device to your PC via USB.
  • Open the Windows Command Prompt (cmd). To do this, hold down the Windows key on your keyboard and press R. Then type cmd in the text box that appears and press the enter key.
  • On the open command prompt window, run the following commands:
  • fastboot oem lock
  • fastboot oem lock
  • fastboot flash oem oem.img
  • fastboot flash system system.img_sparsechunk.0
  • fastboot flash system system.img_sparsechunk.1
  • fastboot flash system system.img_sparsechunk.2
  • fastboot flash system system.img_sparsechunk.3
  • fastboot flash system system.img_sparsechunk.4
  • fastboot flash boot boot.img
  • fastboot oem lock

After running the above commands, your phone will restart and your Moto G5S Plus bootloader has been successfully relocked. If you relocked the bootloader to get an official OTA update from Motorola, you can now flash the Moto G5S Plus official firmware. Steps on how to do that are contained here.

fastboot oem lock fastboot oem lock fastboot flash oem oem.img fastboot flash system system.img_sparsechunk.0 fastboot flash system system.img_sparsechunk.1 fastboot flash system system.img_sparsechunk.2 fastboot flash system system.img_sparsechunk.3 fastboot flash system system.img_sparsechunk.4 fastboot flash boot boot.img fastboot oem lock