• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[GUIDE] [XT1572] Flashing Stock Firmware

Search This thread

antariksh

Senior Member
Feb 8, 2012
419
766
Mumbai
antariksh.dev
As the Nougat is rolling out for XT1572 devices, here's the guide for Flashing Stock Firmware using Fastboot for receiving Nougat OTA.
(Inspired by @acejavelin guide)

Prerequisites:

1) USB Drivers (Not needed for Windows 10)
2) Fastboot installed and working.
3) Stock Factory Images for Moto X Style (XT1572): https://firmware.center/firmware/Motorola/Moto X Style/Stock/XT1572/

Procedure:

1) Open a terminal or command prompt (Shift + Right click) window into the directory that contains the firmware files you extracted above.

2) Reboot the phone in Fastboot Mode (Reboot to Bootloader) and connect the USB Cable.

3) To verify if everything is perfect type in:
Code:
fastboot devices
If it shows your device serial number then you can be sure that it's properly connected.
4) Read the 'Notes' below.

6) Before proceeding, flash this commands to clean up the previous system's mess. This will get rid of the '(bootloader) Preflash validation failed' error when flashing gpt.bin (partition table).
Code:
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo

5) Here's the actual commands to Flash the Stock Image. Please Enter them One-by-one, Don't create any .bat files or copy and paste the entire section.
Code:
[STRIKE]fastboot getvar max-sparse-size[/STRIKE]
fastboot oem fb_mode_set
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 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 modem NON-HLOS.bin
fastboot flash modem NON-HLOS.bin (Flash twice, if Prevalidation Error)
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash bluetooth BTFM.bin
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot oem fb_mode_clear

Make sure you read whatever is happening on the prompt, do not miss any errors. (Scroll up the prompt and re-check everything before booting)

Notes:
1) This won't Lock your bootloader but you will be able to get OTA's.

2) For receiving Nougat on RETASIA Dual Sim, download: XT1572_CLARK_RETASIA_DS_6.0_MPHS24.49-18-8_cid7_subsidy-DEFAULT_CFC.xml.zip
There will be a 44mb update already queued when you boot the device. It will update the device to December 2016 Security Patch.
Reboot and you will be able to get Nougat OTA (911mb), if eligible.

3) If you didn't get the OTA Update, Flash this Nougat OTA after updating to December 2016 security patch: https://forum.xda-developers.com/moto-x-style/general/ota-nph25-200-15-retasiads-t3636765 (Credits: @Sagar_1401)

4) Different firmwares may contain a different number of system.img_sparsechunk.X files, you must flash the number you have in your firmware image in order. From what I have seen, most 5.1.1 firmwares have nine, 6.0 has eight, and 6.0.1 has eleven sparsechunks.

5) You must use a factory firmware image that is the same version as what you have installed or newer to successfully relock the bootloader, you cannot just grab the old (shipped) version from Moto's site. If you attempt to use a firmware image that is older than what you have installed currently, you will receive a Preflash Validation Error indicating such when you attempt to flash the partition table (gpt.bin).
 
Last edited:

pradeepvizz

Senior Member
Dec 24, 2010
2,251
721
Dubai
Nice guide @antariksh thanks for this.

i will be flashing from my current version 6.0.1_MPH24.107-58 (seemingly higher version) tomorrow.

will update once i attempt this.
 

antariksh

Senior Member
Feb 8, 2012
419
766
Mumbai
antariksh.dev
Quick tip if you can't get SafetyNet passed with Magisk V13.1 or V13.2
For Stock Nougat as we don't have boot.img
1) Backup boot with TWRP
2) Restore boot with TWRP
3) Flash Magisk zip
4) Reboot and Install Magisk Manager v5+
This won't get your SafetyNet passed.
5) Open Magisk Manager and once again press 'Download and Install'
This will automatically download and install the latest Magisk and after a reboot your SafetyNet will be passed.
 

Attachments

  • Screenshot_20170716-105754.png
    Screenshot_20170716-105754.png
    175.7 KB · Views: 1,201
  • Like
Reactions: pradeepvizz

trannamcloud

