Relock the Bootloader

Search This thread

RazorHail

Senior Member
Jul 24, 2010
63
9
Hi,
I want to give my unlocked Moto G to a family member - and I'd like to relock the bootloader again, for security reasons.(I don't care about the warranty)

is there a way to do that?
 

RazorHail

Senior Member
Jul 24, 2010
63
9

thanks,
I've already tried that.
But when I enter "fastboot oem lock", I get:
(bootloader) FAIL: Please run fastboot oem lock begin first!
(bootloader) sst lock failure!

when I enter the suggested "fastboot oem lock begin", I get:
(bootloader) Ready to flash signed images

I'm not sure what that's suppose to mean.....I already downloaded the official firmware images and flashed those immediately after I get this message........but it still says that the bootloader is unlocked.
And immediately returning back to the bootloader and typing in "fastboot oem lock" still won't work - same message as before...

am I missing something?
 

denzel09

Senior Member
Jun 28, 2009
4,321
891
Teheran
thanks,
I've already tried that.
But when I enter "fastboot oem lock", I get:


when I enter the suggested "fastboot oem lock begin", I get:


I'm not sure what that's suppose to mean.....I already downloaded the official firmware images and flashed those immediately after I get this message........but it still says that the bootloader is unlocked.
And immediately returning back to the bootloader and typing in "fastboot oem lock" still won't work - same message as before...

am I missing something?

Yup, this "unlock-relock" is WIP yet ..
 

akaygee

Member
Jan 24, 2013
30
24
Scotland
i done a relock last week and this works for me.use adb command "fastboot oem lock begin" go through the routine to flash factory firmware image and use "fastboot oem lock" command to finish after you flashed factory firmware.
 
  • Like
Reactions: marcelotorres

denzel09

Senior Member
Jun 28, 2009
4,321
891
Teheran
i done a relock last week and this works for me.use adb command "fastboot oem lock begin" go through the routine to flash factory firmware image and use "fastboot oem lock" command to finish after you flashed factory firmware.

So, steps are these:

1: fastboot oem lock begin
2: flash stock firmware
3: fastboot oem lock

And BL will be locked again. Correct me if i'm wrong.

Problem is that for "unlocked" we need always of a code by motorola atm.
 
Last edited:

akaygee

Member
Jan 24, 2013
30
24
Scotland
So, steps are these:

1: fastboot oem lock begin
2: flash stock firmware
3: fastboot oem lock

And BL will be locked again. Correct me if i'm wrong..
thats how it works on most motorola android phones i have used ,it works fine on my moto g so yes that is right.

like so

fastboot oem lock begin
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.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 modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot oem lock
 
Last edited:

danger2u

Senior Member
Jan 24, 2010
1,085
239
thats how it works on most motorola android phones i have used ,it works fine on my moto g so yes that is right.

like so

fastboot oem lock begin
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.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 modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot oem lock


for me not working
v2rx.png
 
  • Like
Reactions: Francesco27

akaygee

Member
Jan 24, 2013
30
24
Scotland
this is just a quick howto am at work....
the files you need and will use are in moto g section of this forum.

firmware's here
http://forum.xda-developers.com/showthread.php?t=2546251


relock bootloader
=============
keep in mind this will remove any and all personal files and settings
like any self respecting android user you have made backups right....!!!! GOOD

download adb and fastboot extract or place into a directory.
now download the factory firmware image of your phone extract zip/rar and place into the same directory.

download "relock bootloader.txt" rename to "relock bootloader.bat" place this in the same directory as the files and double click it ,this would save you typing in all the commands from below in by hand and does it all for you.recap....if you did download and run relock bootloader.bat you dont need to type anything form below

open a command prompt as administrator ,navigate to the directory where you placed all the files we are working with and type as follows giving time for each command to finish.

fastboot oem lock begin
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.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 modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot oem lock
 
Last edited:

denzel09

Senior Member
Jun 28, 2009
4,321
891
Teheran
When we ask the motorola unlock code, this does not imply that we actually unlock the bootloader.
I mean, i can ask to motorola to unlock code but i can decide to unlock also after sometimes, who stops me.
So, i think that when we relock bootloader, also if previously we asked an unlock code, we are ok, for what i writed above. How can they to be sure that bootloader has been really unlocked in case of brick or hardware failure ?
 

akaygee

Member
Jan 24, 2013
30
24
Scotland
When we ask the motorola unlock code, this does not imply that we actually unlock the bootloader.
I mean, i can ask to motorola to unlock code but i can decide to unlock also after sometimes, who stops me.
So, i think that when we relock bootloader, also if previously we asked an unlock code, we are ok, for what i writed above. How can they to be sure that bootloader has been really unlocked in case of brick or hardware failure ?
the boot loader has a status indicator.phone shops/retailers probably won't check it but motorola will.
 
Last edited:

akaygee

Member
Jan 24, 2013
30
24
Scotland
Understood, i had read something in an other post, so to complete the "opera" we need to 'something' to reset that count/status? Like on samsung device, s2 et similia?
yes that is right we would need to find out what file is responsible for storing the count or status of the boot loader as its not the boot loader its self that holds this information.even if you flash the whole system after relocking the bootloader the count is still there.
 

