Skip to content

Instantly share code, notes, and snippets.

@hyugogirubato
Last active February 14, 2026 17:53
Show Gist options
  • Select an option

  • Save hyugogirubato/5f3b0b3dcb63300347f8802db936225b to your computer and use it in GitHub Desktop.

Select an option

Save hyugogirubato/5f3b0b3dcb63300347f8802db936225b to your computer and use it in GitHub Desktop.
Bash script to build and install libimobiledevice, usbmuxd, and related iOS device libraries from source on Debian/Ubuntu systems.
#!/bin/bash
# @version: 2026-02-14
# @usage: ./linux_imobiledevice.sh
# @permission: sudo
# Exit script on any error
set -euo pipefail
# Install necessary packages and dependencies
sudo apt update
sudo apt install -y \
autoconf \
automake \
build-essential \
checkinstall \
cython3 \
doxygen \
git \
libcurl4-openssl-dev \
libfuse3-dev \
libreadline-dev \
libssl-dev \
libtatsu-dev \
libtool \
libtool-bin \
libusb-1.0-0-dev \
libxml2-dev \
libzip-dev \
pkg-config \
systemd \
udev \
zlib1g-dev \
usbmuxd \
gcc
# List of interdependencies
# - libplist ()
# - libtatsu (libplist)
# - libimobiledevice-glue (libplist)
# - libusbmuxd (libplist, libimobiledevice-glue)
# - libimobiledevice (libplist, libusbmuxd, libimobiledevice-glue, libtatsu)
# - libirecovery (libimobiledevice-glue)
# - idevicerestore (libplist, libimobiledevice, libimobiledevice-glue, libtatsu)
# - usbmuxd (libplist, libusbmuxd, libimobiledevice, libimobiledevice-glue)
# - ideviceinstaller (libplist, libimobiledevice)
# - ifuse (libplist, libimobiledevice)
# - libideviceactivation (libplist, libimobiledevice)
# List of libraries to clone, build, and install
libraries=('libplist' 'libtatsu' 'libimobiledevice-glue' 'libusbmuxd' 'libimobiledevice' 'libirecovery' 'idevicerestore' 'usbmuxd' 'ideviceinstaller' 'ifuse' 'libideviceactivation')
# Loop through each library, clone, build and install
for library in "${libraries[@]}"; do
# Clone the library from GitHub
git clone "https://github.com/libimobiledevice/$library"
pushd "$library"
# Run autogen to generate configuration scripts, then build and install the library
./autogen.sh --prefix=/usr/local --enable-debug --without-cython
make
sudo make install
sudo ldconfig
popd
# Clean up the cloned repository to save space
rm -rf "$library"
done
#sudo modprobe fuse
#sudo adduser "$USER" fuse
echo 'All libraries installed successfully.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment