原创 通過代碼執行tcpdump命令

在方法函數中添加如下代碼: String cmd = "su -c tcpdump -i usb0 -s 0 [-c 1000] -w /storage/emulated/0/logcat.cap; Runtime.getRuntime