XT1053 222.27.5 Stagefright OTA Update Guide

Search This thread

mastarifla

Senior Member
Oct 3, 2010
485
293
Dallas, TX
It seems like there needed to be a thread dedicated to the issues that users have been seeing with this recent OTA, as it seems like there has been a few problems with updating if you ever used Motorola's Stock 5.1 Image, I'll begin by listing the steps necessary to successfully apply the OTA update regardless of what software version you are currently running, there is also a TWRP System Image for those of you who don't want to go through the fastboot process or return to stock

Official OTA Update Procedure
1) Use TWRP and make a full backup, then connect your phone to your computer and transfer the backup files to your computer
2) Reboot your phone into the bootloader, either by doing adb reboot-bootloader or the physical key combination (power off then press and hold the power and volume down key for ~4 seconds)
3) Download the Stock 5.1.0-LPA23.12-15.0 Image from here, do NOT use Motorola's Recovery Image to do this procedure, it will fail, as the hashes are not what the OTA is expecting for the system.img, and extract the contents to a folder on your computer
4) Download the OS relevant attached mfastboot zip and unzip the contents to the same folder on your computer (if you are having issues with mfastboot try reefuge's version and see if it helps!)
5) Open up a command prompt in the directory and use the following commands to flash the 5.1 Stock Image, erasing the userdata partition is not required but it is highly recommended, as you can easily restore the TWRP data partition after doing these steps if you want your personal data back
Code:
[B]not required, but recommended![/B]
mfastboot erase userdata
[B]required[/B]
mfastboot erase cache
mfastboot erase customize
mfastboot erase clogo
mfastboot flash partition gpt.bin
mfastboot flash motoboot motoboot.img
mfastboot reboot-bootloader
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot -P flash system system.img
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1
mfastboot erase modemst2
mfastboot flash fsg fsg.mbn
mfastboot reboot
6) Reboot your phone and do your initial 5.1 phone setup, and then immediately check for System Updates
7) Download the OTA and select to install the OTA
8) Rejoice in your completed OTA update, if the update fails to install, upload the recovery logs (or tell us the problem) and we will try to help!
9) You can now install TWRP and root if desired, and restore your TWRP data backup if you erased it beforehand

TWRP System Image
The TWRP System Image can be used instead of trying to apply the OTA update, this is a backup of my own phone's system partition after doing the OTA update, so it's already on 222.27.5...

Alright, after quite a bit of time uploading...

Here is the TWRP System Image

1) Download the Stagefright System 222.27.5 TWRP backup from the above link
2) Unzip the Stagefright System 222.27.5 folder to your computer
3) Copy the Stagefright System 222.27.5 folder to your phones internal storage, to the TWRP/BACKUPS/TA0000008VJ/ directory
4) Reboot your phone into recovery (TWRP)
5) Click Restore and select the Stagefright System 222.27.5 folder
6) Verify that the System partition is selected and then Swipe to Restore
7) Clear your cache
8) Boot into system and enjoy the new patch :)


_
 
Last edited:

mastarifla

Senior Member
Oct 3, 2010
485
293
Dallas, TX
Please forgive me for being paranoid and not immediately running out and flashing some random OS image off the internet without first asking: what's the provenance of this OS image? :)

The image is a Motorola signed Image, it's just not the same one that they have listed on the Recovery page, here is the details from the factory version info file inside the zip

Code:
BUILD REQUEST INFO:
SW Version: ghost_retail-user 5.1 LPA23.12-15 15 release-keysMSM8960PRO_BP_23255.138.89.00R
MBM Version: 30.BE
Modem Version: MSM8960PRO_BP_23255.138.89.00R
FSG Version: ONEBIN_BP_FSG_2.3.03_v127
Build Fingerprint: motorola/ghost_retail/ghost:5.1/LPA23.12-15/15:user/release-keys

VERSION INFO FOUND UNDER 'ABOUT PHONE' SCREEN:
System Version: 222.21.15.ghost_row.Retail.en.US
Model number: Moto X
Android Version: 5.1
Baseband Version: MSM8960PRO_BP_23255.138.89.00R
Build Number: LPA23.12-15
Build Date: Sat May  9 01:44:45 PDT 2015

