Modify an OTA can it be done?

Discussion in 'Droid Bionic Hacks' started by toy4x4, Oct 29, 2012.

  1. toy4x4
    Offline

    toy4x4 New Member

    Joined:
    Feb 3, 2012
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    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?
  2. ldubs
    Offline

    ldubs New Member

    Joined:
    Sep 3, 2012
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    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
  3. risman
    Offline

    risman New Member

    Joined:
    Oct 29, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    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...
  4. dstreng
    Offline

    dstreng New Member

    Joined:
    Sep 22, 2010
    Messages:
    174
    Likes Received:
    1
    Trophy Points:
    0
    if u modify the ota, then it won't install. so option 2 won't work. locked phones
  5. risman
    Offline

    risman New Member

    Joined:
    Oct 29, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Can u send instructions on how to perform option1?
  6. ldubs
    Offline

    ldubs New Member

    Joined:
    Sep 3, 2012
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    0
    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
  7. toy4x4
    Offline

    toy4x4 New Member

    Joined:
    Feb 3, 2012
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    VA
    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.
  8. unbesorgt
    Offline

    unbesorgt New Member

    Joined:
    Jan 18, 2010
    Messages:
    382
    Likes Received:
    4
    Trophy Points:
    0
    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.
  9. toy4x4
    Offline

    toy4x4 New Member

    Joined:
    Feb 3, 2012
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    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.
Search tags for this page
android 4.2.1 ota update zip package
,
android ics signed ota zip
,
android remove file from ota zip
,
edit assert checks ota android update
,
edit ota file to have root
,
hoq to edit ota updates file
,
how to modify an android ota update file
,
how to modify ota update
,

modify updater script in ota update

,
zip modify ota without extract