Skip to content

Instantly share code, notes, and snippets.

@Lessica
Last active September 26, 2024 22:38
Show Gist options
  • Save Lessica/c2d7bfcc3b9edb364b83387ad7785302 to your computer and use it in GitHub Desktop.
Save Lessica/c2d7bfcc3b9edb364b83387ad7785302 to your computer and use it in GitHub Desktop.
Build script for idevicerestore and all its dependencies for macOS.
#!/bin/sh
# macOS 10.15
# Xcode 11.2
# Homebrew 2.1.16
# Homebrew/homebrew-core (git revision f466; last commit 2019-11-07)
# Homebrew/homebrew-cask (git revision 9ff44; last commit 2019-11-07)
# yum install python python-devel
# echo '[group_kdesig-cmake3_EPEL]
# name=Copr repo for cmake3_EPEL owned by @kdesig
# baseurl=https://copr-be.cloud.fedoraproject.org/results/@kdesig/cmake3_EPEL/epel-7-$basearch/
# type=rpm-md
# skip_if_unavailable=True
# gpgcheck=1
# gpgkey=https://copr-be.cloud.fedoraproject.org/results/@kdesig/cmake3_EPEL/pubkey.gpg
# repo_gpgcheck=0
# enabled=1
# enabled_metadata=1' >> /etc/yum.repos.d/cmake3.repo
# yum install cmake3
mkdir BuildFutureRestore
cd BuildFutureRestore
rm -f /usr/local/lib/libfragmentzip.*
rm -f /usr/local/lib/libideviceactivation.*
rm -f /usr/local/lib/libimobiledevice.*
rm -f /usr/local/lib/libirecovery.*
rm -f /usr/local/lib/libplist++.*
rm -f /usr/local/lib/libplist.*
rm -f /usr/local/lib/libusbmuxd.*
rm -f /usr/local/lib/libzip.*
rm -rf /usr/local/include/libfragmentzip
rm -f /usr/local/include/libideviceactivation.h
rm -rf /usr/local/include/libimobiledevice
rm -f /usr/local/include/libirecovery.h
rm -rf /usr/local/include/plist
rm -f /usr/local/include/usbmuxd*
rm -f /usr/local/include/zip.h
rm -f /usr/local/include/zipconf.h
rm -f /usr/local/lib/libfragmentzip.la
rm -f /usr/local/lib/libideviceactivation.la
rm -f /usr/local/lib/libimobiledevice.la
rm -f /usr/local/lib/libirecovery.la
rm -f /usr/local/lib/libplist++.la
rm -f /usr/local/lib/libplist.la
rm -f /usr/local/lib/libusbmuxd.la
rm -f /usr/local/lib/pkgconfig/libfragmentzip.pc
rm -f /usr/local/lib/pkgconfig/libideviceactivation*.pc
rm -f /usr/local/lib/pkgconfig/libimobiledevice*.pc
rm -f /usr/local/lib/pkgconfig/libirecovery.pc
rm -f /usr/local/lib/pkgconfig/libplist++.pc
rm -f /usr/local/lib/pkgconfig/libplist.pc
rm -f /usr/local/lib/pkgconfig/libusbmuxd.pc
rm -f /usr/local/lib/pkgconfig/libzip.pc
rm -f /usr/local/lib/libfragmentzip.a
rm -f /usr/local/lib/libideviceactivation.a
rm -f /usr/local/lib/libimobiledevice.a
rm -f /usr/local/lib/libirecovery.a
rm -f /usr/local/lib/libjssy.a
rm -f /usr/local/lib/libplist++.a
rm -f /usr/local/lib/libplist.a
rm -f /usr/local/lib/libusbmuxd.a
brew install make cmake automake autoconf libtool pkg-config curl openssl readline
echo 'export PKG_CONFIG_PATH="/usr/local/opt/curl/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.zshrc
echo 'export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.zshrc
echo 'export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.zshrc
# echo 'export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.zshrc
source ~/.zshrc
git clone --recursive [email protected]:libimobiledevice/libplist.git
cd libplist
./autogen.sh
make && make install
cd ..
git clone --recursive [email protected]:nih-at/libzip.git
cd libzip
cmake .
# cmake3 .
# ln -s /usr/local/lib64/libzip.so.5.0 /lib64/libzip.so
# ln -s /usr/local/lib64/libzip.so.5.0 /lib64/libzip.so.5
make && make install
cd ..
git clone --recursive [email protected]:tihmstar/libgeneral.git
cd libgeneral
./autogen.sh
make && make install
cd ..
git clone --recursive [email protected]:tihmstar/libfragmentzip.git
cd libfragmentzip
./autogen.sh
make && make install
cd ..
git clone --recursive [email protected]:libimobiledevice/libirecovery.git
cd libirecovery
./autogen.sh
make && make install
cd ..
git clone --recursive [email protected]:tihmstar/tsschecker.git
cd tsschecker
./autogen.sh
make && make install
cd ..
git clone --recursive [email protected]:tihmstar/img4tool.git
cd img4tool
./autogen.sh
make && make install
cd ..
git clone --recursive [email protected]:libimobiledevice/libusbmuxd.git
cd libusbmuxd
./autogen.sh
make && make install
cd ..
git clone --recursive [email protected]:libimobiledevice/libimobiledevice.git
cd libimobiledevice
./autogen.sh
make && make install
cd ..
git clone --recursive [email protected]:libimobiledevice/usbmuxd.git
cd usbmuxd
./autogen.sh
make && make install
cd ..
git clone --recursive [email protected]:tihmstar/idevicerestore.git
cd idevicerestore
./autogen.sh
make && make install
cd ..
git clone --recursive [email protected]:tihmstar/futurerestore.git
cd futurerestore
./autogen.sh
make && make install
cd ..
echo "succeed"
futurerestore
@Lessica
Copy link
Author

Lessica commented Nov 7, 2019

This bash script will install futurerestore from its source. By default, install prefix is /usr/local.

@Lessica
Copy link
Author

Lessica commented Nov 7, 2019

On CentOS 7, you need to uncomment some lines and make some changes.

@Lessica
Copy link
Author

Lessica commented Nov 7, 2019

This gist is for the lazy ones who would like to build the latest futurerestore and all its dependencies before Apple stops signing old firmwares, SEPs and BBs.

@Bios597407
Copy link

how to jailbreak 2018 macbook , please

@XboxOneSogie720
Copy link

@Bios597407 You don't jailbreak Macs

@Lessica
Copy link
Author

Lessica commented May 13, 2023

This script is deprecated. See another gist: https://gist.github.com/Lessica/97c3ee0172bf8e24820b71dfe44d53b3

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