OTHER MISC VERSION INFO:
Subsidy Lock Config: None
Blur Version: Blur_Version.222.21.15.ghost_row.Retail.en.US
Version when read from CPV: ghost_retail-user 5.1 LPA23.12-15 15 release-keys
 
  • Like
Reactions: vtluu and zmore

Alamei

Member
Dec 4, 2007
14
7
I can confirm that the stock image linked in the original post actually allows the update to succeed. I originally tried flashing the "official" firmware (TMO_Retail_XT1053_5.1_LPA23.12-15.222.21.15.ghost_row.Retail.en.US.tgz) from Motorola's site , since I had used firmware from Motorola's page to go back to stock for previous OTAs successfully, but the Stagefright OTA failed to install over that "stock" version. After flashing over to the image from motofirmware.center (GHOST_RETAIL_5.1_LPA23.12-15_cid9_CFC.xml.zip), the OTA installed smoothly. Looks like someone at Motorola made a mistake with the Lollipop 5.1 firmware they uploaded to their official page.
 

mastarifla

Senior Member
Oct 3, 2010
485
293
Dallas, TX
Thanks for the clarification. :good:

Warning: it looks like I might have lost LTE support on T-Mobile US after applying the above flash (it shows me using HSPA+). Could be a false alarm or me being clueless. Will edit this post once I've verified one way or the other.

EDIT: confirmed, after putting back the image I got from the official Motorola page, I see "LTE" once again under "Cellular network type" in "SIM status", whereas with the above image it said "HSPA+". There might be a way of mixing and matching the radio firmware to fix that, but I haven't tried. At this point I think I'll just sit tight and wait for an update to the update from Moto. :)

T-Mobile default's data to HSPA+, then once you start using data it "revs up" to LTE, this is a network topology thing

