How to re-lock bootlader

Dëmön_1

Member
Jul 9, 2014
29
8
0
I don't think so.

Code:
C:\adb>fastboot flash boot boot.img
target reported max download size of 536870912 bytes
sending 'boot' (32768 KB)...
OKAY [  0.970s]
writing 'boot'...
(bootloader) Image signed with key bad key
OKAY [  0.832s]
finished. total time: 1.801s
Code:
C:\adb>fastboot oem lock
...
(bootloader) Still require signed boot.img
OKAY [  0.003s]
finished. total time: 0.003s
Wich boot.img are you trying?
Is it possible to send it to me?
I downloaded the rom from another side because from official motorola it is saying I need to be logged it.
While flashing it is saying that it is a security downgrade and boot cant be verified.
 
  • Like
Reactions: popper668

nouriassafi

Member
Mar 7, 2011
5
0
0
Wich boot.img are you trying?
Is it possible to send it to me?
I downloaded the rom from another side because from official motorola it is saying I need to be logged it.
While flashing it is saying that it is a security downgrade and boot cant be verified.
I tried this image:
GRIFFIN_NPL26.118-20-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml (September 2017)
and I managed to lock the bootloader.
 
Last edited:

Dëmön_1

Member
Jul 9, 2014
29
8
0
I have done it.
The bootloader is locked and phone working.
I needed to do some steps.
The first time the bootloader was locked but the phone was only starting to fastboot, no normal boot was possible.
I unlocked the bootloader again and flashed the NPL26.118-20-5 rom again but this time without locking.
Let the phone boot complete until I could use it.
Now again into fastboot mode and flashed only boot.img, oem.img and all systemchunks, without erasing anything.
Locked the bootloader with "fastboot oem lock" and it worked.
Bootloader is closed.

EDIT:
I forgot to say something.
The rom I used was this: https://rsdsecure-cloud.motorola.co...ubsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
Today I could not only start the download it was completly downloaded.


Code:
fastboot oem lock begin
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 dsp adspso.bin
fastboot flash oem oem.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash system system.img_sparsechunk.3
mfastboot flash system system.img_sparsechunk.4
mfastboot flash system system.img_sparsechunk.5
mfastboot flash system system.img_sparsechunk.6
mfastboot flash system system.img_sparsechunk.7
mfastboot flash system system.img_sparsechunk.8
mfastboot flash system system.img_sparsechunk.9
mfastboot flash system system.img_sparsechunk.10
mfastboot flash system system.img_sparsechunk.11
mfastboot flash system system.img_sparsechunk.12
mfastboot flash system system.img_sparsechunk.13
mfastboot flash system system.img_sparsechunk.14
mfastboot flash system system.img_sparsechunk.15
mfastboot flash system system.img_sparsechunk.16
mfastboot flash system system.img_sparsechunk.17
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot oem lock
 
Last edited:
Jul 11, 2012
16
11
0
Any chance you could be so kind as to rehost the zip somewhere like androidfilehost? I have to return my Z tomorrow (bluetooth is and was always totally broken) and I'd like to return it stock/locked if possible to avoid getting charged unfairly. Appreciate all the work you've done

*** edit - nevermind - if you google the zip name, there are some google plus pages that have links to the same moto URL - but they work, presumably the referrer links are whitelisted somehow. Will be giving this a try in a min!
 
Last edited:

Benoe

Senior Member
Dec 15, 2006
114
38
0
Please let us know that after this reflash your battery consumption/SoT got any better than before.
Thanks.

Sent from my XT1650 using Tapatalk

---------- Post added at 04:28 AM ---------- Previous post was at 04:08 AM ----------

Any chance you could be so kind as to rehost the zip somewhere like androidfilehost? I have to return my Z tomorrow (bluetooth is and was always totally broken) and I'd like to return it stock/locked if possible to avoid getting charged unfairly. Appreciate all the work you've done

*** edit - nevermind - if you google the zip name, there are some google plus pages that have links to the same moto URL - but they work, presumably the referrer links are whitelisted somehow. Will be giving this a try in a min!
Please also let us know if your bt problem has solved by the reflash.

BTW what model/region do you have?

Sent from my XT1650 using Tapatalk
 
Jul 11, 2012
16
11
0
Sure - the first attempt just now failed. I skipped the initial instructions, in that I omitted the 'fastboot oem lock' steps, and went right to your second step from post #26. Let it boot to setup, then exited back to fastboot, and did boot.img/oem.img/chunks/oem lock. Still got the 'untrusted' loading screen.

I have xt1650-03 united states GSM unlocked. Nothing has fixed bluetooth - it's screwed. Had the issue I found in several searches - the bluetooth settings page never finds any devices, and no devices can find the moto. The "scanning" wheel never turns. Disabling location scanning didn't help, nor did safe mode. Cache clearing via settings->apps, or TWRP didn't work. Flashing roms didn't work. I even got some 7.12 Bluetooth Sharing/BluetoothMidi apks and painstakingly set those up as system apps. No dice. Hardware problem, clearly, and I wasn't willing to go without bluetooth.

I'm trying the process again, this time going through the full flash instructions, then the flash without locking, then the step from #26 where you flashed some images and locked. Will see if that helps.