Member
Apr 6, 2017
16
2
5) You must use a factory firmware image that is the same version as what you have installed or newer to successfully relock the bootloader, you cannot just grab the old (shipped) version from Moto's site. If you attempt to use a firmware image that is older than what you have installed currently, you will receive a Preflash Validation Error indicating such when you attempt to flash the partition table (gpt.bin).

I got 6.0.1 ROM, how do i downgrade to 6.0? I try to flash to 6.0, it's shown message like above :(
 

titanworm

Member
Jul 23, 2007
25
6
hi guys,
My XT1572, previous rom version 6.0.1_MPH24.107-58-5 and I reflashed to 6.0 MPHS 24.49-18-8 successfully but I can not update December patch security 2016. I attempted to flash Nougat on RETASIA Dual Sim in Recovery but error FingerPrinter. Do I need any tricky ? Thank
 

acejavelin

Recognized Contributor
Sep 3, 2009
6,837
3,325
Lincoln, ND
Google Pixel 5a
I got 6.0.1 ROM, how do i downgrade to 6.0? I try to flash to 6.0, it's shown message like above :(

hi guys,
My XT1572, previous rom version 6.0.1_MPH24.107-58-5 and I reflashed to 6.0 MPHS 24.49-18-8 successfully but I can not update December patch security 2016. I attempted to flash Nougat on RETASIA Dual Sim in Recovery but error FingerPrinter. Do I need any tricky ? Thank
You can't go from 6.0.1 to 6.0 completely... Your bootloader and partition table cannot be downgraded and are actually different than on 6.0, they work (meaning 6.0 will boot} but it isn't a match. You cannot take an OTA to 18-16 or any other version because of the mismatch.

The only way to upgrade is go back to 6.0.1 then take the OTA to Nougat.
 

trannamcloud

Member
Apr 6, 2017
16
2
You can't go from 6.0.1 to 6.0 completely... Your bootloader and partition table cannot be downgraded and are actually different than on 6.0, they work (meaning 6.0 will boot} but it isn't a match. You cannot take an OTA to 18-16 or any other version because of the mismatch.

The only way to upgrade is go back to 6.0.1 then take the OTA to Nougat.

Thanks a lot!
I go back to 6.0.1 Retapac, with security pack 1-Mar-2016, an now waiting for official Nougat OTA update :)
 

Attachments

  • z716052791216_0738d31d2398206816a2f95a0c00dec8.jpg
    z716052791216_0738d31d2398206816a2f95a0c00dec8.jpg
    155.8 KB · Views: 713
  • Like
Reactions: acejavelin

pradeepvizz

Senior Member
Dec 24, 2010
2,251
721
Dubai
So I was on 6.0.1 as well and used the 18-8 firmware to downgrade to 6.0. had the same preflash validation error, i flashed gpt the second time after the error occurred and completed the flash like normal. Everything just worked perfectly fine after that. Got the security update to December and nought!

Edit : I did all of this keeping my bootloader unlocked.

Sent from my HTC 10 using Tapatalk

---------- Post added at 08:05 AM ---------- Previous post was at 08:01 AM ----------

You need to go to 6.0 and not 6.0.1.. The firmware to download is XT1572_CLARK_RETASIA_DS_6.0_MPHS24.49-18-8_cid7_subsidy-DEFAULT_CFC.xml.zip


Thanks a lot!
I go back to 6.0.1 Retapac, with security pack 1-Mar-2016, an now waiting for official Nougat OTA update :)


Sent from my HTC 10 using Tapatalk
 
Last edited:
  • Like
Reactions: trannamcloud

trannamcloud

Member
Apr 6, 2017
16
2
So I was on 6.0.1 as well and used the 18-8 firmware to downgrade to 6.0. had the same preflash validation error, i flashed gpt the second time after the error occurred and completed the flash like normal. Everything just worked perfectly fine after that. Got the security update to December and nought!

Edit : I did all of this keeping my bootloader unlocked.

Sent from my HTC 10 using Tapatalk

---------- Post added at 08:05 AM ---------- Previous post was at 08:01 AM ----------

