blacktop / ipsw

iOS/macOS Research Swiss Army Knife
https://blacktop.github.io/ipsw
MIT License
1.91k stars 149 forks source link

Support patching .aea otas #566

Open mduran80 opened 1 month ago

mduran80 commented 1 month ago

Is your feature request related to a problem? Please describe.

ipsw ota patch currently expects a zip file. New otas encrypted as .aea cannot be used with the patch command after decryption.

Describe the solution you'd like

Use ota patch transparently

Describe alternatives you've considered

I have tried a workaround to create the cryptexes but unfortunately didn't work as there's no BuildManifest in the archive contents.

  1. Decrypt .aea into a temp aar file aea decrypt -i .... -o <temp_aar>
  2. Patch the temp aar file into a temp folder using aa patch -i <temp_aar> -d <temp_folder>
  3. Zip the into
  4. Run ipsw ota patch rsr
  ⨯ failed to get OTA folder: no BuildManifest.plist found

Search

Code of Conduct

Additional context

No response

blacktop commented 1 month ago

Has there been an RSR since the arrival of AEA? I think RSRs are dead

mduran80 commented 1 month ago

No, not RSR, just the iOS 18 OTA for iPhone17,1 et al. I have been using the cmd "rsr" to obtain the cryptexes from full OTAs without prerequisites. I don't usually work with deltas and it was the only way I could make it work. Is there another alternative to extract the cryptexes?

mduran80 commented 1 month ago

I finally found a way although a bit hacky... As ipsw was demanding a BuildManifest.plist, I just copied it from <patched_tmp>/boot/BuildManifest.plist to the root of the folder before zipping. Afterwards, ipsw ota patch kindly created the cryptex dmgs.

blacktop commented 1 month ago

you want the full DMGs right not just files from the DMGs?

mduran80 commented 1 month ago

yeah, full DMGs