You could also use the dialer code (*#*#4636#*#*) to verify that your preferred network type is set correctly, mine is set to LTE/GSM auto (PRL)
 
  • Like
Reactions: vtluu

vtluu

Member
Aug 11, 2011
35
30
San Jose, CA
plus.google.com
Thanks. Will try again. (The most painful part being having to wait 15-20 minutes for ART to recompile my 109 apps after each reflash.)

UPDATE: all good. And the OTA update worked as well.
 
Last edited:

mastarifla

Senior Member
Oct 3, 2010
485
293
Dallas, TX
Sorry for posting again, but would it be possible to create a zip file for this OTA that will flash in TWRP?

I think all that has to be done for that is to remove the fingerprints from the flash script right?

If so, here you can try this version in TWRP... I didn't remove the patch hash checks, so if you used the Motorola Image you will still fail when flashing
 

Attachments

  • update.zip
    9.2 MB · Views: 456
Last edited:
  • Like
Reactions: sisterchick

sisterchick

Senior Member
Feb 4, 2010
839
213
Texas!
I think all that has to be done for that is to remove the fingerprints from the flash script right?

If so, here you can try this version in TWRP... I didn't remove the patch hash checks, but theoretically they could be removed, but that seems quite risky...

I just tried it and it failed to install with TWRP. Bummer! Thanks for trying.
 

Al936

Senior Member
Mar 10, 2007
269
248
Being on Motorola Stock 5.1 image I flashed stock image linked in OP using RSD Lite. I did not erased Userdata during flash. Afer that OTA installed just fine.
 

mastarifla

Senior Member
Oct 3, 2010
485
293
Dallas, TX
I just tried it and it failed to install with TWRP. Bummer! Thanks for trying.

When did it fail? Was it due to the sha-1 mismatch? Or was it not even able to begin?

If it was the mismatch, then you would have gotten the same error with the stock recovery, which is resolved by flashing the 5.1 stock image that I linked to in the OP, you could also try removing the hash checks in the build-script, but that would be somewhat risky-ier

Being on Motorola Stock 5.1 image I flashed stock image linked in OP using RSD Lite. I did not erased Userdata during flash. Afer that OTA installed just fine.

Awesome, I added to the OP that you don't need to wipe your data partition but it's still highly recommended
 

Shemlon

Member
Jan 16, 2013
15
2
Do I need to unzip the pack I downloaded? For some reason system.img won't unzip. I keep getting an error that says "CRC failed in 'system.img". File is broken." I'm using 7zip to try to extract the files.
 

aysiu

Senior Member
Feb 26, 2011
58
9
Do I need to unzip the pack I downloaded? For some reason system.img won't unzip. I keep getting an error that says "CRC failed in 'system.img". File is broken." I'm using 7zip to try to extract the files.
You should unzip the .zip, but you should not "unzip" the .img. The .img is a binary file that should stay as is (don't try to open it).
 
  • Like
Reactions: Shemlon

mastarifla

Senior Member
Oct 3, 2010
485
293
Dallas, TX
Alright I made a version of the update.zip without the patch checks

Edit: Unfortunately no luck as the patching cant be forced on the Motorola Image, as the places where they patch seem to be different than the other zip's system image
 
Last edited:

Shemlon

Member
Jan 16, 2013
15
2
Will I need to reinstall TWRP and reroot my phone when I'm done? I apologize for the really basic questions guys.
 

ketron

Member
May 21, 2012
16
0
Thank you dude!
Looks like all problems cuz of missmatching hashes in prev firmware and OTA. I just flashed from your link following things and OTA installed fine:
mfastboot flash motoboot motoboot.img
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash system system.img
 

zmore

Senior Member
Apr 25, 2011
1,684
932
NYC
Success!

Thanks! You saved me a bunch of time fixing my wife's phone that failed-to-update correctly like so many others.

FWIW:
1) Do NOT use the regular android sdk 'fastboot'; use the motorola-tweaked mfastboot version attached above. I've gotten away with using the regular fastboot util for most things, but the device failed to boot past the unlocked bootloader warning screen until I reflashed system using mfastboot instead.
2) I got an error updating the gpt partition (something about downgrading security versions), but it didn't seem to matter.
3) I didn't wipe the userdata partition either, and all was fine. Had a TWRP backup just in case, though.

5.1 -> 5.1.1 == done. Secure... for now. (according to this Stagefright Detector app)

