Official Moto X Stagefright Patched Libs!

Benoe

Senior Member
Dec 15, 2006
114
38
0
I get this message, when I try to sideload the OTA in factory recovery:
"/system/app/3c_main/3c_main.apk" has unexpected contents."

I have an XT1053 DE, and previously restored everything: system, boot, recovery, but haven't erased userdata yet.

Why do we need to remove the var max data line?
I have no succes installing this OTA, neither with "official" recovery, nor with the recovery linked in post 41. I made my phone totally stock beforehand, cleared userdata, but it doesn't help.
 

mastarifla

Senior Member
Oct 3, 2010
485
293
0
Dallas, TX
I have no succes installing this OTA, neither with "official" recovery, nor with the recovery linked in post 41. I made my phone totally stock beforehand, cleared userdata, but it doesn't help.
Even with using RSD-Lite instead of fastboot commands? If so, then there is something bigger going on, and I think it has to do with the SP partition
 

aysiu

Senior Member
Feb 26, 2011
58
9
0
Have you tried using the fastboot commands to erase everything, then flashing?

Here are the steps I had to perform...

1) Backed up my data then transferred it to my PC
2) Booted into the Bootloader
3) Used fastboot to wipe the userdata and cache partitions
  • fastboot erase cache
  • fastboot erase userdata
4) Downloaded the Stock 5.1 Image and used RSD-Lite to flash it*
*remember to remove the var max data line from the flashfile.xml
5) Booted the phone and didn't input my Google account
6) Downloaded the OTA and applied it
7) It finishes the update successfully and reboots and you should be good to go! :good:
mastarifla, thanks for your patience on this. Sometimes it can be a bit frustrating to try about four or five different things to have it all fail, so I may have appeared to be a flailing, clueless novice.

I finally got it working with a modification of your instructions. Mac users don't have RSD Lite, but manual commands can work. Based on the XML file in the download you linked to, I was able to get these commands out (which are similar to the commands for the build from the Motorola website that doesn't work—P.S. I did an md5 check on both system.img files, and they're definitely different).

I also tried various combinations of just wiping cache and user data, just wiping those and then flashing recovery and system. Nope. In order to get it to work, I had to download the build you linked to, put the phone into fastboot mode (hold down the Down volume key while powering on and then USB-connect to the computer) and then run all these commands in this order (I had the moto-fastboot-osx64 from a separate download, which I put into the same folder as the extracted .zip file... the md5 on it is ddafff4d9050a3ec8dfa8e592f3a34cc):
Code:
./moto-fastboot-osx64 erase cache
./moto-fastboot-osx64 erase userdata
./moto-fastboot-osx64 flash partition gpt.bin
./moto-fastboot-osx64 flash motoboot motoboot.img
./moto-fastboot-osx64 flash logo logo.bin
./moto-fastboot-osx64 flash motoboot motoboot.img
./moto-fastboot-osx64 flash logo logo.bin
./moto-fastboot-osx64 flash boot boot.img
./moto-fastboot-osx64 flash recovery recovery.img
./moto-fastboot-osx64 flash system system.img
./moto-fastboot-osx64 flash modem NON-HLOS.bin
./moto-fastboot-osx64 erase modemst1
./moto-fastboot-osx64 erase modemst2
./moto-fastboot-osx64 flash fsg fsg.mbn
./moto-fastboot-osx64 erase customize
./moto-fastboot-osx64 erase clogo
./moto-fastboot-osx64 oem fb_mode_clear
The OTA update seems now to have taken.

Thanks again for your patience. It may have seemed like a lot of handholding to you, but I'm grateful for your help.
 

bigpoppa75

New member
Jan 31, 2011
1
0
0
Socratic Bliss it worked with using GHOST_RETAIL_5.1_LPA23.12-15_cid9_CFC.xml.zip instead of Motorola official firmware. I guest there issues with there software. Thank You Very much :D :good:
 

klav29

Member
Nov 15, 2011
8
0
0
Yes, you can use the libs to patch Stagefright if you really wanted to

However, if you have the XT1053 (like you have), it's better to flash the 222.27.5 OTA update, as it fixes the issue along with other problems

