iOS 测试 libimobiledevice 工具使用

xinxi · 2018年08月05日 · 3258 次阅读

什么是 libimobiledevice?

  • 参考文章:https://www.jianshu.com/p/6423610d3293

  • libimobiledevice 又称 libiphone,是一个开源包,可以让 Linux 支持连接 iPhone/iPod Touch 等 iOS 设备.

  • ideviceinstaller 可以实现安装 app,卸载 app,查看当前电脑连接的设备等操作,和 Android 的 adb 命令相似.

离线安装

$ 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

在线安装

  • brew update

  • brew install libimobiledevice

  • libimobiledevice 中并不包含 ipa 的安装命令,所以还需要安装

  • brew install ideviceinstaller

  • 卸载 brew uninstall libimobiledevice

常用命令

  • 命令安装一个 ipa 文件到手机上,如果是企业签名的,非越狱机器也可以直接安装了。

  • 安装 ipa 包,卸载应用

ideviceinstaller -i xxx.ipa
  • 命令卸载应用,需要知道此应用的 bundleID
ideviceinstaller -U [bundleID]
  • 查看系统日志
idevicesyslog
  • iOS 11 使用

    提示ERROR: Could not start service com.apple.syslog_relay.
    
  • 查看当前电脑连接的设备

idevice_id --list
打印出来的是udid
  • 屏幕截屏

    idevicescreenshot
    
  • 获取设备时间

    idevicedate
    
  • 获取设备名称

    idevicename
    

# 参考

http://www.akblog.cn/2017/02/11/macOS-Sierralibimobiledevice/编译安装

共收到 0 条回复 时间 点赞
xinxi idevicecrashreport 工具查看 iOS 崩溃日志 中提及了此贴 08月06日 21:49
xinxi 关闭了讨论 08月12日 13:21
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册