Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrorOutput ¶
命令运行时可能会出现异常并在控制台输出,此函数就是为了识别这些可能的异常 另一方面,有些时候命令执行是成功的,但是执行的结果我将其视为 "失败" 例如执行 adb connect "" 时 ,输出是 "empty address...",我认为将其视为 error 是合适的 此函数并未涵盖所有的可能的异常输出,我只是添加了我遇到的
Types ¶
type ADBRunner ¶
用于执行 ADB 命令,例如: run("shell ls")
func NewADBRunner ¶
adb 是运行 adb 时使用的命令,可以使用指定 adb 的路径,例如 "/usr/bin/adb"
type ADBRunnerWithReader ¶
func NewADBRunnerWithReader ¶
func NewADBRunnerWithReader(adb string) ADBRunnerWithReader
type Device ¶
type Device struct { IsOnline bool ID string USB string Product string Model string Device string TransportID int // 此处的 Cmd 已经带有指定设备的参数,例如 "-s 192.168.1.3" // 当调用 Cmd("ls") 时,实际运行的命令是 "adb -s 192.168.1.3 shell ls" Cmd ADBRunner // adb 执行文件的路径 ADBPath string Input Input }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Disconnect ¶
断开网络设备的连接,如果 host=="" 则会断开所有网络设备连接
func (*Server) KillServer ¶
Click to show internal directories.
Click to hide internal directories.