libimobiledevice 安装试用

简介: mac 系统实在是有点贵,网上找了找看能不能通过添加系统库来实现在 windows/ubuntu 上实现来获取 iphone 等 ios 系统相关的信息,从而发现了 libimobiledevice 库, 可以通过使用其中的协议接口来对设备进行数据读写操作。

mac 系统实在是有点贵,网上找了找看能不能通过添加系统库来实现在 windows/ubuntu 上实现来获取 iphone 等 ios 系统相关的信息,从而发现了 libimobiledevice 库, 可以通过使用其中的协议接口来对设备进行数据读写操作。具体安装方式如下:
<b> 注意: 如下操作都在 cygwin 中进行的</b>

  1. plist 库安装
sudo apt-get install libxml2-dev python-dev python-pip
sudo pip install cython
git clone https://github.com/libimobiledevice/libplist.git
cd libplist
./autogen.sh
make
sudo make install
  1. libusbmuxd 库安装
git clone https://github.com/libimobiledevice/libusbmuxd.git
cd libusbmuxd
./autogen.sh
make
sudo make install

<b>[问题]</b> 可能会出现如下错误之后:

checking for libplist... no
configure: error: Package requirements (libplist >= 1.11) were not met:
No package 'libplist' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables libplist_CFLAGS
and libplist_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

可以通过如下方式解决

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig

注意上述路径是指在 libplist 库中 src/*.pc 文件安装的目录

  1. libimobiledevice 库安装
git clone https://github.com/libimobiledevice/libimobiledevice.git
cd libimobiledevice
./autogen.sh
make
sudo make install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

这时候我们能执行 idevice_id,ideviceinfo,idevicename 等命令。

  1. usbmuxd 库安装
git clone https://github.com/libimobiledevice/usbmuxd.git
cd usbmuxd
./autogen.sh
make
sudo make install

该库必须安装,否则没法使用上述命令,该库的作用就是提供 usb 通讯通道, 该部分依赖 usb 开发包 libusb-dev 因此,需要用 cygwin 安装包进行安装

  1. ideviceinstaller 安装
git clone https://github.com/libimobiledevice/ideviceinstaller.git
cd ideviceinstaller
./autogen.sh
make
sudo make install

主要用来 ipa 包安裝等相關工具。
<b>[问题]</b> 出现如下错误:

$ make
make  all-recursive
make[1]: Entering directory '/cygdrive/d/workspace/libimobiledevice/ideviceinstaller'
Making all in src
make[2]: Entering directory '/cygdrive/d/workspace/libimobiledevice/ideviceinstaller/src'
  CC       ideviceinstaller-ideviceinstaller.o
ideviceinstaller.c: In function ‘main’:
ideviceinstaller.c:864:9: error: implicit declaration of function ‘asprintf’ [-Werror=implicit-function-declaration]
    if ((asprintf(&pkgname, "%s/%s", PKG_PATH, basename(ipcc)) > 0) && pkgname) {
         ^
cc1: all warnings being treated as errors
make[2]: *** [Makefile:430: ideviceinstaller-ideviceinstaller.o] Error 1
make[2]: Leaving directory '/cygdrive/d/workspace/libimobiledevice/ideviceinstaller/src'
make[1]: *** [Makefile:395: all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/d/workspace/libimobiledevice/ideviceinstaller'
make: *** [Makefile:326: all] Error 2

解决办法如下:

刪除 src/Makefile 文件内的 GLOBAL_CFLAGS 中的 -Werror
目录
相关文章
|
关系型数据库 数据库
试用Vitesse
试用了PG9.6 beta1和VitesseDB的两个版本,两者在查询上都有优化的措施,但是效果如何,抱着这样的问题做了TPC-H测试、以及一点分析。
2170 0
|
数据库 Android开发 数据安全/隐私保护
|
IDE 开发工具 Python
试用
1稳定可靠 2用户访问速度快 3 带宽大且便宜 4 管理更便捷
阿里云试用心得
还好,运行比较稳定。
|
域名解析 Ubuntu 物联网
试用阿里云有感
云服务器使用起来非常的简便,稳定
|
数据可视化 Ubuntu 机器人
阿里云学生服务器试用
1.简单介绍自己 2.介绍使用体验 3.未来展望
|
弹性计算 安全 数据安全/隐私保护
阿里云学生试用服务器
方便,快捷,为我带来了许多便利
164 0
|
存储 弹性计算 人工智能
阿里云试用中心全新升级:免费试用云服务器领取教程 最长免费领取试用12个月
阿里云试用中心升级了!阿里云产品试用中心区分开发者试用中心和企业试用中心,每日均是10:00开抢,库存有限,领完即止。可参与试用产品得用户要求:完成阿里云实名认证(企业认证或个人认证均可),未购买过相应类型的阿里云产品和未试用过相应类型的阿里云产品。

热门文章

最新文章