目录

使用wifi连接手机adb进行调试不使用数据线adb调试手机找应用错误日志和操作日志

使用wifi连接手机adb进行调试|不使用数据线adb调试手机|找应用错误日志和操作日志

手机在开发者选项里要开启无线调试

在手机设置中查看WiFi的IP地址

设置 -> WLAN -> 已连接的WiFi -> IP地址

使用手机的IP地址连接

adb connect 192.168.1.12:xxxxx

检查连接状态

adb devices

断开特定设备

adb disconnect 192.168.x.x:xxxxx

断开所有设备

adb disconnect 关闭USB摄像头服务 adb shell am force-stop com.shenyaocn.android.usbcamera 开启USB摄像头服务 adb shell am startservice -n com.shenyaocn.android.usbcamera/.USBCameraService 找到你想调试的应用的包名,需要在手机上打开应用 adb shell dumpsys window | findstr “mCurrentFocus”

先获取应用的 PID

adb shell ps | findstr “com.shenyaocn.android.usbcamera”

清除日志

adb logcat -c

然后使用 PID 过滤日志,(查看所有日志)

adb logcat –pid=2849 2849是你自己的进程ID

如果只想查看错误日志:

adb logcat -c; adb logcat *:E –pid=2849