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
@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