修改设备结构

This commit is contained in:
zyj
2025-11-12 18:40:23 +08:00
parent dffb35cb5b
commit 737f2bb5a2
2 changed files with 7 additions and 3 deletions

View File

@@ -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)

View File

@@ -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() {