TestAutomator
TestAutomator

Reputation: 299

ideviceinstaller fails with "Could not connect to lockdownd. Exiting."

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/

Upvotes: 10

Views: 16894

Answers (9)

N. Lin
N. Lin

Reputation: 1

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.

Upvotes: 0

Ankit Gupta
Ankit Gupta

Reputation: 786

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

Upvotes: 0

Balaji Parameswaran
Balaji Parameswaran

Reputation: 31

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.

Upvotes: 3

rohsin
rohsin

Reputation: 61

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

Upvotes: 1

kubano
kubano

Reputation: 651

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

Upvotes: 2

positivecrux
positivecrux

Reputation: 1377

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/

Upvotes: 1

Michael Gallacher
Michael Gallacher

Reputation: 161

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

Upvotes: 9

TestAutomator
TestAutomator

Reputation: 299

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

sudo chmod -R 777 /var/db/lockdown/

Upvotes: 15

Chatar Veer Suthar
Chatar Veer Suthar

Reputation: 15639

To fix this, try first:

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

Then

ideviceinstaller -d -i Something.ipa

Upvotes: 1

Related Questions