From 05c4bc9e084602036a05ca84e09852059c5acc6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=B3=93=E9=93=AE?= Date: Tue, 28 May 2024 15:18:21 +0800 Subject: [PATCH] fix: code check error --- hrp/pkg/gadb/device.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hrp/pkg/gadb/device.go b/hrp/pkg/gadb/device.go index d388ad55..f2d47e83 100644 --- a/hrp/pkg/gadb/device.go +++ b/hrp/pkg/gadb/device.go @@ -205,15 +205,11 @@ func (d *Device) Forward(remoteInterface interface{}, noRebind ...bool) (port in if err != nil { return } - - command := "" - local := fmt.Sprintf("tcp:%d", localPort) + command := fmt.Sprintf("host-serial:%s:forward:%s;%s", d.serial, local, remote) if len(noRebind) != 0 && noRebind[0] { command = fmt.Sprintf("host-serial:%s:forward:norebind:%s;%s", d.serial, local, remote) - } else { - command = fmt.Sprintf("host-serial:%s:forward:%s;%s", d.serial, local, remote) } _, err = d.adbClient.executeCommand(command, true)