xcode ideviceinstaller 失败并显示“无法连接到lockedd。退出。”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39035415/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ideviceinstaller fails with "Could not connect to lockdownd. Exiting."
提问by TestAutomator
When I try to use ideviceinstaller, the command fails with the following error message:
当我尝试使用 ideviceinstaller 时,该命令失败并显示以下错误消息:
"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.
重新安装 brew 并再次重新安装 ideviceinstaller 和 libimobiledevice 它仅在我使用 sudo 时才有效,但不幸的是,在我的情况下这是不可接受的。
System paramereters:MacBookPro with 10.11.5 OSX El Capitan Target devices: iPhone 5, iPad 2
系统参数:MacBookPro with 10.11.5 OSX El Capitan 目标设备: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:
注意:我已经在我的电脑上安装了 Xcode 7.3.1 和 Xcode 8 beta 3。并使用这些命令在它们之间切换:
sudo xcode-select -switch /Applications/Xcode-beta.app/
sudo xcode-select -switch /Applications/Xcode.app/
回答by TestAutomator
Meanwhile I found the answer. This command will add durable privileges to use ideviceinstaller:
同时我找到了答案。此命令将添加持久权限以使用 ideviceinstaller:
sudo chmod -R 777 /var/db/lockdown/
回答by Michael Gallacher
Just FYI: updates to macOS, iTunes, and probably other Apple software will (correctly) reset the permissions on /var/db/lockdown.
仅供参考:macOS、iTunes 和其他 Apple 软件的更新可能会(正确)重置 /var/db/lockdown 的权限。
The best solution here is to get the latest libimobiledevice, which has a fix for this particular issue:
这里最好的解决方案是获取最新的 libimobiledevice,它修复了这个特定问题:
brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew link --overwrite libimobiledevice
brew install ideviceinstaller
brew link --overwrite ideviceinstaller
回答by kubano
I had many problems with ideviceinstaller
too, so at least I have started to use cfgutil
.
我也有很多问题ideviceinstaller
,所以至少我已经开始使用cfgutil
.
It's a CLI tool of Apple Configurator 2, always up-to-date and reliable, works well with iOS beta versions.
它是 Apple Configurator 2 的 CLI 工具,始终保持最新且可靠,适用于 iOS 测试版。
Just download the free app from the App Store: https://itunes.apple.com/hu/app/apple-configurator-2/id1037126344
只需从 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.
启动应用程序,然后从左上角的菜单中选择“Apple Configurator 2 > 安装自动化工具”。
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:
要获取 ECID,请连接 iOS 设备并运行以下命令:
cfgutil list
Here are the available functions: https://pastebin.com/ZzeueLK2
以下是可用的功能:https: //pastebin.com/ZzeueLK2
回答by rohsin
If you are getting this error while brew install --HEAD libimobiledevice
:
如果您在以下时间收到此错误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
回答by Balaji Parameswaran
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 我发现连接的Iphone 存在信任问题,于是我打开Iphone 并提供信任设备,然后问题得到解决。
回答by Chatar Veer Suthar
To fix this, try first:
要解决此问题,请先尝试:
usbmuxd --force-exit
sudo usbmuxd -f -v
Then
然后
ideviceinstaller -d -i Something.ipa
回答by positivecrux
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/
回答by Ankit Gupta
use above mentioned command ->sudo chmod -R 777 /var/db/lockdown/
使用上面提到的命令->sudo chmod -R 777 /var/db/lockdown/
if the above command does not work then, remove files from lockdown folder
如果上述命令不起作用,则从锁定文件夹中删除文件
-> cd /var/db/lockdown/
-> cd /var/db/lockdown/
-> rm -rf *
-> rm -rf *
then try ->ideviceinstaller -l
然后尝试->ideviceinstaller -l
回答by N. Lin
In my case, the steps doesn't work. Finally, I find a way to resolve:
就我而言,这些步骤不起作用。最后,我找到了解决的方法:
- DISCONNECT your device!
- run cmd in sequence:
- 断开您的设备!
- 依次运行cmd:
brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew install ideviceinstaller
sudo chmod -R 777 /var/db/lockdown
that works for me.
这对我行得通。