官方github地址:https://github.com/libimobiledevice/libimobiledevice
在MacOS下安装可以使用brew,类似Ubuntu中的apt-get
sudo brew update
sudo brew install libimobiledevice
#libimobiledevice中并不包含ipa的安装命令,所以还需要安装
sudo brew install ideviceinstaller
//命令安装一个ipa文件到手机上,如果是企业签名的,非越狱机器也可以直接安装了。
ideviceinstaller -i xxx.ipa
//命令卸载应用,需要知道此应用的bundleID
ideviceinstaller -U [bundleID]
idevicesyslog
idevice_id --list
idevicescreenshot
ideviceinfo
idevicedate
iproxy
ideviceimagemounter
idevicename
idevicedebug
ideviceprovision list
"Could not connect to lockdownd. Exiting."
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
ifuse是一个依赖libimobiledevice库的工具,所以必须首先安装libimobiledevice
首先去 https://osxfuse.github.io/ 下载fuse for mac os的库。
然后github上clone下载ifuse最新源码到本地(自己决定放哪):
cd 到要安装的目标路径
然后:
git clone https://github.com/libimobiledevice/ifuse.git
进入clone好的目录,执行:
//将源码在本机编译:
./autogen.sh
./configure
make
//执行脚本ifuse到系统终端(其实也可以不用,直接去src中运行也可以)
sudo make install
ifuse [挂载点]
注意,此处的挂载点必须要真实存在,需要预先创建好目录,否则挂载失败
ifuse --documents [要挂载的应用的bundleID]
注意,iOS 8.3之后要求应用的UIFileSharingEnabled权限要开启,否则可能没有权限访问,会有如下的错误提示:
ERROR: InstallationLookupFailed
The App ‘com.wsgh.test’ is either not present on the device, or the ‘UIFileSharingEnabled’ key is not set in its Info.plist.
Starting with iOS 8.3 this key is mandatory to allow access to an app’s Documents folder.
ifuse --container [要挂载的应用的bundleID]
ideviceinstaller -l
fusermount -u [挂载点]
如果是越狱的设备,并且配置好了,可以使用下面命令挂载整个iphone文件系统(暂时没试过,还没有开始研究越狱设备)
ifuse --root [挂载点]
详细说明,可以进入ifuse的github主页查看原版文档