Skip to content

Instantly share code, notes, and snippets.

@stek29
Created January 12, 2019 12:22
Show Gist options
  • Save stek29/2d3d0e2f2d1c14f8be68ce3a296585e9 to your computer and use it in GitHub Desktop.
Save stek29/2d3d0e2f2d1c14f8be68ce3a296585e9 to your computer and use it in GitHub Desktop.
idevicerestore on linux (Debian-based)
sudo apt update
# sudo apt upgrade
sudo apt install -y libcurl4-openssl-dev libplist-dev libzip-dev openssl libssl-dev libusb-1.0-0-dev libreadline-dev build-essential git make automake libtool pkg-config
git clone https://github.com/libimobiledevice/libirecovery
git clone https://github.com/libimobiledevice/idevicerestore
git clone https://github.com/libimobiledevice/usbmuxd
git clone https://github.com/libimobiledevice/libimobiledevice
git clone https://github.com/libimobiledevice/libusbmuxd
git clone https://github.com/libimobiledevice/libplist
cd libplist && ./autogen.sh --without-cython && sudo make install && cd ..
cd libusbmuxd && ./autogen.sh && sudo make install && cd ..
cd libimobiledevice && ./autogen.sh --without-cython && sudo make install && cd ..
cd usbmuxd && ./autogen.sh && sudo make install && cd ..
cd libirecovery && ./autogen.sh && sudo make install && cd ..
cd idevicerestore && ./autogen.sh && sudo make install && cd ..
sudo ldconfig
@spookyuser
Copy link

This is incredible, thank you! It should be merged into the repo as far as I'm concerned, couldn't get it working without this script.

@guysoft
Copy link

guysoft commented May 11, 2020

Getting on first compile:

 /usr/bin/install -c -m 644  plist/plist.h plist/plist++.h plist/Array.h plist/Boolean.h plist/Data.h plist/Date.h plist/Dictionary.h plist/Integer.h plist/Key.h plist/Node.h plist/Real.h plist/String.h plist/Structure.h plist/Uid.h '/usr/local/include/plist'
make[2]: Leaving directory '/home/guy/tmp/apple-tv/libplist/include'
make[1]: Leaving directory '/home/guy/tmp/apple-tv/libplist/include'
Making install in tools
make[1]: Entering directory '/home/guy/tmp/apple-tv/libplist/tools'
  CC       plistutil.o
  CCLD     plistutil
/usr/bin/ld: ../src/.libs/libplist.so: undefined reference to `fmin'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:420: plistutil] Error 1
make[1]: Leaving directory '/home/guy/tmp/apple-tv/libp

@zinglax
Copy link

zinglax commented May 14, 2020

@guysoft I am getting this error as well.

@luismaf
Copy link

luismaf commented May 20, 2020

Awesome work!! Thanks!!!

@guysoft
Copy link

guysoft commented May 20, 2020

@luismaf does it work for you? Can you post a working build log? That way I can compare why mine didn't build.

@luismaf
Copy link

luismaf commented May 20, 2020

@luismaf does it work for you? Can you post a working build log? That way I can compare why mine didn't build.
Yes, it works great: https://gist.github.com/luismaf/e11dbe9f884c9e3c07154c2f7bba3ec6

@guysoft
Copy link

guysoft commented May 20, 2020

Looks like in @louismaf 's build its not compiling libplist :

 /usr/bin/install -c -m 644  plist/plist.h plist/plist++.h plist/Array.h plist/Boolean.h plist/Data.h plist/Date.h plist/Dictionary.h plist/Integer.h plist/Key.h plist/Node.h plist/Real.h plist/String.h plist/Structure.h plist/Uid.h '/usr/local/include/plist'
make[2]: se sale del directorio '/tmp/libplist/include'
make[1]: se sale del directorio '/tmp/libplist/include'
Making install in tools
make[1]: se entra en el directorio '/tmp/libplist/tools'
make[2]: se entra en el directorio '/tmp/libplist/tools'
 /bin/mkdir -p '/usr/local/bin'
  /bin/bash ../libtool   --mode=install /usr/bin/install -c plistutil '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/plistutil /usr/local/bin/plistutil
make[2]: No se hace nada para 'install-data-am'.

Or its buliding stuff static with .a. I am not sure. It might exaplain why it does not break.

Configuration for libplist 2.1.0:
-------------------------------------------

  Install prefix ..........: /usr/local
  Debug code ..............: no
  Python bindings .........: no

Also it might be because there are no python bindings. It might be skipping something.

What distribution are you building with @louismaf ?

@luismaf
Copy link

luismaf commented May 20, 2020

@guysoft Ubuntu 18.04.4 LTS (bionic)

This might help, before found this script, I've installed this packages: sudo apt-get install libreadline-dev libssl-dev libimobiledevice-dev libgpod-common libgpod-dev libcurl3-gnutls libcurl4 libcurl4-openssl-dev

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