Skip to content

Instantly share code, notes, and snippets.

@phracker
Created August 5, 2018 20:40
Show Gist options
  • Save phracker/1944ce190e01963c550566b749bd2b54 to your computer and use it in GitHub Desktop.
Save phracker/1944ce190e01963c550566b749bd2b54 to your computer and use it in GitHub Desktop.
Unpack XIP on Linux

Unpacking XIP files on Linux:

  1. Install xar from https://mackyle.github.io/xar/
  2. 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)
  3. use xar -xf XIP_FILE -C /path/to/extract/to
  4. Change to the directory where you extracted the file.
  5. Use pbzx -n Content | cpio -i to extract the contents.
@Abyss-W4tcher
Copy link

Abyss-W4tcher commented Oct 4, 2023

Hi, the following worked for me (inverted lib order while linking) :

sudo ldconfig # after installing xar
gcc pbzx.c -o pbzx -llzma -lxar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment