yashsingh1/xdaforums huggingface dataset:
[X Style (Pure) Android Development] zswielder:
Thank you for the reply. I got the following failed step (#2). What do I do?

(bootloader) Please fully flash the signed build before locking phone!

OKAY [ 0.006s]

finished. total time: 0.006s

C:\Users\Zerios\Saved Games\Android Stuff\Moto X Pure\CLARK_RETUS_5.1.1_LPH23.116-18_cid9_subsidy-DEFAULT_CFC.xml_SHAWN5162>fastboot flash partition gpt.bin

target reported max download size of 536870912 bytes

sending 'partition' (32 KB)...

OKAY [ 0.003s]

writing 'partition'...

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 0.366s

C:\Users\Zerios\Saved Games\Android Stuff\Moto X Pure\CLARK_RETUS_5.1.1_LPH23.116-18_cid9_subsidy-DEFAULT_CFC.xml_SHAWN5162>
[X Style (Pure) Android Development] CZ Eddie:
I dunno, but I'd google that error:

https://www.google.com/search?sourc...rtition gpt.bin"&aqs=chrome..69i57j0.2951j0j7

I've got some other stuff I need to do so I can't help much right now.
[X Style (Pure) Android Development] saidmsb:
Same issue here, anyone have a fix please?

Thanks.
[X Style (Pure) Android Development] shadabmustafa:
Stock Firmware successfully flashed, still in bootloop

Hi everyone.

I flashed the XT1575_CLARK_RETUS_6.0_MPHS24.49-18-4 version and it went all OK without any error with any command, but my MXP is still stuck in bootloop. Any help where to look forward?

---------- Post added at 12:31 AM ---------- Previous post was at 12:27 AM ----------

I flashed XT1575_CLARK_RETUS_6.0_MPHS24.49-18-4 version and it all flashed successfully, but I'm still stuck in bootloop.

Hope this solves your problem at least.
[X Style (Pure) Android Development] bob4al:
first
[X Style (Pure) Android Development] BackDaws:
in the same boat, cant get back to stock, just end up with bootloop, please help people :)
[X Style (Pure) Android Development] randyok@:
Excellent