You need to go to 6.0 and not 6.0.1.. The firmware to download is XT1572_CLARK_RETASIA_DS_6.0_MPHS24.49-18-8_cid7_subsidy-DEFAULT_CFC.xml.zip

So have you upgrade to Nougat yet?
I unlocked bootloader already, so could i bypass preflash validatation error as your guide? My phone said "downgrade failured " in bootloader screen logs
 

antariksh

Senior Member
Feb 8, 2012
419
766
Mumbai
antariksh.dev
hi guys,
My XT1572, previous rom version 6.0.1_MPH24.107-58-5 and I reflashed to 6.0 MPHS 24.49-18-8 successfully but I can not update December patch security 2016. I attempted to flash Nougat on RETASIA Dual Sim in Recovery but error FingerPrinter. Do I need any tricky ? Thank

Last week I flashed the MPH24.107-58-5 (6.0.1) thinking that this was the latest version. But then I TWRP restored back to my Custom ROM as there was no Nougat OTA.
On this Saturday I was able to flash the MPHS 24.49-18-8 without any issues.

Try flashing the gpt.bin twice and don't try to lock your bootloader.
 

pradeepvizz

Senior Member
Dec 24, 2010
2,251
721
Dubai
So have you upgrade to Nougat yet?
I unlocked bootloader already, so could i bypass preflash validatation error as your guide? My phone said "downgrade failured " in bootloader screen logs

i didn't see what the bootloader screen logs said, but when you get the error, you have to reflash the same thing again.
fastboot flash modem NON-HLOS.bin (Flash twice, if Prevalidation Error)

I have upgraded to Nougat successfully with no problems.
 

trannamcloud

Member
Apr 6, 2017
16
2
i didn't see what the bootloader screen logs said, but when you get the error, you have to reflash the same thing again.


I have upgraded to Nougat successfully with no problems.

Att image for your ref, i got preflash error when trying to flash gpt.bin. And i found problem as Mr @acejavenlin said below, saidly i have to go back 6.0.1 again



You can't go from 6.0.1 to 6.0 completely... Your bootloader and partition table cannot be downgraded and are actually different than on 6.0, they work (meaning 6.0 will boot} but it isn't a match. You cannot take an OTA to 18-16 or any other version because of the mismatch.

The only way to upgrade is go back to 6.0.1 then take the OTA to Nougat.
 

Attachments

  • preflash.png
    preflash.png
    29.2 KB · Views: 380
  • Screenshot_20170718-005253.png
    Screenshot_20170718-005253.png
    174.9 KB · Views: 380

titanworm

Member
Jul 23, 2007
25
6
yep, I had to return to XT1572_CLARK_RETASIA_DS_6.0.1_MPHS24.107-58-5_cid7_subsidy-DEFAULT_CFC.xml although I reflashed XT1572_CLARK_RETASIA_DS_6.0_MPHS24.49-18-8_cid7_subsidy-DEFAULT_CFC.xml completely on my devices and I was not able to upgrade to December patch. Now, my Android security patch level is September 1,2016. Did we have December 2016 patch for this MPHS24.107-58-5 and Asia DS? @acejavelin
 
Last edited:

trannamcloud

Member
Apr 6, 2017
16
2
yep, I had to return to XT1572_CLARK_RETASIA_DS_6.0.1_MPHS24.107-58-5_cid7_subsidy-DEFAULT_CFC.xml although I reflashed XT1572_CLARK_RETASIA_DS_6.0_MPHS24.49-18-8_cid7_subsidy-DEFAULT_CFC.xml completely on my devices and I was not able to upgrade to December patch. Now, my Android security patch level is September 1,2016. Did we have December 2016 patch for this MPHS24.107-58-5 and Asia DS? @acejavelin

Att image for your ref, i got preflash error when trying to flash gpt.bin. And i found problem as Mr @acejavenlin said below, saidly i have to go back 6.0.1 again

Same me, the only way is back to 6.0.1 now :p
 

pradeepvizz

