• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[GUIDE] [Osprey] BOOTLOADER LOCK

Helpful


  • Total voters
    5
  • Poll closed .
Search This thread

ExaHamza

Senior Member
Jul 12, 2015
322
87
27
Maputo
BISSMILLAH
Hi, this guide will help you to relock your bootloader, in a few commands.
We know that it's was a tabu on Moto G3 environment, but a few times a go.

Requirement
OSPREY with considerable charge
PC/LAPTOP running Windows or Ubuntu (or other Linux Based OS also)
Only For Windows Users
Drivers: http://bit.ly/1WMv2L1
Only For Linux Users
Open TERMINAL and run the following:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot

Both Of Users
Official Images: http://bit.ly/1GfUqwr
Fastboot Files: http://bit.ly/1OncC0H

BEFORE PROCEED:
Relocking your bootloader means that you will no longer be a"tweaker" no TWRP no ROOT, no any other mods.
And its required to full flash the official images, so say goodbye for Custom ROMs.
In this process you'll lose all you data stored on internal storage, including all accounts, musics, videos, pic, installed apps. So, it's a good time to BackUp your important files.
After lock, on bootloader screen you should see:
Device is LOCKED. Status Code: 2
Software status: Modified
(For Now) We Cant Change to 0 and official, but's locked.
The bootloader warning messege will appear, after all procedure change the official logo.bin with modified.
You'll need to factory reset your device before.
Ubuntu users will need permission to use fastboot commands, so run su before.
The system.img_sparsechunk files are variable, so make sure you have flashed sequentially until the last.


FQA:
Q: If I relock my bootloader, will I have my warranty alive again?
A: No.

Q: Can i install TWRP or Root after lock my device's bootloader?
A: No, maybe with some unknown tricks by me.

Q: How to (re)unlock?
A: In order to unlock your devices again you need to allow it on developer settings and also you'll need your bootloader code.
for security reason don't expose these information, turn off OEM unlock on developer setting and hide your unlock code given by Moto.

PROCEED:
Download required files, and place on easy-find-place.
Extract both of files and the images files on [adb-fastboot-latest_win_linux] folder.

And open CMD or TERMINAL on this folder
Connect your device to via USB CABLE

Test it, if everything is fine by running this command:

fastboot devices

You'll see [SERIAL NUMBER] fastboot
Meaning everything is OK.

Now just run this sequence of commands:

fastboot oem lock begin
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.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 system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot oem lock
fastboot reboot


Now Your Bootloader will locked Successfully

All Credit Goes To:
@lost101
@mobs84

Sorry for my mistakes
And I hope this helps someone!
 
Last edited:

acejavelin

Recognized Contributor
Sep 3, 2009
6,837
3,325
Lincoln, ND
Google Pixel 5a
FQA:
Q: If I relock my bootloader, will I have my warranty alive again?

A: I don't know, probably no. Even after relocking your bootloader, it's possible to see if the smartphone was previously unlocked or not.
It will not allow you regain your warranty... Get the code, lose your warranty, the actual state of the device being locked, unlocked, modified or stock is not relevant.

From Moto's Legal Terms and Conditions

5. The following applies to all devices, except for Developer Edition devices: Obtaining an unlock code voids all warranties. Once you get the unlock code, your device is no longer covered by the Motorola warranty, or any other warranty provided with the device. Neither Motorola, nor your wireless carrier shall have any duty to provide warranty or customer support for unlocked devices.

(5) THE FOLLOWING APPLIES TO ALL UNLOCKED DEVICES EXCEPT FOR DEVELOPER EDITION DEVICES, BY OBTAINING THE UNLOCK CODE FOR THIS DEVICE, IRRESPECTIVE OF WHETHER THE DEVICE’S BOOTLOADER IS SUBSEQUENTLY UNLOCKED OR ITS SOFTWARE OR OPERATING SYSTEM IS MODIFIED, USER AGREES TO WAIVE AND VOID ALL WARRANTIES THAT MAY HAVE BEEN PROVIDED BY MOTOROLA OR YOUR WIRELESS CARRIER, BOTH EXPRESS AND IMPLIED, INCLUDING ANY WRITTEN WARRANTY THAT ACCOMPANIED THE DEVICE AT THE TIME OF PURCHASE OR DELIVERY, AND AGREES THAT ANY RIGHTS OR REMEDIES PROVIDED BY SUCH A WARRANTY ARE NULL AND VOID. NEITHER MOTOROLA, NOR YOUR WIRELESS CARRIER, MAKES ANY WARRANTIES OF ANY KIND, AND MOTOROLA AND YOUR WIRELESS CARRIER DISCLAIM ALL WARRANTIES OF EVERY KIND, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE IN CONNECTION WITH AN UNLOCKED DEVICE. USER ACKNOWLEDGES AND AGREES THAT ALL SUCH WARRANTIES ARE HEREBY EXCLUDED AND THAT ALL UNLOCKED DEVICES ARE PROVIDED "AS IS," WITH NO WARRANTY OF ANY KIND;
 

