This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ota2tar | |
| // | |
| // Parses an Apple iOS OTA file and converts it to tar while hopefully preserving attributes and symlinks | |
| // | |
| // Only the Format 3.0 described here is supported: | |
| // https://www.theiphonewiki.com/wiki/OTA_Updates | |
| // | |
| // This code is based heavily on Jonathan Levin's example code | |
| // found here: http://newosxbook.com/articles/OTA.html | |
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // clang -o resize_apfs -Wall -Wextra -Wpedantic -Werror -Wl,-U,_mh_execute_header,-e,_main -Xlinker APFS.tbd resize_apfs.c | |
| // Tested on iOS 10 and 15, won't work on iOS 12 | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <dlfcn.h> | |
| typedef int (*apfs_resize_container_t)(const char *, unsigned long long); | |
| typedef const char *(*apfs_get_error_string_t)(int); | |
| int main(int argc, char *argv[]) { |