[Script] Moto G US 4.4.2 Firmware Restore, Relock bootloader and flash Moto Logo

Search This thread

nlra

Senior Member
Sep 5, 2012
160
85
I am talking about stock rom always, no custom rom. With stock rom you can relock bl.
Incorrect. You cannot relock the bootloader on any Moto G without reflashing the stock ROM again during the procedure, even if you are already running stock. So there is no way to leave the phone rooted and then re-lock the bootloader. If you are still running stock but have modified it in the slightest (e.g., root), all of your changes will be wiped out during the re-locking procedure.

Procedure is:

fastboot oem lock begin
...various 'fastboot' commands to flash the different parts of the ROM...
fastboot oem lock

-- Nathan
 
  • Like
Reactions: shmotog

shmotog

Senior Member
Dec 30, 2013
108
10
Incorrect. You cannot relock the bootloader on any Moto G without reflashing the stock ROM again during the procedure, even if you are already running stock. So there is no way to leave the phone rooted and then re-lock the bootloader. If you are still running stock but have modified it in the slightest (e.g., root), all of your changes will be wiped out during the re-locking procedure.

Procedure is:

fastboot oem lock begin
...various 'fastboot' commands to flash the different parts of the ROM...
fastboot oem lock

-- Nathan

Thank you Nathan. That's the answer I was looking for.
I have a few more questions if you could help me out please:

1. Is there a difference between STOCK ROM and STOCK RECOVERY? Say if I have STOCK ROM AND STOCK RECOVERY with SUPERSU installed, and later on i flash STOCK RECOVERY (not rom) would it enable me to relock bootloader? If so where can I find a STOCK RECOVERY?

2. If bootloader is unlocked first time, and subsequent relocks would still enable the data to be wiped clean upon unlocking?

3. I think I solved my problem sort of by installing AVAST MOBILE SECURITY ANTI THEFT. What it did was disable USB DEBUGGING. Do you reckon that now I dont really need to relock bootloader?

4. While unlocking bootloader it gave a stern warning on the lines of it might even cause PHYSICAL HARM or INJURY. I'm kind of scared about it. Do you reckon its safe to keep bootloader unlocked?
 

denzel09

Senior Member
Jun 28, 2009
4,355
895
Teheran
You need a serious reading of all this forum and all basic guides about android or you will risk to do only damages. Seriously.
By the way why you or others need to relock bootloader?
What it the purpose?
 

nlra

Senior Member
Sep 5, 2012
160
85
I know.

There is nothing wrong in my reply: "You can relock bl only on stock rom". Why you quoted me buddy?
Your reply was clearly made in the context of somebody asking whether or not they could unlock, flash stock ROM, root it, and then relock while keeping root. You can't do this. When you relock, you are forced to reflash the ROM and undo any modifications you made to it, including root.

You yourself even said in a previous message:

if you unlock bl, then root, then relock it so the root should remain and work easily i think
My point is that this is *not* possible. So I'm not sure why you are confused that I called you out on this.

-- Nathan

---------- Post added at 09:42 PM ---------- Previous post was at 09:27 PM ----------

1. Is there a difference between STOCK ROM and STOCK RECOVERY?
Recovery is just one aspect of the ROM. In reality, Recovery is a second partition on the flash chip that contains a bare-minimum installation of Android (along with a few simple diagnostic tools) that you can boot into if your main Android installation gets trashed and you want to attempt repair or maintenance on it.

2. If bootloader is unlocked first time, and subsequent relocks would still enable the data to be wiped clean upon unlocking?
I am not sure I understand the question.

3. I think I solved my problem sort of by installing AVAST MOBILE SECURITY ANTI THEFT. What it did was disable USB DEBUGGING. Do you reckon that now I dont really need to relock bootloader?
Why did you think you needed to undertake relocking the boot loader in the first place?

4. While unlocking bootloader it gave a stern warning on the lines of it might even cause PHYSICAL HARM or INJURY. I'm kind of scared about it. Do you reckon its safe to keep bootloader unlocked?
Generally speaking, it should be fine. The warning is there because without a locked bootloader, some software protections have been removed that might normally prevent hardware damage from occurring that is not easily repairable or reversible (for example, somebody either maliciously or accidentally flashing the wrong thing to the modem baseband chip, which would probably brick the RF part -- WiFi and cellular functionality -- of the phone, or perhaps somebody overclocking the CPU beyond its natural bounds and thus shortening its lifespan). Just be smart about what you do and what software you install (and what sources of software you trust).

-- Nathan

---------- Post added at 09:49 PM ---------- Previous post was at 09:42 PM ----------