HelpMeruth

Senior Member
Aug 29, 2015
897
741
Sweden
Many people think this is the key to getting their warranty back... I didn't want anyone to be misinformed.

Sent from my MotoG3 using Tapatalk
you're completely in the right, but sometimes local retailers only look at the bootloader status to check the warranty. so in theory you can gain your warranty back.
 

acejavelin

Recognized Contributor
Sep 3, 2009
6,837
3,325
Lincoln, ND
Google Pixel 5a
you're completely in the right, but sometimes local retailers only look at the bootloader status to check the warranty. so in theory you can gain your warranty back.
No, you're not gaining your warranty back, you are being deceptive and in most countries breaking the law as well.

Remember that in most EU countries the bootloader lock/unlock status is not relevant though, due to local laws in most countries there. (I noticed you were from the Netherlands)


Sent from my MotoG3 using Tapatalk
 
Last edited:

coolizard

Senior Member
Oct 30, 2013
86
31
My question is: in bootloader, after the commands, the device status is locked, software status is official and status code is 0? That's the information in a never-unlocked bootloader.
And the unlocked bootloader mensage desapear?
 
Last edited:

ExaHamza

Senior Member
Jul 12, 2015
322
87
27
Maputo
In my case I have device LOCKED software status Modified and status code is 2 and the warning message didn't disappeared...
I don't know with your details...

Enviado de meu MotoG3 usando Tapatalk
 
Last edited:

ExaHamza

Senior Member
Jul 12, 2015
322
87
27
Maputo
My question is: in bootloader, after the commands, the device status is locked, software status is official and status code is 0? That's the information in a never-unlocked bootloader.
And the unlocked bootloader mensage desapear?
but if you're seeing warning message you can flash different logo.bin
 

Gravemind2015

Senior Member
Dec 1, 2015
1,847
862
I have a query. If someone locks his bootloader using this, and wants to unlock again, will he need the code that he got from motorola again or just fastboot oem unlock will open it up? This is my first moto so I don't know the details. Any ideas mate?

Broadcasted from Zeta Reticuli
 

ExaHamza

Senior Member
Jul 12, 2015
322
87
27
Maputo
I have a query. If someone locks his bootloader using this, and wants to unlock again, will he need the code that he got from motorola again or just fastboot oem unlock will open it up? This is my first moto so I don't know the details. Any ideas mate?

Broadcasted from Zeta Reticuli
Read carefully the guide, on FAQ section, I have explained that!
 
  • Like
Reactions: Gravemind2015

lost101

Inactive Recognized Contributor
May 30, 2008
7,434
9,335
@ExaHamza - It is impossible to permanently lock Bootloader once it has been unlocked. I don't know how else to say this.

fastboot oem lock is not a miracle cure. It can simply be undone by anyone with fastboot access to your handset. Once you have unlocked the Bootloader, anyone can flash TWRP and has access to every partition on your phone. It's impossible for you to stop this. FRP partition can be wiped, so FRP does not exist either. FRP can only function as designed if the handset has never had it's Bootloader unlocked.
 

ExaHamza

Senior Member
Jul 12, 2015
322
87
27
Maputo
On every possibility you're speaking I have tried, and no way to install TWRP after relocking. I'm not saying in theory, I have this device, and I have tested. So if you still able to install TWRP after locking the bootloader, believe me that's issue of your smartphone!
 

ExaHamza

Senior Member
Jul 12, 2015
322
87
27
Maputo
@ExaHamza - It is impossible to permanently lock Bootloader once it has been unlocked. I don't know how else to say this.

fastboot oem lock is not a miracle cure. It can simply be undone by anyone with fastboot access to your handset. Once you have unlocked the Bootloader, anyone can flash TWRP and has access to every partition on your phone. It's impossible for you to stop this. FRP partition can be wiped, so FRP does not exist either. FRP can only function as designed if the handset has never had it's Bootloader unlocked.
[emoji17]
On every possibility you're speaking I have tried, and no way to install TWRP after relocking. I'm not saying in theory, I have this device, and I have tested. So if you still able to install TWRP after locking the bootloader, believe me that's issue of your smartphone!
 

