How to Lock Bootloader on custom rom - Moto G 2014 LTE Q&A, Help & Troubleshooting

Hi,
How do i lock the bootloader with a custom rom, is it possible without flashing stock firmware?
also, does locking the bootloader erase data?
Thanks

If you lock your bootloader, the bootloader dont erase data, its very simple to lock, you must have adb&fastboot installed on your pc, you put you phone in fastboot mode and you put: fastboot oem lock

Related

Re-lock Bootloader

I have the XT-1052 version of Moto X and its running the Asia Retail firmware. I had unlocked the bootloader and flashed CM12 but returned to stock rom through this guide http://forum.xda-developers.com/moto-x/general/retail-firmware-uploaded-xt1052-t2976596. I will be selling the device and want to re lock the bootloader. Can i type the ''fastboot oem lock'' command in mfastboot tool and re lock the bootloader? Also, will it erase the whole data on the device?
KD25 said:
I have the XT-1052 version of Moto X and its running the Asia Retail firmware. I had unlocked the bootloader and flashed CM12 but returned to stock rom through this guide http://forum.xda-developers.com/moto-x/general/retail-firmware-uploaded-xt1052-t2976596. I will be selling the device and want to re lock the bootloader. Can i type the ''fastboot oem lock'' command in mfastboot tool and re lock the bootloader? Also, will it erase the whole data on the device?
Click to expand...
Click to collapse
Yes, fastboot oem lock will lock it, and no it will not wipe data. Only unlocking wipes data.
But you status code will show relocked you can never get status code back to locked once unlocked.
Travisdroidx2 said:
But you status code will show relocked you can never get status code back to locked once unlocked.
Click to expand...
Click to collapse
Correct. Whoever has the phone will be able to see the "tamper seal" that shows the bootloader was previously unlocked, but is now locked again.
I would provide whoever you sell the phone to the bootloader unlock code so they can unlock in the future if they so desire. Not sure if they can request the code from Motorola again or not.
fury683 said:
Correct. Whoever has the phone will be able to see the "tamper seal" that shows the bootloader was previously unlocked, but is now locked again.
I would provide whoever you sell the phone to the bootloader unlock code so they can unlock in the future if they so desire. Not sure if they can request the code from Motorola again or not.
Click to expand...
Click to collapse
I tried it but it asks me to flash the signed images. The link i mentioned above comes with an XML file which dictates the steps RSD should be following, right? So if i upload the XML file can you edit the command line and add the command? I am not an expert in this stuff.
i have relocked flashing manually with fastboot, not sure if you add the oem lock cmd to the xml will work.
fastboot oem lock begin
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash logo logo.bin
fastboot erase userdata
fastboot erase cache
fastboot oem lock
hbenz2008 said:
i have relocked flashing manually with fastboot, not sure if you add the oem lock cmd to the xml will work.
fastboot oem lock begin
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash logo logo.bin
fastboot erase userdata
fastboot erase cache
fastboot oem lock
Click to expand...
Click to collapse
The files that are present in the rom folder are boot.img, fsg.mbn, gpt.bin, logo.bin, motoboot.img, NON-HLOS.bin, recovery.img and system.img. Can you modify the list of commands to add the aditional files. Thanks.
just flashing the above is enough to relock. Flash away
Wireless...
hbenz2008 said:
just flashing the above is enough to relock. Flash away
Wireless...
Click to expand...
Click to collapse
Thanks man. Will update about how it goes.

WIFI mod stock rom!

Heres how to get wifi on the stock rom without root.
Type these commands! and make sure you have fastboot setup on your computer.
Code:
fastboot oem unlock (Unlocks bootloader if your not already unlocked if your just skip this)and now do fastboot flash bootloader WIFIGWR.img
And now you can go do
Code:
fastboot oem lock
if you want to relock your bootloader.
Now enjoy wifi !
Thread closed as member has been proven to supply damaging files

Can't re-lock bootloader

I tried to flash stock recovery and boot.img but it still re-unlocks after rebooting. Help !
I tried to lock , unlock and lock but still the same ...

going back to stock

Hey,
I would like to go back to stock from unlocked + root.
What is the correct way to do it?
Little tutorial would be awesome also for other users I think.
Regards,
H.
dodjob said:
Hey,
I would like to go back to stock from unlocked + root.
What is the correct way to do it?
Little tutorial would be awesome also for other users I think.
Regards,
H.
Click to expand...
Click to collapse
https://forum.xda-developers.com/mi-a2/how-to/mi-a2-toolkit-unlock-bootloader-root-t3834585
Tool has a revert to stock option. You can also download the latest fastboot image and flash via MIFlash.
https://forum.xda-developers.com/mi-a2/how-to/ota-v9-6-5-0-odimife-t3823445
Daha3ker said:
https://forum.xda-developers.com/mi-a2/how-to/mi-a2-toolkit-unlock-bootloader-root-t3834585
Tool has a revert to stock option. You can also download the latest fastboot image and flash via MIFlash.
https://forum.xda-developers.com/mi-a2/how-to/ota-v9-6-5-0-odimife-t3823445
Click to expand...
Click to collapse
will that lock bootloader again?
To lock the bootloader you can either use the tool (which has the option to lock) or do it manually with the commands
Fastboot oem lock
Fastboot flashing lock
And finally
Fastboot flashing lock_critical
Be sure to flash stock before locking the bootloader, otherwise you may end in a bootloop.
Daha3ker said:
To lock the bootloader you can either use the tool (which has the option to lock) or do it manually with the commands
Fastboot oem lock
Fastboot flashing lock
And finally
Fastboot flashing lock_critical
Be sure to flash stock before locking the bootloader, otherwise you may end in a bootloop.
Click to expand...
Click to collapse
Hi, thanks for the help
Fastboot oem lock is not enough?
Why should i do more this, Fastboot flashing lock And Fastboot flashing lock_critical ?
thx
pack21 said:
Hi, thanks for the help
Fastboot oem lock is not enough?
Why should i do more this, Fastboot flashing lock And Fastboot flashing lock_critical ?
thx
Click to expand...
Click to collapse
You only need to lock the last two if you unlocked them.

restore to stock for warranty?

I used this two command to unlock
fastboot flashing unlock
fastboot flashing unlocl_critical
So when i want to return to stock
flash stock rom via miflash flsh_all
Then type this
fastboot flashing lock_critical
fastboot flashing lock
fastboot oem lock
Is this the correct one?
amnher said:
I used this two command to unlock
fastboot flashing unlock
fastboot flashing unlocl_critical
So when i want to return to stock
flash stock rom via miflash flsh_all
Then type this
fastboot flashing lock_critical
fastboot flashing lock
fastboot oem lock
Is this the correct one?
Click to expand...
Click to collapse
Download stock fastboot rom, flash with flash_all_lock option
q0kHaN said:
Download stock fastboot rom, flash with flash_all_lock option
Click to expand...
Click to collapse
But does it lock critical to? Cause I used the following commands:
fastboot flashing unlock
fastboot flashing unlock_critical
So do i need to revert also those two?
amnher said:
But does it lock critical to? Cause I used the following commands:
fastboot flashing unlock
fastboot flashing unlock_critical
So do i need to revert also those two?
Click to expand...
Click to collapse
if you do fastboot oem lock, it locks both (flash_all_lock does that)

Categories

Resources