Doubt this original MotoX will get Marshmallow 6.0, so I might be switching it to CyanogenMod 13 in a couple months.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 42
    It seems like there needed to be a thread dedicated to the issues that users have been seeing with this recent OTA, as it seems like there has been a few problems with updating if you ever used Motorola's Stock 5.1 Image, I'll begin by listing the steps necessary to successfully apply the OTA update regardless of what software version you are currently running, there is also a TWRP System Image for those of you who don't want to go through the fastboot process or return to stock

    Official OTA Update Procedure
    1) Use TWRP and make a full backup, then connect your phone to your computer and transfer the backup files to your computer
    2) Reboot your phone into the bootloader, either by doing adb reboot-bootloader or the physical key combination (power off then press and hold the power and volume down key for ~4 seconds)
    3) Download the Stock 5.1.0-LPA23.12-15.0 Image from here, do NOT use Motorola's Recovery Image to do this procedure, it will fail, as the hashes are not what the OTA is expecting for the system.img, and extract the contents to a folder on your computer
    4) Download the OS relevant attached mfastboot zip and unzip the contents to the same folder on your computer (if you are having issues with mfastboot try reefuge's version and see if it helps!)
    5) Open up a command prompt in the directory and use the following commands to flash the 5.1 Stock Image, erasing the userdata partition is not required but it is highly recommended, as you can easily restore the TWRP data partition after doing these steps if you want your personal data back
    Code:
    [B]not required, but recommended![/B]
    mfastboot erase userdata
    [B]required[/B]
    mfastboot erase cache
    mfastboot erase customize
    mfastboot erase clogo
    mfastboot flash partition gpt.bin
    mfastboot flash motoboot motoboot.img
    mfastboot reboot-bootloader
    mfastboot flash logo logo.bin
    mfastboot flash boot boot.img
    mfastboot flash recovery recovery.img
    mfastboot -P flash system system.img
    mfastboot flash modem NON-HLOS.bin
    mfastboot erase modemst1
    mfastboot erase modemst2
    mfastboot flash fsg fsg.mbn
    mfastboot reboot
    6) Reboot your phone and do your initial 5.1 phone setup, and then immediately check for System Updates
    7) Download the OTA and select to install the OTA
    8) Rejoice in your completed OTA update, if the update fails to install, upload the recovery logs (or tell us the problem) and we will try to help!
    9) You can now install TWRP and root if desired, and restore your TWRP data backup if you erased it beforehand

    TWRP System Image
    The TWRP System Image can be used instead of trying to apply the OTA update, this is a backup of my own phone's system partition after doing the OTA update, so it's already on 222.27.5...

    Alright, after quite a bit of time uploading...

    Here is the TWRP System Image

    1) Download the Stagefright System 222.27.5 TWRP backup from the above link
    2) Unzip the Stagefright System 222.27.5 folder to your computer
    3) Copy the Stagefright System 222.27.5 folder to your phones internal storage, to the TWRP/BACKUPS/TA0000008VJ/ directory
    4) Reboot your phone into recovery (TWRP)
    5) Click Restore and select the Stagefright System 222.27.5 folder
    6) Verify that the System partition is selected and then Swipe to Restore
    7) Clear your cache
    8) Boot into system and enjoy the new patch :)


    _
    5
    I can confirm that the stock image linked in the original post actually allows the update to succeed. I originally tried flashing the "official" firmware (TMO_Retail_XT1053_5.1_LPA23.12-15.222.21.15.ghost_row.Retail.en.US.tgz) from Motorola's site , since I had used firmware from Motorola's page to go back to stock for previous OTAs successfully, but the Stagefright OTA failed to install over that "stock" version. After flashing over to the image from motofirmware.center (GHOST_RETAIL_5.1_LPA23.12-15_cid9_CFC.xml.zip), the OTA installed smoothly. Looks like someone at Motorola made a mistake with the Lollipop 5.1 firmware they uploaded to their official page.
    3
    Obligatory initial post :)

    If this guide helped you at all, please show your support by either donating or telling people about how they can fix their device, pay it forward!
    2
    Please forgive me for being paranoid and not immediately running out and flashing some random OS image off the internet without first asking: what's the provenance of this OS image? :)

    The image is a Motorola signed Image, it's just not the same one that they have listed on the Recovery page, here is the details from the factory version info file inside the zip

    Code:
    BUILD REQUEST INFO:
    SW Version: ghost_retail-user 5.1 LPA23.12-15 15 release-keysMSM8960PRO_BP_23255.138.89.00R
    MBM Version: 30.BE
    Modem Version: MSM8960PRO_BP_23255.138.89.00R
    FSG Version: ONEBIN_BP_FSG_2.3.03_v127
    Build Fingerprint: motorola/ghost_retail/ghost:5.1/LPA23.12-15/15:user/release-keys
    
    VERSION INFO FOUND UNDER 'ABOUT PHONE' SCREEN:
    System Version: 222.21.15.ghost_row.Retail.en.US
    Model number: Moto X
    Android Version: 5.1
    Baseband Version: MSM8960PRO_BP_23255.138.89.00R
    Build Number: LPA23.12-15
    Build Date: Sat May  9 01:44:45 PDT 2015
    
    OTHER MISC VERSION INFO:
    Subsidy Lock Config: None
    Blur Version: Blur_Version.222.21.15.ghost_row.Retail.en.US
    Version when read from CPV: ghost_retail-user 5.1 LPA23.12-15 15 release-keys
    2
    mfastboot V2

    Newer mfastboot 521kb vs 182kb of original ( I use it in my Easy Installer)
    mfastboot v2 zip contains all 3 windows/linux / mac os versions
    hope it helps