lost101

Inactive Recognized Contributor
May 30, 2008
7,434
9,335
On every possibility you're speaking I have tried, and no way to install TWRP after relocking. I'm not saying in theory, I have this device, and I have tested. So if you still able to install TWRP after locking the bootloader, believe me that's issue of your smartphone!
What happens if you type fastboot oem unlock and then try to flash TWRP?
 

ExaHamza

Senior Member
Jul 12, 2015
322
87
27
Maputo
What happens if you type fastboot oem unlock and then try to flash TWRP?
See the screenshot
don't worry about nexus.... is just a folder that i stored the file.
56f39db28b81687a04b42423940833a3.jpg
 
Last edited:

lost101

Inactive Recognized Contributor
May 30, 2008
7,434
9,335
@ExaHamza - Over the years people have posted problems with Moto G (1st Gen) and have mentioned they have relocked the Bootloader. These experiences have given me the impression that it's something that can be undone easily. This is why I believed fastboot oem unlock would be enough.

After typing: fastboot oem lock begin - is it possible to flash TWRP?
 

ExaHamza

Senior Member
Jul 12, 2015
322
87
27
Maputo
@ExaHamza - Over the years people have posted problems with Moto G (1st Gen) and have mentioned they have relocked the Bootloader. These experiences have given me the impression that it's something that can be undone easily. This is why I believed fastboot oem unlock would be enough.

