#### 安装与卸载

```bash
ideviceinstaller -i xxx.ipa # 安装
ideviceinstaller -u [bundleID] # 卸载
ideviceinstaller -u [udid] -l # 查看指定设备安装的第三方应用
ideviceinstaller -u [udid] -l -o list_system # 查看指定设备安装的系统应用
ideviceinstaller -u [udid] -l -o list_all # 查看指定设备安装的所有应用
```

#### 列出本机模拟器及连接设备的信息
```bash
instruments -s devices
```

#### 查看连接设备信息
```bash
idevice_id -l # 打印当前已连接设备的udid
ideviceinfo # 打印设备信息
ideviceinfo -k ProductVersion # 获取连接设备的系统版本号
ideviceinfo -u [udid] # 指定设备,获取设备信息
ideviceinfo -u [udid] -k DeviceName # 指定设备,获取设备名称:iPhone6s
idevicename -u [udid] # 指定设备,获取设备名称:iPhone6s
ideviceinfo -u [udid] -k ProductVersion # 指定设备,获取设备版本:10.3.1
ideviceinfo -u [udid] -k ProductType # 指定设备,获取设备类型:iPhone8,1
ideviceinfo -u [udid] -k ProductName # 指定设备,获取设备系统名称:iPhone OS
```

#### 备份
```bash
idevicebackup
```

#### 获取系统崩溃日志
```bash
idevicecrashreport
```

#### 远程调试代理
```bash
idevicedebugserverproxy
```

#### 获取设备时间
```bash
idevicedate
```

#### 重启设备
```bash
idevicedignostices restart
```

#### 截屏
```bash
idevicescreenshot /Users/medivh/Desktop/a.png # 将文件输入到指定路径
```

#### 日志
```bash
idevicesyslog # 日志输出到屏幕
idevicesyslog -u [udid] > /Users/home/Desktop/log.log # 将日志输出到指定路径
```

#### bundleID
```bash
unzip xxx.ipa
cd Payload/xxx.app
defaults read `pwd`/Info CFBundleIdentifier
```

#### show SDK
```bash
xcodebuild -showsdks # 查看本机sdk版本
```

#### 开启指定模拟器
```bash
xcrun instruments -w 'iPhone 7 Plus (11.4) [$uuid]'
```

#### 安装指定app
```bash
xcrun simctl install booted <app path>
```

#### 运行指定app (com.example.app)
```bash
xcrun simctl launch booted <bundleID>
```

#### 卸载指定应用
```bash
xcrun simctl uninstall booted <bundleID>
```

### appium inspector 这个基本没法用
```bash
app-inspector -u $uuid/udid
```

### appium-desktop inspector 这个最好用了
```
1、打开appium-desktop,start;
2、菜单栏->Appium->new session window;
3、saved capabillity sets中设置参数, host:127.0.0.1:4723/wd/hub,
devices = {
"platformName": "iOS",
"deviceName": "iPhone 6",
"platformVersion": "11.0",
"bundleId": "com.chezhubang",
"automationName": "XCUITest",
"udid": "2aeda56a9b8c38eacb6ff8055ecce4998174cd0f"};
4、start session;
```

### xcodebuild
```bash
UDID=$(idevice_id -l)
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=$UDID" test
```

### wda inspector 这个相对好用一点
```bash
UDID=$(idevice_id -l)
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=$UDID" test
https://[ip]/inspector
```

### iproxy
```bash
iproxy [port] [port]
```

### 查看设备的描述文件
```bash
ideviceprovision list
```

libimobiledevice的更多相关文章

  1. Mac上编译libimobiledevice库

    0.准备工作: 使用brew或Mac Ports安装:libgnutls or openssl. libplist .libusb.libusbmuxd 1.下载代码: 下载地址:https://gi ...

  2. libimobiledevice安装步骤

    https://github.com/libimobiledevice/libimobiledevice libimobiledevice安装指南,你还不知道libimobiledevice为何物,赶 ...

  3. [转]在 Mac OS X上编译 libimobiledevice 的方法

    link: http://blog.boceto.fr/2012/05/05/libimobiledevice-for-macosx/ The objective of the day: Compil ...

  4. libimobiledevice命令

    Mac 安装 1. 安装HomeBrew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/m ...

  5. iOS开发的另类神器:libimobiledevice开源包【类似android adb 方便获取iOS设备信息】

    简介 libimobiledevice又称libiphone,是一个开源包,可以让Linux支持连接iPhone/iPod Touch等iOS设备.由于苹果官方并不支持Linux系统,但是Linux上 ...

  6. 【转】Install libimobiledevice on Mac OSX

    About the App App name: libimobiledevice App description: Library to communicate with iOS devices na ...

  7. 【原创】使用开源libimobiledevice盗取iphone信息

     一.概述     libimobiledevice可以理解为Linux系统下的iTunes,破解了iTunes的通信协议. 依赖:https://github.com/libimobiledevic ...

  8. libimobiledevice --Mingw32交叉编译

    本文只描述 windows环境下的使用情况,linux平台基本雷同. 一.配置编译环境. (1)操作系统 :Windows10 (64bit). (2)类unix环境:Cygwin(64bit) 下载 ...

  9. 【Mac 10.13.0】安装 libimobiledevice,提示报错:warning: unable to access '/Users/lucky/.config/git/attributes': Permission denied解决方案

    打开终端,执行命令: 1.sudo chown -R XXX /usr/local  (XXX表示当前用户名) 2.ruby -e "$(curl -fsSL https://raw.git ...

  10. 使用libimobiledevice + ifuse提取iOS沙盒文件

    简介 libimobiledevice:一个开源包,可以让Linux支持连接iPhone/iPod Touch等iOS设备. Git仓库: https://github.com/libimobiled ...

随机推荐

  1. Once in a casino CodeForces - 1120B (暴力)

    大意: 给定两个字符串$a,b$, 每个字符为$0-9$, 每次操作将$a$中相邻两位加$1$或减$1$, 操作后每个数仍要为$0-9$, 求最少操作使$a$变成$b$. 先不考虑范围, 判断是否成立 ...

  2. Warning: popen() has been disabled for security reasons in OS/Guess.php on line 241

    今天使用pecl install swoole命令编译安装swoole的时候提示:Warning: popen() has been disabled for security reasons in ...

  3. 创建新表,自动授权trigger

    需求 一个用户下三个表,开发人员不定时进行rename表名称,create原表名称 as old_table 插入少量数据,另一个业务用户需要访问该表,由于表名称rename导致经常需要手工授权. 需 ...

  4. 接口请求 URL转码

    什么是URL转码 不管是以何种方式传递url时,如果要传递的url中包含特殊字符,如想要传递一个+,但是这个+会被url会被编码成空格,想要传递&,被url处理成分隔符. 尤其是当传递的url ...

  5. (八)CXF之用spring添加拦截器

    一.案例 本章案例是基于CXF之自定义拦截器基础之上改造的,目的是在服务端中用spring添加拦截器 配置web.xml <?xml version="1.0" encodi ...

  6. Xmind ZEN破解版来袭:如何去除水印

    Xmind ZEN是一款十分优雅地思维导图软件,但是找不到其破解版,在导出图片时就会携带上水印. image-20190110110013642.png 当然,土豪请(点击这里关闭). image-2 ...

  7. 2.Java集合-ConcurrentHashMap实现原理及源码分析

    一.为何用ConcurrentHashMap 在并发编程中使用HashMap可能会导致死循环,而使用线程安全的HashTable效率又低下. 线程不安全的HashMap 在多线程环境下,使用HashM ...

  8. mysql5.6快速安装及参数详解

    一.所需软件 软件名称 版本 下载地址 当前环境 管理员账号/密码 mysql 5.6 yum安装 centOS6.7系统 zxfly/zxfly 二.安装说明 数据库所在目录 /database/m ...

  9. 集成IDE anaconda

    Anaconda 下载安装完anaconda后,会生成如下工具: 安装Anaconda不需要使用管理员权限.安装完毕后,Anaconda附带一个图形启动器(Anaconda Prompt),可以使用他 ...

  10. iptables详解说明

    Iptabels是与Linux内核集成的包过滤防火墙系统,几乎所有的linux发行版本都会包含Iptables的功能.如果 Linux 系统连接到因特网或 LAN.服务器或连接 LAN 和因特网的代理 ...