Senior Member
Dec 24, 2010
2,251
721
Dubai
yep, I had to return to XT1572_CLARK_RETASIA_DS_6.0.1_MPHS24.107-58-5_cid7_subsidy-DEFAULT_CFC.xml although I reflashed XT1572_CLARK_RETASIA_DS_6.0_MPHS24.49-18-8_cid7_subsidy-DEFAULT_CFC.xml completely on my devices and I was not able to upgrade to December patch. Now, my Android security patch level is September 1,2016. Did we have December 2016 patch for this MPHS24.107-58-5 and Asia DS? @acejavelin

Att image for your ref, i got preflash error when trying to flash gpt.bin. And i found problem as Mr @acejavenlin said below, saidly i have to go back 6.0.1 again

i am not expert in Moto flashing, don't honestly have the patience to wait for the OTA from 6.0.1 to 7.

Was the build MPHS24.107-58 official for ASIA DS in the first place? i see posts on the lenovo forums asking 6.0.1 for Asian version which makes me think there was no official release. i wouldn't expect a OTA update if there was no official release of the 107-58 build in Asia. mine is a Asain version, what version is yours?
 
Last edited:

titanworm

Member
Jul 23, 2007
25
6
hi, guys
What is your Bootloader version, mine is BL: A0.4C for 6.0 Retasia DS. I see 6.0.1 Retasia DS has BL: A0.4A. Which versions is higher? With BL: A0.4C for 6.0 Retasia DS, I cannot flash to 6.0.1 with GPT.bin and Boot.img.
 

duttandy

New member
May 5, 2016
2
0
I'm currently on xt 1572 retasia ds MPHS24.49-18-16 but with bootloader unlocked and twrp installed. Can someone guide me to the December 2016 file so that I can restore to stock or the nougat file so that I can directly update my phone through fastboot method. Thanks in advance.
 

acejavelin

Recognized Contributor
Sep 3, 2009
6,837
3,325
Lincoln, ND
Google Pixel 5a
I'm currently on xt 1572 retasia ds MPHS24.49-18-16 but with bootloader unlocked and twrp installed. Can someone guide me to the December 2016 file so that I can restore to stock or the nougat file so that I can directly update my phone through fastboot method. Thanks in advance.
We don't have either... The best you can do is hope someone can do a TWRP backup of recovery you can restore, it needs to be the same variant and version.
 

trannamcloud

Member
Apr 6, 2017
16
2
i am not expert in Moto flashing, don't honestly have the patience to wait for the OTA from 6.0.1 to 7.

Was the build MPHS24.107-58 official for ASIA DS in the first place? i see posts on the lenovo forums asking 6.0.1 for Asian version which makes me think there was no official release. i wouldn't expect a OTA update if there was no official release of the 107-58 build in Asia. mine is a Asain version, what version is yours?

Confuse now. As you said, 6.0.1 build 107-58 is not official release, so maybe not receive OTA Nougat?
My version is Asian - retapac, 6.0.1 - build 107-58 with security patch 1-Mar-2016. It's unable to downgrade to any stock 6.0, as preflash error.
 