One other note - clogo has failed to flash each time I've tried to do it:

erasing 'clogo'...
(bootloader) Permission denied
FAILED (remote failure)
 

Dëmön_1

Member
Jul 9, 2014
29
8
0
Was is possible for you to lock the bootloader at all?
I could lock it at first try already but then the phone didnt want to boot at all - only to fastboot with the error "couldnt verify and use the software repair program on computer to fix it".
The bootloader was for sure locked but the phone not working.

I made some tests while I was at it.
I tried directly fastboot oem lock but of course the error was "still need signed boot".
flashed boot - now with fastboot oem lock I got "still need oem and/or system - key bad key"
At this point I did it like I have written in #26.
I could see that flashing boot seems to work.
I tried the other day with a zip downloaded from other place.
With the other rom it didnt work at all and trying flashing boot the error was "security downgrade". It should have been 20-5 but I think it wasnt.

Since bootloader lock the phone passes safetynet directly.
 

Benoe

Senior Member
Dec 15, 2006
114
38
0
Was is possible for you to lock the bootloader at all?
I could lock it at first try already but then the phone didnt want to boot at all - only to fastboot with the error "couldnt verify and use the software repair program on computer to fix it".
The bootloader was for sure locked but the phone not working.

I made some tests while I was at it.
I tried directly fastboot oem lock but of course the error was "still need signed boot".
flashed boot - now with fastboot oem lock I got "still need oem and/or system - key bad key"
At this point I did it like I have written in #26.
I could see that flashing boot seems to work.
I tried the other day with a zip downloaded from other place.
With the other rom it didnt work at all and trying flashing boot the error was "security downgrade". It should have been 20-5 but I think it wasnt.

Since bootloader lock the phone passes safetynet directly.
Do you have any improvement in battery consumption since the reflash, or is it the same as before?
 

Finsther

Member
Oct 24, 2017
7
1
0
I have done it.
The bootloader is locked and phone working.
I needed to do some steps.
The first time the bootloader was locked but the phone was only starting to fastboot, no normal boot was possible.
I unlocked the bootloader again and flashed the NPL26.118-20-5 rom again but this time without locking.
Let the phone boot complete until I could use it.
Now again into fastboot mode and flashed only boot.img, oem.img and all systemchunks, without erasing anything.
Locked the bootloader with "fastboot oem lock" and it worked.
Bootloader is closed.

EDIT:
I forgot to say something.
The rom I used was this: xxxx
Today I could not only start the download it was completly downloaded.


Code:
fastboot oem lock begin
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 dsp adspso.bin
fastboot flash oem oem.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash system system.img_sparsechunk.3
mfastboot flash system system.img_sparsechunk.4
mfastboot flash system system.img_sparsechunk.5
mfastboot flash system system.img_sparsechunk.6
mfastboot flash system system.img_sparsechunk.7
mfastboot flash system system.img_sparsechunk.8
mfastboot flash system system.img_sparsechunk.9
mfastboot flash system system.img_sparsechunk.10
mfastboot flash system system.img_sparsechunk.11
mfastboot flash system system.img_sparsechunk.12
mfastboot flash system system.img_sparsechunk.13
mfastboot flash system system.img_sparsechunk.14
mfastboot flash system system.img_sparsechunk.15
mfastboot flash system system.img_sparsechunk.16
mfastboot flash system system.img_sparsechunk.17
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot oem lock
Link Is dead man [emoji24][emoji24]

Enviado desde mi XT1650 mediante Tapatalk
 

sno1c

Member
Jun 9, 2017
9
1
0
Hi guys,
I want to return to stock and the relock the boot loader on my Moto z.
Actually i am using the resurrection remix custom rom.
Which steps do i have to follow to return to stock and relock?
I downloaded the firmware "GRIFFIN_NPL26.118-20-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip".
Do i just have to flash this rom with fast boot and everything is fine, or do i have to follow other steps?
Thanks in advance for your reply.
 

Benoe

Senior Member
Dec 15, 2006
114
38
0
Hi guys,
I want to return to stock and the relock the boot loader on my Moto z.
Actually i am using the resurrection remix custom rom.
Which steps do i have to follow to return to stock and relock?
I downloaded the firmware "GRIFFIN_NPL26.118-20-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip".
Do i just have to flash this rom with fast boot and everything is fine, or do i have to follow other steps?
Thanks in advance for your reply.
Flash should be enough, check Demon's post.

Tapatalkkal küldve az én XT1650 eszközömről
 

sno1c

Member
Jun 9, 2017
9
1
0
Just a short report of my progress:
Got my bootloader relocked. Followed post #26 and this did the trick:
Full flash of the stock rom.
Boot up the stock rom and do the inital android setup.
Reboot to bootloader.
Run "fastboot oem lock" it tells you to run and the command a second time so
Run "fastboot oem lock" again
Flash boot.img
Flash oem.img
Flash all sparsechunks
Run "fastboot oem lock"
Then the phone rebooted with a relocked bootloader into the android system.
Thanks a lot for this tutorial :)
 

matonka007

Senior Member
Mar 22, 2011
219
48
0
Žatec
Did the same as in #26 post and everything working now! This is only one working solution. Tried many other guides and nothing helps. Great. Now I have locked BL again and everything working :)