修改设备结构
This commit is contained in:
@@ -21,6 +21,11 @@ type DeviceInfo struct {
|
|||||||
Props map[string]string
|
Props map[string]string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type AdbDevice struct {
|
||||||
|
Connect net.Conn
|
||||||
|
Serial string
|
||||||
|
}
|
||||||
|
|
||||||
// ListDevicesRaw: 请求 host:devices 并返回原始 payload
|
// ListDevicesRaw: 请求 host:devices 并返回原始 payload
|
||||||
func ListDevicesRaw(addr string, timeout time.Duration) (string, error) {
|
func ListDevicesRaw(addr string, timeout time.Duration) (string, error) {
|
||||||
conn, err := DialADB(addr, timeout)
|
conn, err := DialADB(addr, timeout)
|
||||||
|
|||||||
@@ -4,16 +4,15 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"go-mobile-uiautomator/adb"
|
"go-mobile-uiautomator/adb"
|
||||||
selector "go-mobile-uiautomator/libs"
|
|
||||||
"go-mobile-uiautomator/services"
|
"go-mobile-uiautomator/services"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const serial = "192.168.4.103:5555"
|
const serial = "emulator-5556"
|
||||||
const addr = "127.0.0.1:5037"
|
const addr = "127.0.0.1:5037"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
selector.Example()
|
LaunchUiautomator()
|
||||||
}
|
}
|
||||||
|
|
||||||
func LaunchUiautomator() {
|
func LaunchUiautomator() {
|
||||||
|
|||||||
Reference in New Issue
Block a user