My phone was stuck in loading screen (after logo) and flashing any rom I got the same result. But this work like a charm :highfive:
[X Style (Pure) Android Development] kdog48:
Im having trouble with my wifi modem now it does not allow me to turn on, I have been at this for weeks trying to find the modem to flash to fix it. I have had the issue when i first got the phone but forgot to save the files and deleted them
[X Style (Pure) Android Development] h@ns1976:
Did you try flashing a different Superuser version. There where some problems with wifi and certain SuperSu versions. 2.62.3 Beta should work after that you can update to the latest version. Check this thread about rooting (https://tapatalk.com/shareLink?url=...share_tid=3259380&share_fid=3793&share_type=t ) the Moto X you can find a copy of the Superuser there.
[X Style (Pure) Android Development] kdog48:
I actually am trying to restore to stock and this tool worked but my wifi modem is not working I'm not really trying to root it
[X Style (Pure) Android Development] h@ns1976:
Okay. You could try flashing the stock rom manually through fastboot.

There's a list in wich order you need to flash everything.

Just search the Moto x forum for it.
[X Style (Pure) Android Development] kdog48:
I have done that but it gives error messages when doing it and then just bootloops :/
[X Style (Pure) Android Development] h@ns1976:
Your sure it bootloops? I remember a clean flash can take a few minutes.
[X Style (Pure) Android Development] kdog48:
Yeah, I have had luck with this tool restore to normal but it just breaks the wifi connection. I need to find the modem to flash to this device to fix it...I've tried the firmware straight from motorolas site and it just fails when you try to load them in fastboot. And I've tried flashing TWRP and it just fails as well. No idea what to do from here
[X Style (Pure) Android Development] h@ns1976:
You followed all of these steps and it still loops or gives an error.?

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 system system.img_sparsechunk.3

fastboot flash system system.img_sparsechunk.4

fastboot flash system system.img_sparsechunk.5

fastboot flash system system.img_sparsechunk.6

fastboot flash system system.img_sparsechunk.7

fastboot flash system system.img_sparsechunk.8

fastboot flash system system.img_sparsechunk.9

fastboot flash system system.img_sparsechunk.10

fastboot erase modemst1

fastboot erase modemst2

fastboot flash modem NON-HLOS.bin

fastboot flash fsg fsg.mbn

fastboot erase cache

fastboot erase userdata

fastboot reboot

This was the file i always used to restore my moto x to stock.( always worked as a charme for me)

https://yadi.sk/d/P43b6CsUkjvdg/Stock 6.0/XT1572/RETEU-UK-FR

This is EU single sim Rom.
[X Style (Pure) Android Development] kdog48:
I have the Moto x 1575 will that work?
[X Style (Pure) Android Development] h@ns1976:
I wouldn't risk it! Try finding the right rom for your 1575 first.

Try this thread you should find al the info you need.

https://xdaforums.com/moto-x-style/development/pure-firmware-tuff-wip-t3224833
[X Style (Pure) Android Development] bettadaze:
hoping someone can point me in the right direction. was on 6.0 soft bricked by installing wrong SU i think. wasn't having any luck with other methods, so used this and seems to be going ok.

what might be the best sequence to get back to stock 6.0? i tried re installed twrp, but kept getting openrecovery script loops while in recovery mode

stills says im unlocked status code 3. when i i tried to just download the ota 6.0 update it failed.

someway..few hours later. got it sorted! i prob just did the reinstall in wrong order. after the constant openrecovery, just used this tool again, slowly reinstalled twrp, installed the proper systemless SU, then flashed one of the stock 6.0 ( think deodexed version) and been working fine since.

i did the wifi fix on the very first pass and it did stick when using the restore tool, so that was helpful.
[X Style (Pure) Android Development] johhnyred23:
Will the biotloader be relocked,and the message gone.

---------- Post added at 08:03 PM ---------- Previous post was at 08:01 PM ----------

Yes
[X Style (Pure) Android Development] yuthika:
After restore to stock my wifi wont open. How to fix this ?
[X Style (Pure) Android Development] ht2912:
Failed when flash bootloader

After I use this tool, in bootloader, my phone still show "your device is unlocked" and "Status code is 3"

I also meet this fail when restore:

writting 'partition'
<bootloader> Preflash validation failed
FAILED <remote failure>
finished. total times: 0.375s

My phone still work fine with stock rom (dual sim).

But is there something wrong here because when I install TWRP, then root, then flash custom rom (AICP, CM, CRDroid...), it's alway have no sim detected even I already back to stock (RETASIA_DS_6.0)
[X Style (Pure) Android Development] rkleinhenz:
Mentioned a bunch of times in this thread. You need to reflash NON-HLOS.bin.
[X Style (Pure) Android Development] rkleinhenz:
I am unable to relock my bootloader. I have an XT1575, I ran the code listed earlier in this thread, but my device will not lock. I was running marshmallow and wanted to get back and take OTAs. My understanding was I needed to get back to 5.11 which I did successfully - but being unable to lock the bootloader I am not able to take the OTAs. I understand nougat will be available shortly, that's why I wanted to be able to accept OTA. Appreciate any pointers!

update: I think I went down a bad path. I was looking for Android 6.01 and despite some posts here and there I realize that was never released for the XT1575. Anyway, I reinstalled the factory image of the May update of 6.0, and was able to relock the device. Don't know if I will be able to get the latest security update or not.

Rich
[X Style (Pure) Android Development] philonny:
hi, thanks for the help, I have flashed the phone, it started afterwards, and stuck at the second page: choosing wifi, therewasn't anything I can do I have to ask for help again. since thereisn't any wifi signal the phone can spot, so I can neither skip to next step, I tried too to drag the notification bar down to modify the wifi configuration and it wouldn't work too. so help!

regards

changli

03. 28
[X Style (Pure) Android Development] rkleinhenz:
Did you reflash NON-HLOS.bin ? That's what usually seems to be wrong. fastboot flash modem NON-HLOS.bin
[X Style (Pure) Android Development] philonny:
the program runs by itself. otherwise would you tell me how to flash modem manually?
[X Style (Pure) Android Development] Edvin73:
https://xdaforums.com/showthread.php?t=3276792
[X Style (Pure) Android Development] rkleinhenz:
Take a look through the archives maybe. Boot into fastboot mode, connect to PC, run fastboot devices to make sure PC finds fastboot and recognizes phone, and enter the line I gave you above. Make sure you give proper location reference to NON-HLOS.bin. It seems to have fixed it for a bunch of people... even though it is part of the batch job, I never really checked why, maybe it gets overridden by something else later? Just try it and see if it doesn't fix it :)
[X Style (Pure) Android Development] philonny:
Thanks for your help, I did it as you told me and that seemed to be the problem, so I get back to where I started.
[X Style (Pure) Android Development] amaury48:
ran this and everything appeared to run ok then on reboot its stuck on the un-locked bootloader screen.... let it sit for 20 min, no go....cannot re-boot into recovery or fastboot mode...just restarts into the un-locked bootloader screen.....stuck...help !!!!

Finally was able to reboot into fastboot, reinstalled twrp and flashed a backup....back to where I was before I attempted this.....phew !!!
[X Style (Pure) Android Development] theyungmak:
Will this revert my device to a locked bootloader state or do I have to re-lock it manually?
[X Style (Pure) Android Development] solidsnake1974:
THANKYOU!!

I was just about at my wits' end until I discovered this thread! Thank you so very much!
[X Style (Pure) Android Development] fliperpl:
is there any way to unbrick hardbricked moto x style? My phone is not charging, doesnt boot into fastboot or recorvery, not showing up anything

it happend after android update :/ propably bootloader
[X Style (Pure) Android Development] daign:
thanks for saving my ass today. had my phone all dialed with AICP but my drone app crashed constantly....

after 6 hours, you fixed it in one click <3
[X Style (Pure) Android Development] cheeseballsg:
Mine started boot looping after flashing a rom that didnt work and then trying to restore a TWRP backup. Used this tool when I got home and its flashing the unlocked bootloader screen, but its looping much faster. Any help?
[X Style (Pure) Android Development] cool old lady:
Nevermind, found a fix.
[X Style (Pure) Android Development] Hybrid Theory:
This tool is missing the bootloader file so I can't downgrade from Marshmallow. It'll just bootloop.
[X Style (Pure) Android Development] screamline458:
Anyone got this backed up? trying to fix a bootlooop on mine, having no luck with manual methods
[X Style (Pure) Android Development] ximfinity:
TY OP already saved me once.
[X Style (Pure) Android Development] gthing:
What is the source for this? Motorola has not posted factory images as far as I can see.
[X Style (Pure) Android Development] gthing:
Mac and Linux users:

Download the attached file and unzip it and put flash-all.sh into the unzipped factory image directory from the OP. It should be in the same directory with flash-all.bat

In terminal go to that directory and type:

chmod u+x ./flash-all.sh
./flash-all.sh

This will perform the procedure identical to the .bat file and flash all the images. It will take a little while.

I tested it and everything appeared to work except for flashing the modem. I got this error:

writing 'modem'...
(bootloader) Preflash validation failed
FAILED (remote failure)

I solved this by manually flashing it again with "fastboot flash modem NON-HLOS.bin" and it seemed to have worked. Not sure why it didn't the first time.

This did not re-lock my bootloader.
[X Style (Pure) Android Development] djramod:
Wow you saved my phone, ended up with a black screen after the start up logo.. Thank you
[X Style (Pure) Android Development] diesteldorf:
With regards to wiping the userdata, will this also delete any internal storage?

I normally prefer to flash things manually, but I didn't see a specific userdata.img file.

Would anyone mind posting a modified flash-all.bat file that doesn't wipe the userdata?

It's just nice to have options in case a full wipe isn't necessary to resolve whatever the problem is.
[X Style (Pure) Android Development] cc999:
Working

Shawn is this working? need to restore....

CC
[X Style (Pure) Android Development] Shawn5162:
Yes
[X Style (Pure) Android Development] cc999:
ty

Great one last question, do I have to factory reset before running the .bat file? I am currently

rooted, exposed and gravity mods installed......

CC
[X Style (Pure) Android Development] jaben2:
If your restoring for Android pay. It was confirmed to work with the process I described in your thread. Check the general thread-stickies-motox lounge.

If not sorry for disrupting, but yes this tool works great I've already used it.
[X Style (Pure) Android Development] cc999:
Pay

Jayben can you verify it actually works at the terminal? I have read people got it to accept the card but when they went to use it at the terminal they got an error?

CC
[X Style (Pure) Android Development] Shawn5162:
Been using Android pay on stock unrooted after using this tool and have made over 20 Android pay payments...all is working for me
[X Style (Pure) Android Development] jmileti:
Bee n so long since I had an official unlocked bootloader. I just restored but still unlocked. Is this normal? I think it is.
[X Style (Pure) Android Development] Shawn5162:
This tool is meant to restore to stock...Not re lock the bootloader....I am working on another tool that does that and more.....Stay tuned ☺
[X Style (Pure) Android Development] jmileti:
I was unsure if returning to stock locked bootloader. That's all. Thanks for quick answer. Looking forward to all your endeavors for our beloved MXP.
[X Style (Pure) Android Development] croques:
In the bat file are these instructions:

fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2

Could someone explain the logic of erasing modemst1 and modemst2 for me please?
[X Style (Pure) Android Development] jmileti:
Would like to know also. As have been having issues since root. Not sure if its bad phone or software.
[X Style (Pure) Android Development] Shawn5162:
When NON-HLOS.bin is flashed to your device you are updating/changing the modem of your device. It is recommended you erase the old partition data before writing a new modem over the existing partition. Not erasing modemset1/2 cause cause RIL issues.
[X Style (Pure) Android Development] jmileti:
That's what I thought. Better left for you to explain.
[X Style (Pure) Android Development] croques:
Thanks, but then isn't the order, in the batch file, of flash NON-HLOS.bin then delete two modems partitions the wrong way around? Shouldn't the modems be deleted before flash? Sorry if I'm missing the obvious.
[X Style (Pure) Android Development] PiousInquisitor:
NON-HLOS.bin is flashed to the modem partition. modemst1 and modemst2 are different partitions.

Here is an example of an official flash file from the 2013 Moto X.

<?xml version="1.0" ?>
<flashing>
<header>
<phone_model model="ghost_verizon"/>
<software_version version="ghost_verizon-user 5.1 LPA23.12-39.7 7 release-keysMSM8960PRO_BP_23255.140.93.00R"/>
<interfaces>
<interface name="AP"/>
</interfaces>
</header>
<steps interface="AP">
<step operation="getvar" var="max-download-size"/>
<step operation="oem" var="fb_mode_set"/>
<step MD5="afd21e2d7a4fb267182fda9bc635e01f" filename="gpt.bin" operation="flash" partition="partition"/>
<step MD5="d089f063b897f108729d6ffcf63679e2" filename="motoboot.img" operation="flash" partition="motoboot"/>
<step MD5="4bfe6f5412c1c419150bf25f953b61d4" filename="logo.bin" operation="flash" partition="logo"/>
<step MD5="e731d8f1245ec7acddd8b21bfaa189fb" filename="boot.img" operation="flash" partition="boot"/>
<step MD5="6818436fc3f5ba7e9b37c1eddbc85fe4" filename="recovery.img" operation="flash" partition="recovery"/>
<step MD5="d619cb146f8a0babdec1e917a9f54878" filename="system.img" operation="flash" partition="system"/>
<step MD5="f7007cbf5f84260c53f1dab0d85fdabd" filename="NON-HLOS.bin" operation="flash" partition="modem"/>
<step operation="erase" partition="modemst1"/>
<step operation="erase" partition="modemst2"/>
<step MD5="dd995a5f35e6c8f4f19aea98b2b29295" filename="fsg.mbn" operation="flash" partition="fsg"/>
<step operation="erase" partition="cache"/>
<step operation="erase" partition="userdata"/>
<step operation="erase" partition="customize"/>
<step operation="erase" partition="clogo"/>
<step operation="oem" var="config carrier vzw"/>
<step operation="oem" var="fb_mode_clear"/>
</steps>
</flashing>
[X Style (Pure) Android Development] Himalaya saxena:
it's saying MD5 file is missing.
[X Style (Pure) Android Development] tjarvis:
Used this to bring my turd x back to stock. Had major lag and app crashes and sd card errors. Tried this with same results so it isn't software related. Bootloader is still unlocked. Hoping moto accepts it. If not... Anyone care to buy a $450 paperweight?
[X Style (Pure) Android Development] LanRen:
Hello, does the phone need to be in fastboot mode or any other mode before running?

Thank You.
[X Style (Pure) Android Development] Tanker Bob:
Here's an off-the-wall question. I want to get rid of the annoying "unlocked bootloader" warning screen after unlocking the bootloader and rooting. Will flashing the logo.bin file from your tool to my Pure 2015 accomplish that w/o affecting anything else on the phone (i.e., wiping it)? Will it be the stock Pure boot animation?

EDIT: Never mind. I did a nandroid backup, then flashed logo.bin. That worked fine, but it didn't replace the unlocked bootloader warning. Any ideas on how to replace the warning screen?
[X Style (Pure) Android Development] tjarvis:
You are so close to being in the right thread. Back out one tier to the android development forum and if you look closely you will see that there are about 4 threads, this being one. Another is labeled "how to remove unlocked bootloader warning" or very close to that. That should help you sir. If you need further assistance I'm sure someone could provide you a link.
[X Style (Pure) Android Development] Tanker Bob:
Thank you for your help. I will search further there. Thank you again for letting me know.
[X Style (Pure) Android Development] annoyingduck:
This is great info here. I haven't tested yet, but good to know. I'm actually kind of curious that Motorola has only posted fastboot flash images for "Developer versions" only. I feel like the fact that we can unlock our bootloaders, we should have readily available factory images too so us Linux users can easily restore to stock using our terminal only in fastboot mode Nexus style without having to run separate programs. Either way, thanks for posting this method, I hate having to boot Windows, especially when we have a fully unlocked bootloader....why Moto, why!
[X Style (Pure) Android Development] haZethew0rld:
Can confirm it works.

Did it on a Mac. For it to work you have to extract the files on the same folder your adb & fastboot is.

After that, just open flash_all.bat in a text editor & follow what it says. Easy as pie.
[X Style (Pure) Android Development] haZethew0rld:
I noticed after flashing this, apart from the unlocked bootloader tag on fastboot mode, there's now a modified software tag as well. Wonder if that's gonna cause me problems trying to get a replacement for my X.
[X Style (Pure) Android Development] ronj1986:
I'm going to have to donate to Shawn soon. He just saved my NEW Moto X. Not even 6 hours old yet
[X Style (Pure) Android Development] frashed:
So does the XT1575 recovery work on XT1572? ... or do I need to source that recovery from somewhere else?
[X Style (Pure) Android Development] PiousInquisitor:
There is actually a thread dedicated to twrp in the Original Android Development subforum. IDK, maybe you should search that thread for your answer.
[X Style (Pure) Android Development] jayochs:
*edit* nm. just realized mine is the 575.

if i have it here in the USA, can i flash this? i completely soft bricked my damn phone from f'ing up xposed. will this bring me back?

it's saying device not detected..but yeah, all drivers are installed fine. i was using it before.

pretty much i'm getting into android, it force closes system ui because i screwed up some xposed bs. now the PC isn't detecting it i guess. what do i do? go into bootloader? *edit* went into bootloader and it's flashing now...god i hope this fixes it.

*edit again* dude, thank you for this. it fixed it and i'm starting over from scratch. thank you again.
[X Style (Pure) Android Development] krazeekirk:
So I tried this and it looks like it didn't work. It went through its motions and everything seem to be successful but once it rebooted automatically, it was stuck on the "Unlock Bootloader" warning screen. I had to reinstall recovery and restore a backup that I made previously. Any ideas why it just didn't boot up in the first place?
[X Style (Pure) Android Development] dy2592:
It worked first time without any issues. It booted right into how I first got the phone. Bootloader is still unlocked though so the message still shows. I hope they Moto still accepts my return. Getting the Nexus 6P
[X Style (Pure) Android Development] frashed:
Sorry I should have been clearer... does this work on a XT1572?
[X Style (Pure) Android Development] texdroid:
Thanks Shawn! Worked the first time, sent mine back to Amazon today hopefully they dont give me **** for the unlocked bootloader. Will be waiting on my N6 to arrive
[X Style (Pure) Android Development] brholt6:
Let me know if they do give you crap...I've got to get a replacement from them. I'm assuming they won't care at all, or even look.
[X Style (Pure) Android Development] pepez05:
So, with this tool it's possible to remove root and go back to the "original" Moto X Pure with OTA ?
[X Style (Pure) Android Development] nitros12:
I flashed this on my Style (XT1572), everything works, however, the wifi antennae wont activate, this could be just me, because i only flashed the system image, not the radios, just letting you guys know.
[X Style (Pure) Android Development] chrisa887:
everything worked like a charm, i had to flash the patch for the unlocked bootloader screen to disappear but works fine, sending back to amazon. not what i expected
[X Style (Pure) Android Development] gokart2:
Disregard
[X Style (Pure) Android Development] paullu:
thanks god !!you just save my ass

thank you
[X Style (Pure) Android Development] sunNsnow:
No. It does not re-lock the bootloader. You will still have the unlocked bootloader screen.
[X Style (Pure) Android Development] texdroid:
Received full refund from Amazon no questions asked and hassle free
[X Style (Pure) Android Development] jsminnis:
Next time, if you didn't allready try it, just flash the "uninstall xposed zip" from twrp, then your device should boot fine. Then uninstall whichever module caused the problem then reinstall xposed.
[X Style (Pure) Android Development] yung40oz84:
Ya the boot loader remains unlocked but it puts back stock recovery and stock OS so can't I still get OTA?
[X Style (Pure) Android Development] yung40oz84:
I know this does not re lock the boot loader but it will put stock recovery and firmware so I can get OTA right? Everything else goes stock except re locking boot loader correct?
[X Style (Pure) Android Development] PiousInquisitor:
Yes. But to take the ota just flash the system images and the stock recovery.
[X Style (Pure) Android Development] yung40oz84:
Where are they located?
[X Style (Pure) Android Development] PiousInquisitor:
The zip from the OP.