yashsingh1/xdaforums huggingface dataset:
[Moto G Android Development] jamsh:
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 -
[Moto G Android Development] harisaduelite:
1 question please

I have the moto g 1033 version can i download my phoe's factory file and replace with the US zip file in your tool to flash my 1033 stock system??? :rolleyes:
[Moto G Android Development] akhil17kr:
What's the point of Unlocking the bootloader againi if your warranty is already voided

even if as a means for selling to other person he will get phone the already without warranty..
[Moto G Android Development] Tomsgt:
yes that should work just fine
[Moto G Android Development] Tomsgt:
some people just want to go to stock 100% the person you sell the device to doesnt normal get the warranty any way
[Moto G Android Development] akhil17kr:
So the people here rooting there phones doesn't love warranty or what ?? :p

as no one is working on exploit or something that will allows us to doesn't lose our warranty with unlocking bootloader?
[Moto G Android Development] Petrovski80:
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.
[Moto G Android Development] theu2621:
I always get a fastboot.exe error when i run any of the scripts and it crashes, but it loads back up and still goes through the install but I get alot of errors the whole time. what am i doing wrong?
[Moto G Android Development] tmacher:
Problem with your script and going to stock for example with GB tesco roms is that in your script:

%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_sparsechunk

0

, system.img_sparsechunk

1

, system.img_sparsechunk

2

.

So people be careful.

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

All credits to Tomsgt

Download this: Here

Unzip it on your desktop.

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

Open the "Restore US_retail_XT1032_KXB20.9-1.8-1.4_CFC.bat" with notepad and change this lines:

%fastboot% flash system system.img_sparsechunk1
%fastboot% flash system system.img_sparsechunk2
%fastboot% flash system system.img_sparsechunk3

to this:

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

and save the file.

Download proper drivers and install them Here

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"

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

connect your phone to the pc

Now run "Restore US_retail_XT1032_KXB20.9-1.8-1.4_CFC.bat"
[Moto G Android Development] Tomsgt:
this is for the retail us version of the Moto G other version might be different like you point out
[Moto G Android Development] Marty:
Hi, is it possible to have a command to just relock the bootloader? I have the GPE edition and unlocked the the bootloader with the simple "fastboot oem lock" command. However, I am sending the device back to Google for a refund but want to relock the bootloader first. Any help is greatly appreciated.
[Moto G Android Development] Tomsgt:
The command for the Google play edition should be fastboot oem lock

sent from my Galaxy Note 3 running HyperDrive.
[Moto G Android Development] Marty:
Thanks for the tip but that unfortunately I've already tried it and it does not work. It gives an error message saying its not a valid command. It says I need to enter in the command "fastboot oem lock begin" first. So I do that and it accepts the command but then it says it is ready to now flash an image/ROM which I do not want to do (I couldn't locate any signed GPE Moto G Roms either). I reboot the device and the unlock symbol is still there. I have a Nexus 5 which I have successfully unlocked and relocked so I am somewhat familiar with the process but it seems those same steps are not valid for the Moto G GPE. My guess is that in order to relock the bootloader, I need to flash a signed Moto G GPE ROM which I am not quite sure how to do or where to locate. Thanks again for any advice/help that you can offer.
[Moto G Android Development] Tomsgt:
ok then you have the same process for relocking as this the Normal Moto G. you need to find the firmware and flash it like this

SET fastboot=fastboot.exe

%fastboot% devices

%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_sparsechunk1

%fastboot% flash system system.img_sparsechunk2

%fastboot% flash system system.img_sparsechunk3

%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
[Moto G Android Development] Marty:
Thanks! Another forum member made a script for me that incorporated those exact commands you listed and it worked perfectly. My GPE Moto G bootloader is now successfully relocked and ready to ship back to Google.
[Moto G Android Development] Tomsgt:
glad you got it working
[Moto G Android Development] Bzonedroid:
i had the same problem when used this tool, but it still works!
[Moto G Android Development] Tomsgt:
Yeah I know it happens after you reboot the bootloader after flashing boot loader just close the error box and it will finish.

sent from my Galaxy Note 3 running HyperDrive.
[Moto G Android Development] jman1234:
That's actually the reason why I refer to restore my moto g manually instead of using this. Makes me afraid that the process will just stop and my phone will brick.
[Moto G Android Development] Tomsgt:
to each his own
[Moto G Android Development] kennypow3rs:
link not working anymore?
[Moto G Android Development] t00ny45:
Tried to restore to UK KitKat ROM instead, but I got this error message during installation:

target reported max download size of 536870912 bytes

error: cannot load 'system.img_sparsechunk0': No error

target reported max download size of 536870912 bytes

error: cannot load 'system.img_sparsechunk1': No error

target reported max download size of 536870912 bytes

error: cannot load 'system.img_sparsechunk2': No error

target reported max download size of 536870912 bytes

Any help?

The device is on 4.3.
[Moto G Android Development] Tomsgt:
The reason it errors is that your sparse chucks are labeled 1 2 3 not 0 1 2 like the us version is.

sent from my Galaxy Note 3 running HyperDrive.
[Moto G Android Development] tmacher:
Read my previous post http://xdaforums.com/showthread.php?p=50538780

Moto G
[Moto G Android Development] t00ny45:
I did all of those things beforehand, but still didn't manage to make it work. Afterwards I did it manually with a 4.3 ROM and then I updated to the latest update that came out today, so I'm content now. Thanks anyway. :D
[Moto G Android Development] Nevell:
Hello ladies and gents. I'm on 4.4.2 can I get this bootloader unlocked or no?
[Moto G Android Development] Redlugia:
As long as you don't have the verizon consumer version yes.
[Moto G Android Development] battlemaxi:
[MENTION=4246643]Tomsgt[/MENTION]

You my friend you are god!

Thanks alot :D

Thought I have broken my phone. I wasn't able to upload to Stock ROM .zip to because it was stuck in a Bootloop..

But thanks to you, everything is working fine again.

Srsly dude I love you <3
[Moto G Android Development] kleytonhunter:
sorry

this tool works on moto g xt1033 with brazilian firmware?mine is in bootloop and i have no acess to other options only fastboot
[Moto G Android Development] bobrda:
I made it work with your script! Thanks a lot! Model is XT1032... After doing as u said, have a small software update :good:

Now I can migrate thru GPE and Motorola roms
[Moto G Android Development] myke82:
Hellor everybody

I have a Moto G XT1032. My phone is rooted and has unlocked bootloader. It appears an official update on the display but I'm affraid to download it because I understood that it can brick my phone (because mai phone is rooted).

My answer is: Can I download and install this official update or first I must to unroot and relock my bootloader? I hope that you understood what I told you. :)

Excuse my bad English.

Thank you for your understanding.
[Moto G Android Development] gameeater:
Device is locked. Status code : 2

how chage the msg "DEVICE IS LOCKED. STATUS CODE : 2" to "DEVICE IS LOCKED. STATUS CODE : 0" ?
[Moto G Android Development] denzel09:
You can't. It's impossible. There is a qfuse. It's pretty unuseful relock bootloader because for that qfuse moto will know always that bl has been unlocked at least one time.
[Moto G Android Development] shmotog:
Is it possible to remain rooted and re-lock the bootloader?
[Moto G Android Development] Tomsgt:
Nope not this this device
[Moto G Android Development] shmotog:
Why not? I thought MOTO G was quite flexible, it's meant to be a sort of a 'google phone' like nexus.

Ok in that case assuming it can't be done, then is there any way to make the bootloader more secure so that some random person cant run adb pull command on my rooted moto G?
[Moto G Android Development] denzel09:
Yes you can. Unlock bl, root and then you can relock bl. But like previously written it's pretty unuseful relock it, there is a qfuse so with this last motorola will know always that bl has been unlocked at least one time ;)
[Moto G Android Development] shmotog:
That's ok, I don't care about motorola knowing. I will never return it or claim refund, I'm just one of those people who never bother with guarantees and warranties and whateverties.

Anyway denzel would you point me in the right direction please. Basically I want to relock the bootloader so that in case someone grabs hold of it they can't install a rootkit or read my data through adb pull command. i do understand that if I want to unlock again it will format the data but that's fine, I keep backups.

Denzel, from what i understand if you relock you lose root? Is that true? I don't want to lose root. If I flash stock firmware wont it totally make it stock, i.e erase SuperSU?