Read the previous posts to understand how to fix the problem if the OTA will not flash
Thank you for the tip, but I have a question, is there a way to apply the upgrade without having to delete user data?
 

jjohns63

Senior Member
Aug 2, 2010
61
22
0
Austin
Have you tried using the fastboot commands to erase everything, then flashing?

Here are the steps I had to perform...

1) Backed up my data then transferred it to my PC
2) Booted into the Bootloader
3) Used fastboot to wipe the userdata and cache partitions
  • fastboot erase cache
  • fastboot erase userdata
4) Downloaded the Stock 5.1 Image and used RSD-Lite to flash it*
*remember to remove the var max data line from the flashfile.xml
5) Booted the phone and didn't input my Google account
6) Downloaded the OTA and applied it
7) It finishes the update successfully and reboots and you should be good to go! :good:
The only think I didn't do was erase /userdata; and I don't understand why that would have any effect. The update script is only hashing files in /system and /modem. Shouldn't flashing the stock system image be enough? Why are all my hashes different from the OTA immediately after flashing the stock system image?

I don't know what RSD-Lite is. I just used mfastboot to do the flashing of system.img extracted from the stock image.

EDIT: I was using the "stock" image downloaded from Motorola. I will try using the stock image you linked as it appears they are different somehow, despite identical build numbers.
 
Last edited:

Benoe

Senior Member
Dec 15, 2006
114
38
0
mastarifla, thanks for your patience on this. Sometimes it can be a bit frustrating to try about four or five different things to have it all fail, so I may have appeared to be a flailing, clueless novice.

I finally got it working with a modification of your instructions. Mac users don't have RSD Lite, but manual commands can work. Based on the XML file in the download you linked to, I was able to get these commands out (which are similar to the commands for the build from the Motorola website that doesn't work—P.S. I did an md5 check on both system.img files, and they're definitely different).

I also tried various combinations of just wiping cache and user data, just wiping those and then flashing recovery and system. Nope. In order to get it to work, I had to download the build you linked to, put the phone into fastboot mode (hold down the Down volume key while powering on and then USB-connect to the computer) and then run all these commands in this order (I had the moto-fastboot-osx64 from a separate download, which I put into the same folder as the extracted .zip file... the md5 on it is ddafff4d9050a3ec8dfa8e592f3a34cc):
Code:
./moto-fastboot-osx64 erase cache
./moto-fastboot-osx64 erase userdata
./moto-fastboot-osx64 flash partition gpt.bin
./moto-fastboot-osx64 flash motoboot motoboot.img
./moto-fastboot-osx64 flash logo logo.bin
./moto-fastboot-osx64 flash motoboot motoboot.img
./moto-fastboot-osx64 flash logo logo.bin
./moto-fastboot-osx64 flash boot boot.img
./moto-fastboot-osx64 flash recovery recovery.img
./moto-fastboot-osx64 flash system system.img
./moto-fastboot-osx64 flash modem NON-HLOS.bin
./moto-fastboot-osx64 erase modemst1
./moto-fastboot-osx64 erase modemst2
./moto-fastboot-osx64 flash fsg fsg.mbn
./moto-fastboot-osx64 erase customize
./moto-fastboot-osx64 erase clogo
./moto-fastboot-osx64 oem fb_mode_clear
The OTA update seems now to have taken.

Thanks again for your patience. It may have seemed like a lot of handholding to you, but I'm grateful for your help.
At first this method didn't worked for me, the OTA install hasn't succeeded. Then I realized I mistyped two commands:

./moto-fastboot-osx64 erase customize
./moto-fastboot-osx64 erase clogo

After I went back to bootloader, I entered those command correctly, and the OTA was taken!
So the key is somewhere here, we definately need to erase "customize" and "clogo" whatever those are.

At my previous attempts with the "official" firmware from motorola, I haven't used these commands, so I'm curious, If that would be the only thing that made the ota upgrade unsuccesful with that firmware
 

Benoe

Senior Member
Dec 15, 2006
114
38
0
At my previous attempts with the "official" firmware from motorola, I haven't used these commands, so I'm curious, If that would be the only thing that made the ota upgrade unsuccesful with that firmware
I just tried, the process only works with the "external" firmware and with these commands (for me):