danger2u

Senior Member
Jan 24, 2010
1,085
239
yes that is right we would need to find out what file is responsible for storing the count or status of the boot loader as its not the boot loader its self that holds this information.even if you flash the whole system after relocking the bootloader the count is still there.

wth i just doing wrong???
the firmware is Blur_Version.14.91.11.falcon_umts.Retail.en.DE

he gives me this error and on the phone says failed to validate system image

3dmb.png
 
Last edited:

matmutant

Senior Member
Mar 17, 2011
3,395
4,743
~/
andrux-and-me.blogspot.com
Moto G
Moto E
yes that is right we would need to find out what file is responsible for storing the count or status of the boot loader as its not the boot loader its self that holds this information.even if you flash the whole system after relocking the bootloader the count is still there.

Motorola talked about a fuse that is "burned" when unlocking, that's why they know, even after relocking :)


_________________________


i need to update FAQ about relocking (i never ever needed to relock a bootloader myself :p )

So for relocking, i would like to directly link your post @akaygee, please duplicate it in FAQ thread :) . then, i'll ask the current thread to be moved to Q&A.
 

akaygee

Member
Jan 24, 2013
30
24
Scotland
@danger2u
interesting ,are you using a carrier branded phone.? that or the bootloader is locked
i used this method on a uk retail moto g and never run into any problems
 
Last edited:

denzel09

Senior Member
Jun 28, 2009
4,321
891
Teheran
Motorola talked about a fuse that is "burned" when unlocking, that's why they know, even after relocking :)


_________________________


i need to update FAQ about relocking (i never ever needed to relock a bootloader myself :p )

So for relocking, i would like to directly link your post @akaygee, please duplicate it in FAQ thread :) . then, i'll ask the current thread to be moved to Q&A.

So it will be impossible to reset that status ?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    this is just a quick howto am at work....
    the files you need and will use are in moto g section of this forum.

    firmware's here
    http://forum.xda-developers.com/showthread.php?t=2546251


    relock bootloader
    =============
    keep in mind this will remove any and all personal files and settings
    like any self respecting android user you have made backups right....!!!! GOOD

    download adb and fastboot extract or place into a directory.
    now download the factory firmware image of your phone extract zip/rar and place into the same directory.

    download "relock bootloader.txt" rename to "relock bootloader.bat" place this in the same directory as the files and double click it ,this would save you typing in all the commands from below in by hand and does it all for you.recap....if you did download and run relock bootloader.bat you dont need to type anything form below

    open a command prompt as administrator ,navigate to the directory where you placed all the files we are working with and type as follows giving time for each command to finish.

    fastboot oem lock begin
    fastboot flash partition gpt.bin
    fastboot flash motoboot motoboot.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 modem NON-HLOS.bin
    fastboot erase modemst1
    fastboot erase modemst2
    fastboot flash fsg fsg.mbn
    fastboot erase cache
    fastboot erase userdata
    fastboot oem lock
    7
    i done a relock last week and this works for me.use adb command "fastboot oem lock begin" go through the routine to flash factory firmware image and use "fastboot oem lock" command to finish after you flashed factory firmware.

    So, steps are these:

    1: fastboot oem lock begin
    2: flash stock firmware
    3: fastboot oem lock

    And BL will be locked again. Correct me if i'm wrong.

    Problem is that for "unlocked" we need always of a code by motorola atm.
    6
    Hi,
    I want to give my unlocked Moto G to a family member - and I'd like to relock the bootloader again, for security reasons.(I don't care about the warranty)

    is there a way to do that?

    1. open FAQ
    2. ctrl+f : "relock"
    4
    Given European Directive 1999/44/CE, just the fact that you modified or changed the software of your device, is not a sufficient reason to void your statutory warranty.

    https://fsfe.org/campaigns/android/liberate.en.html

    Does rooting your phone invalidate its warranty? (In EU)

    In short: No. Just the fact that you modified or changed the software of your device, is not a sufficient reason to void your statutory warranty. As long as you have bought the device as a consumer in the European Union.

    http://piana.eu/root
    3
    wth i just doing wrong???
    the firmware is Blur_Version.14.91.11.falcon_umts.Retail.en.DE

    he gives me this error and on the phone says failed to validate system image

    3dmb.png

    I think I solved this problem.....

    executing "fastboot flash system system.img" didn't work for me either (permission denied)
    But surprisingly it worked with the fastboot.exe included in the firmware-images zip-file....

    so just do a "cd" to the root-directory of the folder, and then:
    > Windows\fastboot.exe flash system system.img
    (since the fastboot.exe is in the 'windows' subfolder)
    this way, you won't be using your installed ADB/fastboot-versions, but the ones that are in the zip-file



    unfortunately the logo.bin was still said "bootloader unlocked". though the bootloader said "locked". so you just have to manually flash the logo.bin from here:
    http://forum.xda-developers.com/showthread.php?t=2548530