Modify an OTA can it be done?

toy4x4

New Member
Joined
Feb 3, 2012
Messages
29
Reaction score
0
Location
VA
Ok so I go to jump from bionic OTA 5.9.905 to OTA 6.7.246 ICS but get:
assert failed: apply...patch...check("system/bin/mount_ext3.sh"
But no worries right I have the "forever root" chmod lines in my mount_ext3.sh so this is why the OTA will not apply.

Option #1: Remove the added chmod lines from the file so the checksums match again and the OTA will install.

Option #2: Edit the checksum values in the OTA update.zip file : Blur_Version.5.9.905.XT875.Verizon.en.US.zip so they match your modified mount_ext3.sh file.
Here's the catch... I don't know what was used to calculate the first checksum values. ( I know that sha1sum was used for the second values.)

You can unzip the Blur_Version.5.9.905.XT875.Verizon.en.US.zip and navigate to the script file where the checksums for mount_ext3.sh are listed:
Blur_Version.5.9.905.XT875.Verizon.en.US\META-INF\com\google\android\updater-script Find lines containing mount_ext3.sh:

assert(apply_patch_check("/system/bin/mount_ext3.sh", "1810bb2cd607e2f6cfbeafa158bb3a89629d60b7", "3a8382950bd4a6226349607d099afcbd93653d48"));
set_progress(0.411935);

assert(apply_patch("/system/bin/mount_ext3.sh", "-",
1810bb2cd607e2f6cfbeafa158bb3a89629d60b7, 1543,
3a8382950bd4a6226349607d099afcbd93653d48, package_extract_file("patch/system/bin/mount_ext3.sh.p")));

Okay so assuming you know what to use to calculate the values, you go and replace these with the values from your modified mount_ext3.sh file...

Now you re-zip the file and next you recalculate the CRC value of the Blur_Version.5.9.905.XT875.Verizon.en.US.zip file and replace the value in the Blur_Version.5.9.905.XT875.Verizon.en.US.crc file. Copy these two files back down to /cache/ folder and run the update.
If this modification works then there is potentially other applications for this also. Like the removal of all the BloatWare programs by stripping the lines that check for them.

Anyone tried this before?
What is used besides sha1sum to calculate these values?
 

ldubs

Member
Joined
Sep 3, 2012
Messages
105
Reaction score
0
Well it would be a lot easier if you removed the lines for forever root...or just download house of bionic and go straight to ics from there.

Sent from my DROID BIONIC using Tapatalk 2
 

risman

New Member
Joined
Oct 29, 2012
Messages
2
Reaction score
0
Toy4x4 - I am having the same problem and error when trying to upgrade to OTA 6.7.246 from rooted 5.9.905. Regarding option #1 - how would I go about doing that (removing the chmod lines)? I am rooted via Dan Rosenberg's rooter. Your help is greatly appreciated as I am very anxious to upgrade to ICS. Thanks...
 

dstreng

Member
Joined
Sep 22, 2010
Messages
174
Reaction score
1
if u modify the ota, then it won't install. so option 2 won't work. locked phones
 

ldubs

Member
Joined
Sep 3, 2012
Messages
105
Reaction score
0
Toy4x4 - I am having the same problem and error when trying to upgrade to OTA 6.7.246 from rooted 5.9.905. Regarding option #1 - how would I go about doing that (removing the chmod lines)? I am rooted via Dan Rosenberg's rooter. Your help is greatly appreciated as I am very anxious to upgrade to ICS. Thanks...

if u modify the ota, then it won't install. so option 2 won't work. locked phones

Can u send instructions on how to perform option1?

Ok everyone please read my earlier post. Download house of bionic and the 246 fxz and don't worry about any of this stuff. If you're comfortable with rsd lite you can use that to go directly to ics from anything else. The fxz for 246 is out.

Sent from my DROID BIONIC using Tapatalk 2
 
OP
T

toy4x4

New Member
Joined
Feb 3, 2012
Messages
29
Reaction score
0
Location
VA
Well it would be a lot easier if you removed the lines for forever root...or just download house of bionic and go straight to ics from there.

Sent from my DROID BIONIC using Tapatalk 2

Ok everyone please read my earlier post. Download house of bionic and the 246 fxz and don't worry about any of this stuff. If you're comfortable with rsd lite you can use that to go directly to ics from anything else. The fxz for 246 is out.

Sent from my DROID BIONIC using Tapatalk 2

This is all true and sorry didn't intend to start a thread of how to OTA to ICS.... Just been throwing the idea around of possibly modifying an OTA for a while and the 4ever root = no ICS OTA scenario gave me the motivation to try...

BTW found some more info on the Assert check lines... Turns out both values are sha-1 checksums the first value is the checksum of the new updated version of the file and the second is the original file's checksum... The middle value in the apply_patch line is of course the file size in bytes of the new updated file. All of this means that you will need the new updated mount_ext3.sh file to apply your chmod lines too in order to correctly calculate sha1sum and file size. Of course I have not tested any of this yet --still in the works.
 

unbesorgt

Member
Joined
Jan 18, 2010
Messages
385
Reaction score
4
If you modify an OTA file in any way it will not install, period. The OTAs are signed and the updater checks to ensure they haven't been tampered with or they will halt the process. It's not even a matter of making the checksums match like you can do with files like the mount_ext3.sh -- any change whatsoever in the OTA file will cause it to be unsigned, and there's no way to undo that without Moto's encryption key.
 
OP
T

toy4x4

New Member
Joined
Feb 3, 2012
Messages
29
Reaction score
0
Location
VA
Yes, so the update.zip is signed eh? Well it looks as if my ambitions are short lived then... Would deleting the CERT.RSA, CERT.SF, and MANIFEST.MF files in the META-INF folder and then resigning with testsign.jar work here??? I read about it somewhere else and it was a viable solution on a tablet OTA update... (I'm total noob in this signing thing so forgive me if this is dumb idea.) If nothing else this has been a good learning experience for me trying to make this work.

If resigning is not an option then can the modified update be applied by other means? Like say fastboot or Bootstrap or ClockWM???
Sorry for all the Noob questions here.
 
Top