Mac 使用 rvictl wireshark 抓包方法

  1. 从 xcode 获取 UUID
    Window -> Devices and Simulators -> Devices -> Identifier

  2. 建立 remote visual interface

rvictl -s [YourUUID]
Starting device [YourUUID] [SUCCEEDED] with interface rvi0

  1. errors

rvictl -s [YourUUID]
Starting device [YourUUID] [FAILED]

尝试执行下面的命令

sudo /usr/sbin/installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/MobileDeviceDevelopment.pkg -target /

并确认 rvictl 是否正确加载,执行

sudo launchctl list com.apple.rpmuxd

如果已加载则会提示

$ sudo launchctl list com.apple.rpmuxd
{
"Label" = "com.apple.rpmuxd";

};

未加载则会提示

$ sudo launchctl list com.apple.rpmuxd
Could not find service "com.apple.rpmuxd" in domain for system

可以手动进行加载

$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.rpmuxd.plist

13.2以上版本的 xcode 没有将 rpmuxd 安装到上面的路径(参考),会有下面的提示

/System/Library/LaunchDaemons/com.apple.rpmuxd.plist: No such file or directory

加载正确的目录位置

sudo launchctl load -w /Library/Apple/System/Library/LaunchDaemons/com.apple.rpmuxd.plist

之后还要进入到 系统设置 - 安全性与隐私,点击重新启动,如下图


lEw2yqobJo.png

重启完成后,执行 rvictl -s [YourUUID],创建成功

  1. 启动 wireshark,选择创建成功的虚拟接口即可进行抓包

【参考】
Using Wireshark to sniff network packets

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。