Attachments

  • Screenshot_20170719-081914.png
    Screenshot_20170719-081914.png
    54.8 KB · Views: 179

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    As the Nougat is rolling out for XT1572 devices, here's the guide for Flashing Stock Firmware using Fastboot for receiving Nougat OTA.
    (Inspired by @acejavelin guide)

    Prerequisites:

    1) USB Drivers (Not needed for Windows 10)
    2) Fastboot installed and working.
    3) Stock Factory Images for Moto X Style (XT1572): https://firmware.center/firmware/Motorola/Moto X Style/Stock/XT1572/

    Procedure:

    1) Open a terminal or command prompt (Shift + Right click) window into the directory that contains the firmware files you extracted above.

    2) Reboot the phone in Fastboot Mode (Reboot to Bootloader) and connect the USB Cable.

    3) To verify if everything is perfect type in:
    Code:
    fastboot devices
    If it shows your device serial number then you can be sure that it's properly connected.
    4) Read the 'Notes' below.

    6) Before proceeding, flash this commands to clean up the previous system's mess. This will get rid of the '(bootloader) Preflash validation failed' error when flashing gpt.bin (partition table).
    Code:
    fastboot erase cache
    fastboot erase userdata
    fastboot erase customize
    fastboot erase clogo

    5) Here's the actual commands to Flash the Stock Image. Please Enter them One-by-one, Don't create any .bat files or copy and paste the entire section.
    Code:
    [STRIKE]fastboot getvar max-sparse-size[/STRIKE]
    fastboot oem fb_mode_set
    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 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 modem NON-HLOS.bin
    fastboot flash modem NON-HLOS.bin (Flash twice, if Prevalidation Error)
    fastboot erase modemst1
    fastboot erase modemst2
    fastboot flash fsg fsg.mbn
    fastboot flash bluetooth BTFM.bin
    fastboot erase cache
    fastboot erase userdata
    fastboot erase customize
    fastboot erase clogo
    fastboot oem fb_mode_clear

    Make sure you read whatever is happening on the prompt, do not miss any errors. (Scroll up the prompt and re-check everything before booting)

    Notes:
    1) This won't Lock your bootloader but you will be able to get OTA's.

    2) For receiving Nougat on RETASIA Dual Sim, download: XT1572_CLARK_RETASIA_DS_6.0_MPHS24.49-18-8_cid7_subsidy-DEFAULT_CFC.xml.zip
    There will be a 44mb update already queued when you boot the device. It will update the device to December 2016 Security Patch.
    Reboot and you will be able to get Nougat OTA (911mb), if eligible.

    3) If you didn't get the OTA Update, Flash this Nougat OTA after updating to December 2016 security patch: https://forum.xda-developers.com/moto-x-style/general/ota-nph25-200-15-retasiads-t3636765 (Credits: @Sagar_1401)

    4) Different firmwares may contain a different number of system.img_sparsechunk.X files, you must flash the number you have in your firmware image in order. From what I have seen, most 5.1.1 firmwares have nine, 6.0 has eight, and 6.0.1 has eleven sparsechunks.

    5) You must use a factory firmware image that is the same version as what you have installed or newer to successfully relock the bootloader, you cannot just grab the old (shipped) version from Moto's site. If you attempt to use a firmware image that is older than what you have installed currently, you will receive a Preflash Validation Error indicating such when you attempt to flash the partition table (gpt.bin).
    2
    There is no need to do fastboot getvar max-sparse-size, that is just for RSD Lite to check your maximum system chunk size, when doing it manually it does nothing.

    Not really sure why this guide is needed, there are already a few out there that are basically identical.
    2
    Hi Antariksh,
    The dead phone has come back to me, lenovo asking for 22k to replace mobo & others said no can do. In Kolkata I am finding no one who can repair. Can you help me from your circle, if required i can send the set anywhere in india?
    regards
    Samrat

    Exactly what problem your phone is experiencing right now?
    2
    I got 6.0.1 ROM, how do i downgrade to 6.0? I try to flash to 6.0, it's shown message like above :(

    hi guys,
    My XT1572, previous rom version 6.0.1_MPH24.107-58-5 and I reflashed to 6.0 MPHS 24.49-18-8 successfully but I can not update December patch security 2016. I attempted to flash Nougat on RETASIA Dual Sim in Recovery but error FingerPrinter. Do I need any tricky ? Thank
    You can't go from 6.0.1 to 6.0 completely... Your bootloader and partition table cannot be downgraded and are actually different than on 6.0, they work (meaning 6.0 will boot} but it isn't a match. You cannot take an OTA to 18-16 or any other version because of the mismatch.

    The only way to upgrade is go back to 6.0.1 then take the OTA to Nougat.
    2
    "fastboot boot..." - twrp loaded to ram once.

    You need it to do backup of boot(kernel), restore it(for install magisk), after rooting you will have modified kernel but stock recovery. Install flashfire and do backup of stock recovery.
    For future updates you need stock boot, recovery, system partitions.

    Always keep in safety place backup of stock recovery, boot, system. @krishnas.goutham

    ---------- Post added at 10:38 PM ---------- Previous post was at 10:32 PM ----------

    You can also read this:
    https://forum.xda-developers.com/moto-x-style/help/assistance-rooting-nougat-t3638973