Code:
./mfastboot erase cache
./mfastboot erase userdata
./mfastboot flash partition gpt.bin
./mfastboot flash motoboot motoboot.img
./mfastboot flash logo logo.bin
./mfastboot flash boot boot.img
./mfastboot flash recovery recovery.img
./mfastboot flash system system.img
./mfastboot flash modem NON-HLOS.bin
./mfastboot erase modemst1
./mfastboot erase modemst2
./mfastboot flash fsg fsg.mbn
./mfastboot erase customize
./mfastboot erase clogo
./mfastboot oem fb_mode_clear
 
Last edited:
  • Like
Reactions: ohmimpotence

crpeck

Senior Member
Jul 24, 2011
100
13
0
Williamsburg, VA
Is your Moto X unlocked or locked?

mastarifla, thanks for your patience on this. Sometimes it can be a bit frustrating to try about four or five different things to have it all fail, so I may have appeared to be a flailing, clueless novice.

I finally got it working with a modification of your instructions. Mac users don't have RSD Lite, but manual commands can work. Based on the XML file in the download you linked to, I was able to get these commands out (which are similar to the commands for the build from the Motorola website that doesn't work—P.S. I did an md5 check on both system.img files, and they're definitely different).

I also tried various combinations of just wiping cache and user data, just wiping those and then flashing recovery and system. Nope. In order to get it to work, I had to download the build you linked to, put the phone into fastboot mode (hold down the Down volume key while powering on and then USB-connect to the computer) and then run all these commands in this order (I had the moto-fastboot-osx64 from a separate download, which I put into the same folder as the extracted .zip file... the md5 on it is ddafff4d9050a3ec8dfa8e592f3a34cc):
Code:
./moto-fastboot-osx64 erase cache
./moto-fastboot-osx64 erase userdata
./moto-fastboot-osx64 flash partition gpt.bin
./moto-fastboot-osx64 flash motoboot motoboot.img
./moto-fastboot-osx64 flash logo logo.bin
./moto-fastboot-osx64 flash motoboot motoboot.img
./moto-fastboot-osx64 flash logo logo.bin
./moto-fastboot-osx64 flash boot boot.img
./moto-fastboot-osx64 flash recovery recovery.img
./moto-fastboot-osx64 flash system system.img
./moto-fastboot-osx64 flash modem NON-HLOS.bin
./moto-fastboot-osx64 erase modemst1
./moto-fastboot-osx64 erase modemst2
./moto-fastboot-osx64 flash fsg fsg.mbn
./moto-fastboot-osx64 erase customize
./moto-fastboot-osx64 erase clogo
./moto-fastboot-osx64 oem fb_mode_clear
The OTA update seems now to have taken.

Thanks again for your patience. It may have seemed like a lot of handholding to you, but I'm grateful for your help.


---------- Post added at 07:35 AM ---------- Previous post was at 06:54 AM ----------

YES!!! This process (using the Firmware mentioned above) worked on my unlocked Dev Edition. It took the update! Thanks folks!!! BTW - I did it using Linux, I don't have a Mac and I definitely don't do Windows ;)
 

UncleMike

Senior Member
Nov 11, 2010
263
45
0
Have you tried using the fastboot commands to erase everything, then flashing?

Here are the steps I had to perform...

1) Backed up my data then transferred it to my PC
2) Booted into the Bootloader
3) Used fastboot to wipe the userdata and cache partitions
  • fastboot erase cache
  • fastboot erase userdata
4) Downloaded the Stock 5.1 Image and used RSD-Lite to flash it*
*remember to remove the var max data line from the flashfile.xml
5) Booted the phone and didn't input my Google account
6) Downloaded the OTA and applied it
7) It finishes the update successfully and reboots and you should be good to go! :good:
I've been flashing the 5.1 images (L-5.1-LPA23.12-15 (Retail) LMR1) from Motorola's Re-lock your bootloader page and not only failing to re-lock the bootloader, but the OTA fails as well. I know that the linked download above contains different images that those available on Motorola's site, but my question is: should flashing the images you linked via fastboot yield the same results as flashing via RSD-Lite? I'm using a Linux machine and as far as I know there's no RSD-Lite for Linux.

Thanks for the link to this thread from that other place, and for the info.