Unpacking XIP files on Linux:
- Install xar from https://mackyle.github.io/xar/
- Install pbzx from https://github.com/NiklasRosenstein/pbzx
(use
gcc -llzma -lxar -I /usr/local/include pbzx.c -o pbzx
and copy the binary into your PATH) - use
xar -xf XIP_FILE -C /path/to/extract/to
- Change to the directory where you extracted the file.
- Use
pbzx -n Content | cpio -i
to extract the contents.
Alternatively, with less patching & compiling required: use the tool developed by bitcoin
https://github.com/bitcoin-core/apple-sdk-tools
python extract_xcode.py -f Xcode_11.3.1.xip | cpio -d -i