Mac 使用 rvictl wireshark 抓包方法
-
从 xcode 获取 UUID
Window -> Devices and Simulators -> Devices -> Identifier -
建立 remote visual interface
rvictl -s [YourUUID]
Starting device [YourUUID] [SUCCEEDED] with interface rvi0
- 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
之后还要进入到 系统设置 - 安全性与隐私,点击重新启动,如下图

重启完成后,执行 rvictl -s [YourUUID],创建成功
- 启动 wireshark,选择创建成功的虚拟接口即可进行抓包