Skip to content

Instantly share code, notes, and snippets.

@Bios597407
Forked from matteyeux/build_futurerestore.sh
Created January 2, 2021 06:21
Show Gist options
  • Save Bios597407/d3bc81138a9649fc9af66b14ac6d1228 to your computer and use it in GitHub Desktop.
Save Bios597407/d3bc81138a9649fc9af66b14ac6d1228 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Script to build futurerestore for GNU/Linux
# tested on Debian 9 and Ubuntu 18.04.
# Install libimobiledevice before running this script
# (https://gist.github.com/matteyeux/d7d8041a41ee8d664aaf5c3b99556ada)
# install liblzfse
git clone https://github.com/lzfse/lzfse.git
make -C lzfse && sudo make -C lzfse install
# install libfragmentzip needed by futurerestore
git clone https://github.com/encounter/libfragmentzip.git
cd libfragmentzip
./autogen.sh
make && sudo make install
cd ..
# clone
git clone https://github.com/s0uthwest/futurerestore.git
cd futurerestore
# download submodules
git submodule update --init
# there is a submodule in a submodule
cd external/tsschecker
git submodule update --init
cd ../..
# tricky fix because of missing inclusion
content=$(cat external/img4tool/img4tool/lzssdec.c)
echo -en "#include <sys/types.h>\n$content)" > external/img4tool/img4tool/lzssdec.c
./autogen.sh
make
sudo ldconfig
echo "futurerestore for Linux should be in $(pwd)/futurerestore/futurerestore"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment