ideviceinstaller fails with "Could not connect to lockdownd. Exiting."
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
Meanwhile I found the answer. This command will add durable privileges to use ideviceinstaller:
sudo chmod -R 777 /var/db/lockdown/
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