10

When I try to use ideviceinstaller, the command fails with the following error message:

"Could not connect to lockdownd. Exiting."

Example commands:

ideviceinstaller -l
ideviceinstaller -i Something.ipa

I have googled more than an hour to find the solution, however nothing worked for me:

Reinstall ideviceinstaller
Reinstall libimobiledevice

Reinstall brew and reinstall again both ideviceinstaller, libimobiledevice It works only if I use sudo but it's unfortunately not acceptable in my case.

System paramereters: MacBookPro with 10.11.5 OSX El Capitan Target devices: iPhone 5, iPad 2

Note: I have installed both Xcode 7.3.1 and Xcode 8 beta 3 on my computer. And used these commands to switch between them:

sudo xcode-select -switch /Applications/Xcode-beta.app/
sudo xcode-select -switch /Applications/Xcode.app/

9 Answers 9

15

Meanwhile I found the answer. This command will add durable privileges to use ideviceinstaller:

sudo chmod -R 777 /var/db/lockdown/
1
  • Wow this was the source of all my problems, lying behind cryptic errors that didn't make sense even to an experienced colleague. But that fixed it. THANK YOU!!!!!!
    – Matthew
    Dec 16, 2016 at 19:28
9

Just FYI: updates to macOS, iTunes, and probably other Apple software will (correctly) reset the permissions on /var/db/lockdown.

The best solution here is to get the latest libimobiledevice, which has a fix for this particular issue:

brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew link --overwrite libimobiledevice
brew install ideviceinstaller
brew link --overwrite ideviceinstaller
3

When you try this command:

ideviceinstaller -d -i Something.ipa

you will get a detailed error. In my case the error is:

lockdown.c:218 lockdown_check_result(): ERROR: PairingDialogResponsePending
11:28:09 lockdown.c:1012 lockdownd_do_pair(): Pair failure
Could not connect to lockdownd. 
Exiting.

On further searching for this error no. 2 I found that there was a trust issue in the Iphone connected, so I opened the Iphone and gave trust device, then the issue got resolved.

2

I had many problems with ideviceinstaller too, so at least I have started to use cfgutil.

It's a CLI tool of Apple Configurator 2, always up-to-date and reliable, works well with iOS beta versions.

Just download the free app from the App Store: https://itunes.apple.com/hu/app/apple-configurator-2/id1037126344

Start the app then select "Apple Configurator 2 > Install Automation Tools" from the upper left menu.

To install/uninstall apps:

cfgutil --ecid $ECID remove-app $BUNDLE_ID_OF_INSTALLED_APP;
cfgutil --ecid $ECID install-app $PATH_TO_IPA_OR_APP_FOLDER;

To get ECID, connect an iOS device and run the following command:

cfgutil list

Here are the available functions: https://pastebin.com/ZzeueLK2

1
  • This is a criminally overlooked suggestion, thank you! May 11, 2018 at 6:47
1

To fix this, try first:

usbmuxd --force-exit
sudo usbmuxd -f -v

Then

ideviceinstaller -d -i Something.ipa
1

bellow commands solved my problem

brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew unlink libimobiledevice && brew link libimobiledevice
brew install --HEAD  ideviceinstaller
brew unlink ideviceinstaller && brew link ideviceinstaller
sudo chmod -R 777 /var/db/lockdown/
1

If you are getting this error while brew install --HEAD libimobiledevice :

"configure: error: Package requirements (libusbmuxd >= 1.1.0) were not met:
Requested 'libusbmuxd >= 1.1.0' but version of libusbmuxd is 1.0.10"

Below commands will solve the issue:

brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
0

use above mentioned command ->sudo chmod -R 777 /var/db/lockdown/

if the above command does not work then, remove files from lockdown folder

-> cd /var/db/lockdown/

-> rm -rf *

then try ->ideviceinstaller -l

0

In my case, the steps doesn't work. Finally, I find a way to resolve:

  1. DISCONNECT your device!
  2. run cmd in sequence:

brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew install ideviceinstaller
sudo chmod -R 777 /var/db/lockdown

that works for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.