Currently my situation is: I have a unlocked bootloader, stock rom flashed, super SU root. Now I want to keep super su and also lock bootloader.
[Moto G Android Development] vincentallen2:
Theres an app that I'm using for my Sprint Galaxy Nexus, named "Bootunlocker". It allows me to unlock and relock my Bootloader at any time without turning off my phone or wiping it. Would it work for you guys on the Moto G?
[Moto G Android Development] denzel09:
[MENTION=5637734]shmotog[/MENTION] if you unlock bl, then root, then relock it so the root should remain and work easily i think
[Moto G Android Development] shmotog:
MOTO G would NOT relock if the stock rom is not flashed. If it is rooted, it will not lock. Have you tried it? If you have, and you know a way, could you please fill me in on HOW exactly shall I go around this, please?
[Moto G Android Development] denzel09:
I am talking about stock rom always, no custom rom. With stock rom you can relock bl. You must try, i never tried to do this, but on stock you can relock bl. There are surely guides here ;)
[Moto G Android Development] shmotog:
It IS a stock rom. Can you please show me the guide where it says you can relock bootloader of a rooted stock rom? Even once guide I would be extremely grateful man. I cannot find a single thing which would allow me to relock the bootloader of a STOCK ROM which has been ROOTED.
[Moto G Android Development] ATRIXXIRTA:
This is my plan. And Please someone me if it will not work for some reason.

I have unlocked my bootloader, and flashed a custom recovery (CWM), but HAVE NOT rooted my device.

I then made a backup of my stock non-rooted firmware

I plan on now flashing the Super-SU.zip to gain root access, and have my CWM non-rooted backup to use for receiving OTA's.

My question is, if I root now, or flash a ROM, can I simply flash my stock non-root backup to receive OTA updates?
[Moto G Android Development] Tomsgt:
You can receive the OTA that way but you can apply them with cwm recovery installed only stock recovery. Your backup doesn't backup stock recovery.

sent from my Galaxy Note 3 running HyperDrive.
[Moto G Android Development] shmotog:
*bump*

can anyone point me on how to re-lock bootloader of a rooted phone on stock rom? only thing i have installed is SuperSU thats it other than that its unlocked and its same ROM that came with the phone. i just want to re-lock bootloader and KEEP superSU as well, is that possible, can anyone at all help please.
[Moto G Android Development] bower95:
You say you have already unlocked your bootloader?

If the command to unlock the bootloader was "fastboot oem unlock" then logically you can relock the bootloader with the command "fastboot oem lock"

People be hurpin and derpin all over the interwebs
[Moto G Android Development] shmotog:
does not work. not after i installed superSu from modaco using option 2 for root.
[Moto G Android Development] davwman:
Link on site no worky
[Moto G Android Development] nlra:
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
[Moto G Android Development] denzel09:
I know.

There is nothing wrong in my reply: "You can relock bl only on stock rom". Why you quoted me buddy?
[Moto G Android Development] shmotog:
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?
[Moto G Android Development] denzel09:
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?
[Moto G Android Development] nlra:
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
[Moto G Android Development] denzel09:
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
[Moto G Android Development] shmotog:
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 ----------

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.
[Moto G Android Development] denzel09:
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:
[Moto G Android Development] amazingone:
[MENTION=1862588]denzel09[/MENTION] So if i got it, lock again bootloader is not good for warranty?
[Moto G Android Development] denzel09:
This is a good question. Yes, in this case there is a qfuse, software, through which motorola always will know the unlock. :good:
[Moto G Android Development] Saqib Nazm:
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 :)
[Moto G Android Development] wrbl:
I was doing this method but on Tesco Moto G the option to flash the Rom and do everything is not working.
[Moto G Android Development] abhishekk89:
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 ?
[Moto G Android Development] scottharris4:
The link to the firmware tool doesn't work.
[Moto G Android Development] Tomsgt:
it should be working please try again
[Moto G Android Development] scottharris4:
No, it doesn't. The link in the OP, when I click on it, says file doesn't exist.
[Moto G Android Development] Tomsgt:
now i have it
[Moto G Android Development] vikassoni:
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
[Moto G Android Development] lonaysta:
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:)
[Galaxy S III Q&A, Help & Troubleshooting] joojo5:
Hi,

I tried to update my cynagonrom nightly when my phone got stuck and was not working. I just went to my Teamwin recovery program.

I tried to wipe my cache etc but my phone just gotten worse.

Now I can only get into the recovery mode. Can i recover my from phone here