After typing: fastboot oem lock begin - is it possible to flash TWRP?
I showed in screenshot, even if I try fastboot oem lock begin will not work, I think that they have fixed this issue. Once locked no longer be able to flash TWRP unless you have reunlock.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    BISSMILLAH
    Hi, this guide will help you to relock your bootloader, in a few commands.
    We know that it's was a tabu on Moto G3 environment, but a few times a go.

    Requirement
    OSPREY with considerable charge
    PC/LAPTOP running Windows or Ubuntu (or other Linux Based OS also)
    Only For Windows Users
    Drivers: http://bit.ly/1WMv2L1
    Only For Linux Users
    Open TERMINAL and run the following:

    sudo add-apt-repository ppa:nilarimogard/webupd8
    sudo apt-get update
    sudo apt-get install android-tools-adb android-tools-fastboot

    Both Of Users
    Official Images: http://bit.ly/1GfUqwr
    Fastboot Files: http://bit.ly/1OncC0H

    BEFORE PROCEED:
    Relocking your bootloader means that you will no longer be a"tweaker" no TWRP no ROOT, no any other mods.
    And its required to full flash the official images, so say goodbye for Custom ROMs.
    In this process you'll lose all you data stored on internal storage, including all accounts, musics, videos, pic, installed apps. So, it's a good time to BackUp your important files.
    After lock, on bootloader screen you should see:
    Device is LOCKED. Status Code: 2
    Software status: Modified
    (For Now) We Cant Change to 0 and official, but's locked.
    The bootloader warning messege will appear, after all procedure change the official logo.bin with modified.
    You'll need to factory reset your device before.
    Ubuntu users will need permission to use fastboot commands, so run su before.
    The system.img_sparsechunk files are variable, so make sure you have flashed sequentially until the last.


    FQA:
    Q: If I relock my bootloader, will I have my warranty alive again?
    A: No.

    Q: Can i install TWRP or Root after lock my device's bootloader?
    A: No, maybe with some unknown tricks by me.

    Q: How to (re)unlock?
    A: In order to unlock your devices again you need to allow it on developer settings and also you'll need your bootloader code.
    for security reason don't expose these information, turn off OEM unlock on developer setting and hide your unlock code given by Moto.

    PROCEED:
    Download required files, and place on easy-find-place.
    Extract both of files and the images files on [adb-fastboot-latest_win_linux] folder.

    And open CMD or TERMINAL on this folder
    Connect your device to via USB CABLE

    Test it, if everything is fine by running this command:

    fastboot devices

    You'll see [SERIAL NUMBER] fastboot
    Meaning everything is OK.

    Now just run this sequence of commands:

    fastboot oem lock begin
    fastboot flash partition gpt.bin
    fastboot flash bootloader bootloader.img
    fastboot flash logo logo.bin
    fastboot flash boot boot.img
    fastboot flash recovery recovery.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 system system.img_sparsechunk.5
    fastboot flash system system.img_sparsechunk.6
    fastboot flash system system.img_sparsechunk.7
    fastboot flash modem NON-HLOS.bin
    fastboot erase modemst1
    fastboot erase modemst2
    fastboot flash fsg fsg.mbn
    fastboot erase cache
    fastboot erase userdata
    fastboot oem lock
    fastboot reboot


    Now Your Bootloader will locked Successfully

    All Credit Goes To:
    @lost101
    @mobs84

    Sorry for my mistakes
    And I hope this helps someone!
    2
    FQA:
    Q: If I relock my bootloader, will I have my warranty alive again?

    A: I don't know, probably no. Even after relocking your bootloader, it's possible to see if the smartphone was previously unlocked or not.
    It will not allow you regain your warranty... Get the code, lose your warranty, the actual state of the device being locked, unlocked, modified or stock is not relevant.

    From Moto's Legal Terms and Conditions

    5. The following applies to all devices, except for Developer Edition devices: Obtaining an unlock code voids all warranties. Once you get the unlock code, your device is no longer covered by the Motorola warranty, or any other warranty provided with the device. Neither Motorola, nor your wireless carrier shall have any duty to provide warranty or customer support for unlocked devices.

    (5) THE FOLLOWING APPLIES TO ALL UNLOCKED DEVICES EXCEPT FOR DEVELOPER EDITION DEVICES, BY OBTAINING THE UNLOCK CODE FOR THIS DEVICE, IRRESPECTIVE OF WHETHER THE DEVICE’S BOOTLOADER IS SUBSEQUENTLY UNLOCKED OR ITS SOFTWARE OR OPERATING SYSTEM IS MODIFIED, USER AGREES TO WAIVE AND VOID ALL WARRANTIES THAT MAY HAVE BEEN PROVIDED BY MOTOROLA OR YOUR WIRELESS CARRIER, BOTH EXPRESS AND IMPLIED, INCLUDING ANY WRITTEN WARRANTY THAT ACCOMPANIED THE DEVICE AT THE TIME OF PURCHASE OR DELIVERY, AND AGREES THAT ANY RIGHTS OR REMEDIES PROVIDED BY SUCH A WARRANTY ARE NULL AND VOID. NEITHER MOTOROLA, NOR YOUR WIRELESS CARRIER, MAKES ANY WARRANTIES OF ANY KIND, AND MOTOROLA AND YOUR WIRELESS CARRIER DISCLAIM ALL WARRANTIES OF EVERY KIND, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE IN CONNECTION WITH AN UNLOCKED DEVICE. USER ACKNOWLEDGES AND AGREES THAT ALL SUCH WARRANTIES ARE HEREBY EXCLUDED AND THAT ALL UNLOCKED DEVICES ARE PROVIDED "AS IS," WITH NO WARRANTY OF ANY KIND;
    2
    Thanks for your information, monthly constantly I reset my phone and reinstall everything again (is just a habit), and I remember that sometimes I flashed those file without any problems.
    I updated the post above with more information. The situation described will only happen to a very small percentage of users. However it could occur for anyone, even those that have never unlocked their Bootloader - but obviously they can return the phone if still under warranty.

    As I mention, with "OEM Unlocking" enabled - more options are available to repair the phone. If Bootloader corruption occurs, or the phone hard-bricks entirely then a recovery method like the following would be required:
    2
    I'd like to make anyone who has - unlocked their Bootloader and re-locked it - aware of a potentially serious situation.

    User @Morphine1 has re-locked his phone and now has a handset that will not accept any Factory Firmware Image currently available. This is a form of 'downgrade prevention.' Eventually a newer firmware image will be released and the handset useable again, but it may take months of waiting.

    Post: http://forum.xda-developers.com/showpost.php?p=68442857&postcount=710

    For now it's worth considering that if your handset bricks (it can happen randomly) - you may be unable to flash any firmware image and be stuck with a dead phone.

    --

    Update: @Morphine1's phone apparently got into this situation because of a failed Motorola OTA upgrade to Android 6.0.1. The upgrade process either failed or got interrupted and this appears to have created corruption on the phone. The OTA Upgrade process also flashes Bootloader - which is why it's a serious matter if something goes wrong.

    Again the message here is that if you have unlocked your Bootloader - leaving it unlocked will give you more options for recovery. It may have been possible to repair the phone via TWRP / ADB had "OEM Unlocking" been enabled.
    1
    If I lock my bootloader and change my logo.bin how can people at service center know I unlocked my device
    :confused:
    Most likely your status code will remain 2 or 3 or similar. I don't remember what was the status code for untouched phones, I think it shows 0.

    Broadcasted from Zeta Retuculi