From 737f2bb5a241ba6a21e55235b3718f876819d29a Mon Sep 17 00:00:00 2001 From: zyj <18107291228@163.com> Date: Wed, 12 Nov 2025 18:40:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adb/device.go | 5 +++++ cmd/main.go | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/adb/device.go b/adb/device.go index a172e56..49237c2 100644 --- a/adb/device.go +++ b/adb/device.go @@ -21,6 +21,11 @@ type DeviceInfo struct { Props map[string]string } +type AdbDevice struct { + Connect net.Conn + Serial string +} + // ListDevicesRaw: 请求 host:devices 并返回原始 payload func ListDevicesRaw(addr string, timeout time.Duration) (string, error) { conn, err := DialADB(addr, timeout) diff --git a/cmd/main.go b/cmd/main.go index 96ded52..c79b4a2 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -4,16 +4,15 @@ import ( "encoding/json" "fmt" "go-mobile-uiautomator/adb" - selector "go-mobile-uiautomator/libs" "go-mobile-uiautomator/services" "time" ) -const serial = "192.168.4.103:5555" +const serial = "emulator-5556" const addr = "127.0.0.1:5037" func main() { - selector.Example() + LaunchUiautomator() } func LaunchUiautomator() {