Linux下管理挂载IOS设备——libimobiledevice
https://www.jianshu.com/p/6423610d3293
https://blog.csdn.net/fengzei886/article/details/53380009
#####gitlib下载包--编译安装
git clone https://github.com/libimobiledevice/libplist.git
git clone https://github.com/libimobiledevice/usbmuxd.git
git clone https://github.com/libimobiledevice/libusbmuxd.git
git clone https://github.com/libimobiledevice/ideviceinstaller.git
git clone https://github.com/libimobiledevice/ifuse.git
git clone https://github.com/libimobiledevice/libirecovery.git
git clone https://github.com/libimobiledevice/libideviceactivation.git

./configure
make && make install
##创建挂接目录
mkdir -p /media/iphone
ifuse /media/iphone
idevicepair pair
idevice_id --list
##实时查看日志
idevicesyslog|grep com.bxd.help

#####################################################

libimobiledevice 查看应用日志

iOS实时查看App运行日志

前言:

本文讨论如何实时查看输出在console控制台的日志。


一、Xcode

版本号:9.4.1

通过Window->Devices and Simulators,打开Devices and Simulators界面,选择我们的手机,点击view device logs能看到手机中运行的进程输出的日志。如图:

 
image.png
 
image.png

二、libimobiledevice

安装libimobiledevice很简单,在命令行输入:

brew install --HEAD libimobiledevice
注意,需要加上 –HEAD 选项,如果不加,安装是老版本,不支持iOS10的手机,所以安装时,需要加上 –HEAD 选项

1、使用idevicesyslog

在命令行输入:idevicesyslog

就可以在屏幕上看见手机上所有的日志了。

 
log.png

2、查看我们想要的日志

1)将设备日志重定向到文件

idevicesyslog >> iphone.log &
该命令是将日志导入到iphone.log这个文件,并且是在后台执行。 2)用tail -f和grep查看log tail -f iphone.log
tail -f iphone.log | grep 'QQ' # 查看包含QQ的行

如下图:

 
QQ.png

三、控制台

在用过各种办法查看App日志后,还是觉得苹果系统自带的工具用起来最方便,不用安装,不用命令行,傻瓜式操作,非常方便。

连上手机,在LaunchPad其他文件中打开控制台应用,或者搜索Console.app打开控制台应用,可以看到左侧一栏中有我们的手机设备,选择就可以,如图:

 
控制台.png

右侧输出的日志不仅有我们自己的App还有其他进程的日志,怎么过滤?非常简单,选中一条我们的日志,在进程名字上右键,选择显示进程名,然后就只会显示我们App的日志。如果显示的列名中没有进程名,我们可以在其他列名上右键,在弹出的菜单中勾选上进程就可以了。如图显示WeChat打印出的日志:

 
WeChat1.png
 
WeChat2.png

四、安装第三方工具 itoos  for mac /windows/linux

iPhone安装OpenSSH和远程连接教程

Building on Ubuntu 16.04

Install development packages discovered through trial and error.

sudo apt-get install automake libtool pkg-config libplist-dev libplist++-dev python-dev libssl-dev libusb-1.0-0-dev libfuse-dev

Clone and Build

Clone the sources.

cd ~/usr/src
for x in libusbmuxd usbmuxd libimobiledevice ifuse; do git clone https://github.com/libimobiledevice/${x}.git;done

Now build in order (the order matters):

  1. libplist (not required on Ubuntu 16.04)
  2. libusbmuxd
  3. libimobiledevice
  4. usbmuxd
  5. ifuse

Note: (Optional) If you have a system package installed which is in the above list, then I recommend uninstalling it. However, if you can't uninstall it, then no big deal. It is mostly a precautionary measure. As long as you set the bash environment variables properly, then your compiled version should not reference your system packages. Uninstalling any system packages is by no means required.

Note 2: Removing usbmuxd was required on Debian Jessie 8.10 mentioned in comments.

Build libusbmuxd
cd ~/usr/src/libusbmuxd
./autogen.sh --prefix="$HOME/usr"
make && make install
Build libimobiledevice
cd ~/usr/src/libimobiledevice
./autogen.sh --prefix="$HOME/usr"
make && make install
Build usbmuxd

Unfortunately, sudo make install is required because it needs to write to /lib/udev/rules.d and /lib/systemd/system.

cd ~/usr/src/usbmuxd
./autogen.sh --prefix="$HOME/usr"
make && sudo make install
Build ifuse
cd ~/usr/src/ifuse
./autogen.sh --prefix="$HOME/usr"
make && make install

Connect iPhone

Create a mount point and verify the paths of the tools before executing.

$ mkdir -p ~/usr/mnt

$ type -P ifuse
/home/sam/usr/bin/ifuse $ type -P idevicepair
/home/sam/usr/bin/idevicepair

Now attempt to mount using ifuse.

$ idevicepair pair
SUCCESS: Paired with device 37b633350ab83dc815a6a97dcd6d327b12c41968 $ ifuse ~/usr/mnt/ $ ls ~/usr/mnt/
AirFair Books CloudAssets DCIM Downloads FactoryLogs iTunes_Control MediaAnalysis PhotoData Photos PhotoStreamsData PublicStaging Purchases Radio Recordings Safari Vibrations

When you're finished. Unmount ~/usr/mnt using fusermount. For example,

fusermount -u ~/usr/mnt

Browsing Photos

The mounted iPhone has an empty Photos folder. Strangely, this has no photos. Instead, look in the DCIM folder for photos.

I have only copied photos off of my iPhone as a backup. I have not tried copying photos to my iPhone.

Browsing Music

最新文章

  1. java基础知识总结(2)
  2. SCRIPT5011:不能执行已释放Script的代码
  3. ORA-01033:ORACLE initialization or shutdown in progress
  4. fiddler对手机进行抓包
  5. 七个你可能不了解的CSS单位
  6. php多种实例理解无限极分类
  7. Tkinter教程之Radiobutton篇
  8. Oracle DataGuard 物理Standby 搭建(下)
  9. Linux资源监控_Nmon
  10. BZOJ 4541 【HNOI2016】 矿区
  11. eclipse 中的凝视 快捷键
  12. c语言基础学习05
  13. Java学习不走弯路教程(7.Eclipse环境搭建)
  14. 神经网络常用的Numpy功能笔记
  15. 3Delight feats. OpenVDB
  16. 实现数据结构与算法需要掌握的C语言
  17. Confluence 6 中进行用户管理的优化配置和限制的基本建议
  18. 关于Spring Security中无Session和无状态stateless
  19. js压缩上传图片base64长度
  20. 常用模块:re ,shelve与xml模块

热门文章

  1. solr-用mmseg4j配置同义词索引和检索(IKanlyzer需要修改源码适应solr接口才能使用同义词功能)
  2. CSS代码重构与优化之路(转)
  3. Mysql GROUP_CONCAT 使用注意事项
  4. Java线程池拒绝策略
  5. JavaWeb 没用
  6. SVN资源库报错:Could not create the view: org.tigris.subversion.subclipse.ui.repository.RepositoriesView
  7. Ubuntu 添加用户到sudoers
  8. Arduino Wire.h(IIC)库函数详解
  9. 对private protected public的详解:
  10. Xcode 运行时找不到xib资源文件