ADB
· 阅读需 1 分钟
监听流量
adb shell tcpdump -i any -p -s 0 -w /sdcard/capture.pcap
连接到设备
adb connect 127.0.0.1:5555
获取流量
adb pull /sdcard/capture.pcap
查看流量
tcpdump -r capture.pcap
查看网络连接
adb shell cat /proc/net/tcp
查看应用包名
adb shell dumpsys package | grep -B 5 "10062"
查看应用包名
adb shell pm list packages -U | grep com.example.app
查看网络连接
netstat -tulnp
强制竖屏
adb shell settings put system user_rotation 0
禁用深度休眠和轻度休眠
adb shell dumpsys deviceidle disable
adb shell settings put global stay_on_while_plugged_in 3