修改设备结构
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user