OTA: Episode VIII : The Last OTA

pbzx built in, multi-file operation, symlinks, and SHA-1

Jonathan Levin, (@Morpheus______), http://newosxbook.com/ - 12/01/2018

About

With AAPL moving to multiple payload.000-payload.03x files, I figured it's time to add multiple file support. And then some.

Note, you could do that with the original tool, with a bit of shell scripting (for i in payload.0??; do ota ... $i), but this saves you from pbzxing first. You can still use pbzx to expand the files (which will inevitably save you lots of time if you do lots of searches. It's simple enough to add a "pbzx only" feature, to just extract - I leave that as an exercise to the reader.

Another great features is to generate SHA-1 hashes of all files, or particular ones, as per the same arguments for extraction, with -H

morpheus@Bifröst (/tmp/xx)% ota -H WallpaperKit AssetData/payloadv2/payload.001 
Processing /tmp/xx/AssetData/payloadv2/payload.001
System/Library/PrivateFrameworks/WallpaperKit.framework/en.lproj/WallpaperKit.strings (142 bytes): 10B3B11C2646496495AC62A4AA0DE908C1813303
System/Library/PrivateFrameworks/WallpaperKit.framework/en_AU.lproj/WallpaperKit.strings (142 bytes): 10B3B11C2646496495AC62A4AA0DE908C1813303
System/Library/PrivateFrameworks/WallpaperKit.framework/en_GB.lproj/WallpaperKit.strings (142 bytes): 10B3B11C2646496495AC62A4AA0DE908C1813303
System/Library/PrivateFrameworks/WallpaperKit.framework/ja.lproj/WallpaperKit.strings (125 bytes): B1C625C72E450E68D99CED6C2B3E9312606B8B0C
System/Library/PrivateFrameworks/WallpaperKit.framework/ko.lproj/WallpaperKit.strings (137 bytes): DC951B825DDA5C0B0F90C270524EE43109F3B6B6
System/Library/PrivateFrameworks/WallpaperKit.framework/zh_CN.lproj/WallpaperKit.strings (121 bytes): 555453DB60562D56E8C494E4315E6A11DFA987B4
System/Library/PrivateFrameworks/WallpaperKit.framework/zh_HK.lproj/WallpaperKit.strings (131 bytes): 14F9CC3E798A2C2031CF5193D9FC51CE9B45A525
System/Library/PrivateFrameworks/WallpaperKit.framework/zh_TW.lproj/WallpaperKit.strings (129 bytes): 9536A9D9BE08A89F1296420C23803F615A899028

Other articles in series

I
II
III
Episode IV
Episode V
Episode VI
Episode VII

Sources

Updated ota.c (compiles cleanly on Linux, MacOS)

Binaries

A Tar.gz holding sources, MacOS and Linux binaries

License

  • All yours. A nice greet would be nice if you end up github'ing it like some people do. Plagiarism is low. And you can always ask for features, though I think at this point there aren't any to add.
  • P.S.

  • Yes, I discuss OTAs in the Appendix to Volume I, which I've made free
  • And I also talk about this stuff in The Tg Training - the next one in November 2019 right in the heart of Manhattan :)