You need a serious reading of all this forum and all basic guides about android or you will risk to do only damages. Seriously.
By the way why you or others need to relock bootloader?
What it the purpose?
Good question, and one that I also asked him. There are valid reasons for somebody to want to have their boot loader locked, such as the ability to continue to be offered and receive OTA updates rather than having to install them manually. Or, in the States, where Motorola has an all-too-common bias against phones running modified software, sending in an unlocked phone with a manufacturing defect to be repaired could result in your claim being rejected and your warranty voided, even in cases where it is abundantly clear that the modified software played no part in the hardware defect. (Unfortunately, Moto phones keep track of whether they have ever been unlocked, so even if you relock it, Moto can tell that it was unlocked at some point in its past, and still consider your warranty voided.)

I'm not sure why 'shmotog' in particular wants to relock his/her phone though.

-- Nathan
 
  • Like
Reactions: shmotog

denzel09

Senior Member
Jun 28, 2009
4,355
895
Teheran
Your reply was clearly made in the context of somebody asking whether or not they could unlock, flash stock ROM, root it, and then relock while keeping root. You can't do this. When you relock, you are forced to reflash the ROM and undo any modifications you made to it, including root.

Like written i don't know, because i never tried, it's completely unseful in this case, but in theory it should be like in other phones, from this my reply.
You tried? The next point was that on stock it's possible relock bootloader, this was the point. But if you tried and seen that it's need reflash rom also if this last it's completely stock without root, so ok ;)

Good question, and one that I also asked him. There are valid reasons for somebody to want to have their boot loader locked, such as the ability to continue to be offered and receive OTA updates rather than having to install them manually. Or, in the States, where Motorola has an all-too-common bias against phones running modified software, sending in an unlocked phone with a manufacturing defect to be repaired could result in your claim being rejected and your warranty voided, even in cases where it is abundantly clear that the modified software played no part in the hardware defect. (Unfortunately, Moto phones keep track of whether they have ever been unlocked, so even if you relock it, Moto can tell that it was unlocked at some point in its past, and still consider your warranty voided.)

I'm not sure why 'shmotog' in particular wants to relock his/her phone though.

-- Nathan

It's completely unseful relock bl, completely, first for that you writed, motorola can know always that bl has been unlocked at least one time, and second, you can receive OTA also with bl unlocked, my last 2 ota were with bl unlocked. There are not problems with bl unlocked and OTA. This last i tried :D
 
Last edited:
  • Like
Reactions: jonas_andro

shmotog

Senior Member
Dec 30, 2013
108
10
Like written i don't know, because i never tried, it's completely unseful in this case, but in theory it should be like in other phones, from this my reply.
You tried? The next point was that on stock it's possible relock bootloader, this was the point. But if you tried and seen that it's need reflash rom also if this last it's completely stock without root, so ok ;)



It's completely unseful relock bl, completely, first for that you writed, motorola can know always that bl has been unlocked at least one time, and second, you can receive OTA also with bl unlocked, my last 2 ota were with bl unlocked. There are not problems with bl unlocked and OTA. This last i tried :D

I do not care aobut motorola knowing, i do NOT want OTA. The purpose I wanted to relock bootloader, is simply so that adb commands cant be executed by a third party and my data would be wiped if they try to unlock bootloader.

---------- Post added at 12:07 PM ---------- Previous post was at 12:02 PM ----------

Your reply was clearly made in the context of somebody asking whether or not they could unlock, flash stock ROM, root it, and then relock while keeping root. You can't do this. When you relock, you are forced to reflash the ROM and undo any modifications you made to it, including root.

You yourself even said in a previous message:


My point is that this is *not* possible. So I'm not sure why you are confused that I called you out on this.

-- Nathan

---------- Post added at 09:42 PM ---------- Previous post was at 09:27 PM ----------


Recovery is just one aspect of the ROM. In reality, Recovery is a second partition on the flash chip that contains a bare-minimum installation of Android (along with a few simple diagnostic tools) that you can boot into if your main Android installation gets trashed and you want to attempt repair or maintenance on it.


I am not sure I understand the question.


Why did you think you needed to undertake relocking the boot loader in the first place?


Generally speaking, it should be fine. The warning is there because without a locked bootloader, some software protections have been removed that might normally prevent hardware damage from occurring that is not easily repairable or reversible (for example, somebody either maliciously or accidentally flashing the wrong thing to the modem baseband chip, which would probably brick the RF part -- WiFi and cellular functionality -- of the phone, or perhaps somebody overclocking the CPU beyond its natural bounds and thus shortening its lifespan). Just be smart about what you do and what software you install (and what sources of software you trust).

-- Nathan

---------- Post added at 09:49 PM ---------- Previous post was at 09:42 PM ----------


Good question, and one that I also asked him. There are valid reasons for somebody to want to have their boot loader locked, such as the ability to continue to be offered and receive OTA updates rather than having to install them manually. Or, in the States, where Motorola has an all-too-common bias against phones running modified software, sending in an unlocked phone with a manufacturing defect to be repaired could result in your claim being rejected and your warranty voided, even in cases where it is abundantly clear that the modified software played no part in the hardware defect. (Unfortunately, Moto phones keep track of whether they have ever been unlocked, so even if you relock it, Moto can tell that it was unlocked at some point in its past, and still consider your warranty voided.)

I'm not sure why 'shmotog' in particular wants to relock his/her phone though.

-- Nathan

Thanks for the reply Nathan, that really helped me. And the reason why I wanted bootloader re-locked is:

1. So that no one could exec adb pull commands and such in recovery as a locked bootloader wont allow this. So security is the reason. If they do it they would have to unlock bootloader which would execute wipe of my data which would mean that security would stay.

2. I was afraid of the 'physical injury' warning. I though relocking bootloader would make the phone 'safe'. However I understand from your reply that even if I do that, once its rooted, the bootloader doesnt matter.
 
Last edited by a moderator:

denzel09

Senior Member
Jun 28, 2009
4,355
895
Teheran
I do not care aobut motorola knowing, i do NOT want OTA. The purpose I wanted to relock bootloader, if you would only read what I wrote, is simply so that adb commands cant be executed by a third party and my data would be wiped if they try to unlock bootloader.

There is nothing between "i do NOT want OTA" and relock/unlock bootlodaer, really nothing. About the "security purpose", also here it's a bit unsense, who want that do all that on your phone:laugh: I don't think the reason is this.
Listen me, it's completely unseful relock bootloader for OTA updates, for not OTA updates or for warranty. But if you want that for "security reason" you must follow the procedure that you can find in many guides in this section, the input is what nlra has written before. So you will have a relock bootloader. :highfive:
 
Last edited by a moderator:

Saqib Nazm

Retired Forum Mod / Inactive Recognized Themer
Oct 3, 2012
2,889
7,757
Virginia, USA
Get some fresh air lads, things here are going a bit rough isn't it? I had to delete/edit some of the comments of this thread. Stay on topic, don't show disrespect to others, don't reply in a sarcasm or rude manner. If it happens next time, I will have to address users who are involved via PM. I don't think anyone would want that. Have a good day :)
 
  • Like
Reactions: meekrawb

abhishekk89

Member
Jan 18, 2013
31
0
Lafayette, IN
I'm on stock ROM (rooted with unlocked bootloader) and have the latest update 4.4.3. I had a small hardware issue and I need to get the phone serviced. I hence have to relock the bootloader (consequently flash the stock ROM). Can it be done using this tutorial ? Are there any issues flashing the older 4.4.2 ROM ?
 

vikassoni

Senior Member
Jun 13, 2008
57
3
GWALIOR
Relock 4.4.4 XT1033 India version ?

wanna relock bootloader
android version KK 4.4.4

system version
210.12.40.falcon_umtsds.AsiaRetail.en.03

i got BIG problem
 

lonaysta

Member
Jan 29, 2013
19
1
Yes you can relock and unlock the bootloader with the same code you unlock it with the first time.
when you got the device the bootloader is status code 0 locked once unlocked it is status code 3 and relocked is status code 2.
now you can bounce between status code 2 and 3 locked and unlocked with the bootloader unlock code.

Hi, I don't know if you're still active around here but this thread helps me a lot. I'd appreciate more if you could help clarify on this little confusion that I have.
Here's the information I comprehend. According to the post, the bootloader of Moto G (Gen 1 for the discussion. More precisely, I have a US Retail XT1034) has three status to show the lock status:
Status 0: never unlocked, warranty valid if not expired.
Status 3: unlocked, warranty void.
Status 2: unlocked before but relocked, warranty voided before.
Besides, for the full stock firmware, status 2 and 3 share a same logo.bin image with warning, while the status 0 has the "untainted" version.

Do I get it correctly?

