fix: ASW-67 tcpdump 指定包名时命令参数错误

This commit is contained in:
shizhendong
2024-09-10 17:10:38 +08:00
parent 7eb678813f
commit 0f4d250328

View File

@@ -588,7 +588,7 @@ public class AdbUtil {
String pcapFilePath = "/data/local/tmp/capture_" + userId + "_" + packageName + "_" + taskId + ".pcap"; String pcapFilePath = "/data/local/tmp/capture_" + userId + "_" + packageName + "_" + taskId + ".pcap";
CommandExec.execForProcess(AdbCommandBuilder.builder() CommandExec.execForProcess(AdbCommandBuilder.builder()
.serial(this.getSerial()) .serial(this.getSerial())
.buildShellCommand(String.format("shell tcpdump not port %s -i nflog:%s -w %s &", this.vncPort, userId, pcapFilePath)) .buildShellCommand(String.format("shell tcpdump -i nflog:%s -w %s &", userId, pcapFilePath))
.build()); .build());
} else { } else {
log.info("[startTcpdump] [capture all package]"); log.info("[startTcpdump] [capture all package]");