From b0b41b88045ad5c29ec1b458fc3e4818e6ad12fc Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Thu, 13 Apr 2023 23:08:43 +0800 Subject: [PATCH] change: remove debug log --- hrp/pkg/gadb/device.go | 5 ++--- hrp/pkg/gadb/transport.go | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hrp/pkg/gadb/device.go b/hrp/pkg/gadb/device.go index 4b296396..97bb08db 100644 --- a/hrp/pkg/gadb/device.go +++ b/hrp/pkg/gadb/device.go @@ -247,8 +247,7 @@ func (d *Device) RunShellCommand(cmd string, args ...string) (string, error) { func (d *Device) RunShellCommandWithBytes(cmd string, args ...string) ([]byte, error) { if d.HasFeature(FeatShellV2) { - raw, err := d.RunShellCommandV2WithBytes(cmd, args...) - return raw, err + return d.RunShellCommandV2WithBytes(cmd, args...) } if len(args) > 0 { cmd = fmt.Sprintf("%s %s", cmd, strings.Join(args, " ")) @@ -278,7 +277,7 @@ func (d *Device) RunShellCommandV2WithBytes(cmd string, args ...string) ([]byte, } log.Debug().Str("cmd", fmt.Sprintf("adb -s %s shell %s", d.serial, cmd)). - Msg("run adb command") + Msg("run adb command in v2") raw, err := d.executeCommand(fmt.Sprintf("shell,v2,raw:%s", cmd)) if err != nil { return raw, err diff --git a/hrp/pkg/gadb/transport.go b/hrp/pkg/gadb/transport.go index 8c54089e..c450d053 100644 --- a/hrp/pkg/gadb/transport.go +++ b/hrp/pkg/gadb/transport.go @@ -34,7 +34,6 @@ func newTransport(address string, readTimeout ...time.Duration) (tp transport, e func (t transport) Send(command string) (err error) { msg := fmt.Sprintf("%04x%s", len(command), command) - log.Debug().Str("cmd", command).Msg("run adb command") return _send(t.sock, []byte(msg)) }