My Moto G is relocked and showing status 2 and that warning screen. So the only way to get rid of that warning screen is to manually fastboot flash logo custom_logo.bin to overwrite the stock one. Is that correct? I'm quite happy that doing so doesn't require an unlocked bootloader:)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 31
    I put together a couple nice little Batch files for you guys. Tool is for windows only

    This is what they can do for you
    1. Relock a unlocked bootloader and complete wipe device back to android 4.4.2 along with fixing the Unlock logo
    2. Full Restore to android version 4.4.2 including a full wipe
    3. Full Restore to android version 4.4.2 NO WIPE
    4. Flash Moto Logo to replace the unlock bootloader Logo

    To run any of these scripts you must be in bootloader mode / Fastboot Mode
    Power off Device
    hold both volume up and down then power
    hold all buttons for 3 seconds then release
    this will put you in bootloader mode
    Now run the script you want to run

    check out this video of me using the scripts
    Video

    Link to the firmware tool can be found HERE

    Link to Motorola Drivers needed are Here

    Warning Use these at your own risk
    3

    Just download your firmware and replace the the firmware I have in the zip with the XT1034 the batch files should work the same.

    sent from my Galaxy Note 3 running HyperDrive.
    2
    I do not care aobut motorola knowing, i do NOT want OTA. The purpose I wanted to relock bootloader, if you would only read what I wrote, is simply so that adb commands cant be executed by a third party and my data would be wiped if they try to unlock bootloader.

    There is nothing between "i do NOT want OTA" and relock/unlock bootlodaer, really nothing. About the "security purpose", also here it's a bit unsense, who want that do all that on your phone:laugh: I don't think the reason is this.
    Listen me, it's completely unseful relock bootloader for OTA updates, for not OTA updates or for warranty. But if you want that for "security reason" you must follow the procedure that you can find in many guides in this section, the input is what nlra has written before. So you will have a relock bootloader. :highfive:
    2
    In the Netherlands, the retailer is responsible for warranty by law. They cannot simply forward me to the manufacturer. Additionally, consumer law dictates warranty cannot be void for manufacturing errors by a mere software mod. Therefore I don't care for those intimidating "your warranty is now void" claims.

    Sent from my XT1032 using Tapatalk
    2
    Problem with your script and going to stock for example with GB tesco roms is that in your script:
    Code:
    %fastboot% flash system system.img_sparsechunk[B][U]1[/U][/B]
    %fastboot% flash system system.img_sparsechunk[B][U]2[/U][/B]
    %fastboot% flash system system.img_sparsechunk[B][U]3[/U][/B]
    And in packages of GB rom there are system.img_sparsechunk0, system.img_sparsechunk1, system.img_sparsechunk2.
    So people be careful.

    ---------- Post added at 04:21 PM ---------- Previous post was at 04:00 PM ----------

    How would I do this (replace the firmware) for XT1032 GB Retail version? I would need VERY basic instructions!! I have downloaded it to my laptop running Windows 7, it is - RETAIL-GB_4.4.2_KLB20.9-1.10-1.9_cid7_CFC_1FF_v5_SVC.xml.zip -

    All credits to Tomsgt

    1. Download this: Here
    2. Unzip it on your desktop.
    3. Open the "Firmware restore lock and more 4.4.2" folder and then delete this files:
      • gpt.bin
      • motoboot.img
      • logo.bin
      • boot.img
      • recovery.img
      • system.img_sparsechunk1
      • system.img_sparsechunk2
      • system.img_sparsechunk3
      • NON-HLOS.bin
      • fsg.mbn
    4. Open the "Restore US_retail_XT1032_KXB20.9-1.8-1.4_CFC.bat" with notepad and change this lines:
      Code:
      %fastboot% flash system system.img_sparsechunk1
      %fastboot% flash system system.img_sparsechunk2
      %fastboot% flash system system.img_sparsechunk3

      to this:

      Code:
      %fastboot% flash system system.img_sparsechunk0
      %fastboot% flash system system.img_sparsechunk1
      %fastboot% flash system system.img_sparsechunk2

      and save the file.
    5. Download proper drivers and install them Here
    6. Open "RETAIL-GB_4.4.2_KLB20.9-1.10-1.9_cid7_CFC_1FF_v5_SVC.xml.zip" and copy this files:
      • gpt.bin
      • motoboot.img
      • logo.bin
      • boot.img
      • recovery.img
      • system.img_sparsechunk0
      • system.img_sparsechunk1
      • system.img_sparsechunk2
      • NON-HLOS.bin
      • fsg.mbn
      to "Firmware restore lock and more 4.4.2"
    7. Power off Device
    8. hold both volume up and down then power
    9. hold all buttons for 3 seconds then release
    10. this will put you in bootloader mode
    11. connect your phone to the pc
    12. Now run "Restore US_retail_XT1032_KXB20.9-1.8-1.4_CFC.bat"