Skip to content

Instantly share code, notes, and snippets.

@soheilbm
Last active April 20, 2024 01:52
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save soheilbm/32d67c3aaad30cf57300d0ad4fd4775c to your computer and use it in GitHub Desktop.
Save soheilbm/32d67c3aaad30cf57300d0ad4fd4775c to your computer and use it in GitHub Desktop.
Install libimobiledevice on OSX
Install libimobiledevice on Mac OS X
So you'd like to manage your iOS devices by command line?
You can use libimobiledevice tools for that.
Easy on Linux. Let's see how it is on Mac OS X.
You'll need to:
1. install Xcode
2. start Xcode and agree to it's license
3. install Xcode command line tools (Start Xcode, Go to Preferences -> Downloads tab)
4. install homebrew by this command (sudo password will be prompted)
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
5. run following
brew install -v --fresh automake autoconf libtool wget libimobiledevice
brew install -v --HEAD --fresh --build-from-source ideviceinstaller
6. ready to go
In OSX Sierra:
brew uninstall ideviceinstaller -g
brew uninstall libimobiledevice -g
brew install --HEAD libimobiledevice -g
brew install ideviceinstaller -g
sudo rm -rf /var/db/lockdown/*
@perrzick
Copy link

Thanks for sharing! liked it :)

Is there a way to use "libimobiledevice" as a standalone executable without installing Xcode, brew etc. ?

@pppruthviraj9
Copy link

You can access https://libimobiledevice.org/ for the .tar.gz file

@webhype
Copy link

webhype commented May 13, 2023

I get Error: invalid option: --fresh on both brew commands ... when removing this option, the compiling starts but fails.

configure: error: Package requirements (libplist-2.0 >= 2.3.0) were not met:

Requested 'libplist-2.0 >= 2.3.0' but version of libplist is 2.2.0

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables libplist_CFLAGS
and libplist_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

==> Formula
Path: /Users/macuser/Library/Caches/Homebrew/downloads/b9c905d9805f4cb8296b59e3adc421977c4e6cdeec01efba2c3c3ea4f5aad230--ideviceinstaller.rb
==> Configuration
HOMEBREW_VERSION: 4.0.17
ORIGIN: https://github.com/Homebrew/brew
HEAD: c0f8068573bbf886fdc78d3f9daca54d53e7e49e
Last commit: 5 days ago
Core tap origin: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 1fd2c64408557a86766f5d903898821b6e884fff
Core tap last commit: 26 hours ago
Core tap branch: master
Core tap JSON: 13 May 15:57 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: dodeca-core 64-bit arm_blizzard_avalanche
Clang: 14.0.3 build 1403
Git: 2.39.2 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.87.0 => /usr/bin/curl
macOS: 13.3.1-arm64
CLT: 14.3.0.0.1.1679647830
Xcode: N/A
Rosetta 2: false
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j12
CMAKE_PREFIX_PATH: /opt/homebrew/opt/openssl@1.1:/opt/homebrew
CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /opt/homebrew/opt/libplist/lib/pkgconfig:/opt/homebrew/opt/libtasn1/lib/pkgconfig:/opt/homebrew/opt/libusb/lib/pkgconfig:/opt/homebrew/opt/libusbmuxd/lib/pkgconfig:/opt/homebrew/opt/openssl@1.1/lib/pkgconfig:/opt/homebrew/opt/libimobiledevice/lib/pkgconfig:/opt/homebrew/opt/lz4/lib/pkgconfig:/opt/homebrew/opt/xz/lib/pkgconfig:/opt/homebrew/opt/zstd/lib/pkgconfig:/opt/homebrew/opt/libzip/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/13
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
ACLOCAL_PATH: /opt/homebrew/share/aclocal
PATH: /opt/homebrew/Library/Homebrew/shims/mac/super:/opt/homebrew/opt/autoconf/bin:/opt/homebrew/opt/automake/bin:/opt/homebrew/opt/libtool/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/libplist/bin:/opt/homebrew/opt/libtasn1/bin:/opt/homebrew/opt/libusbmuxd/bin:/opt/homebrew/opt/openssl@1.1/bin:/opt/homebrew/opt/libimobiledevice/bin:/opt/homebrew/opt/lz4/bin:/opt/homebrew/opt/xz/bin:/opt/homebrew/opt/zstd/bin:/opt/homebrew/opt/libzip/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: ideviceinstaller HEAD-71ec5ea did not build

I use an M2 silicon MacBook Mac OS X 13.3.1 (a) with Rosetta 2 installed.

The reason I am trying my own compilation is because version 1.3.0 (which is published via homebrew as a binary) doesn't work with current iOS / Mac OS as per libimobiledevice/libimobiledevice#1123

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