Skip to content

Instantly share code, notes, and snippets.

@Bios597407
Forked from theoparis/idevicerestore.sh
Created April 2, 2023 01:46
Show Gist options
  • Save Bios597407/d5220e3b6aa5f5e7e4b805cff589e14a to your computer and use it in GitHub Desktop.
Save Bios597407/d5220e3b6aa5f5e7e4b805cff589e14a to your computer and use it in GitHub Desktop.
idevicerestore.sh

idevicerestore building instructions

Since arch linux did not have working packages, I decided to write a script to manually build these packages from source which fixed the issues I was having.

First, download and run the script to build the packages (assuming you have a compiler toolchain such as build-essential on debian or base-devel on arch).

./idevicerestore.sh

Now you can restore an ipsw to the active idevice.

idevicerestore ./myfirmware.ipsw
#!/bin/sh
set -oux
git clone https://github.com/libimobiledevice/libirecovery -j$(nproc)
git clone https://github.com/libimobiledevice/idevicerestore -j$(nproc)
git clone https://github.com/libimobiledevice/libimobiledevice-glue -j$(nproc)
git clone https://github.com/libimobiledevice/usbmuxd -j$(nproc)
git clone https://github.com/libimobiledevice/libimobiledevice -j$(nproc)
git clone https://github.com/libimobiledevice/libusbmuxd -j$(nproc)
git clone https://github.com/libimobiledevice/libplist -j$(nproc)
cd libplist && ./autogen.sh --without-cython && sudo make -j$(nproc) install && cd ..
cd libimobiledevice-glue && ./autogen.sh --without-cython && sudo make -j$(nproc) install && cd ..
cd libusbmuxd && ./autogen.sh && sudo make -j$(nproc) install && cd ..
cd libimobiledevice && ./autogen.sh --without-cython && sudo make -j$(nproc) install && cd ..
cd usbmuxd && ./autogen.sh && sudo make -j$(nproc) install && cd ..
cd libirecovery && ./autogen.sh && sudo make -j$(nproc) install && cd ..
cd idevicerestore && ./autogen.sh && sudo make -j$(nproc) install && cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment