From eac5e8368b4b6f0d585af6f83a07e42dddbde394 Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Wed, 25 Sep 2024 22:46:45 +0800 Subject: [PATCH] refactor: android device Init, replace run shell --- hrp/internal/version/VERSION | 2 +- hrp/pkg/uixt/android_device.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hrp/internal/version/VERSION b/hrp/internal/version/VERSION index 73bc323e..72d73d42 100644 --- a/hrp/internal/version/VERSION +++ b/hrp/internal/version/VERSION @@ -1 +1 @@ -v5.0.0-beta-2409252241 \ No newline at end of file +v5.0.0-beta-2409252246 \ No newline at end of file diff --git a/hrp/pkg/uixt/android_device.go b/hrp/pkg/uixt/android_device.go index 39e65a7c..22b41b64 100644 --- a/hrp/pkg/uixt/android_device.go +++ b/hrp/pkg/uixt/android_device.go @@ -189,9 +189,8 @@ type AndroidDevice struct { } func (dev *AndroidDevice) Init() error { - myexec.RunCommand("adb", "-s", dev.SerialNumber, "shell", - "ime", "enable", "io.appium.settings/.UnicodeIME") - myexec.RunCommand("adb", "-s", dev.SerialNumber, "shell", "rm", "-r", env.DeviceActionLogFilePath) + dev.d.RunShellCommand("ime", "enable", "io.appium.settings/.UnicodeIME") + dev.d.RunShellCommand("rm", "-r", env.DeviceActionLogFilePath) return nil }