Documentation ¶
Index ¶
- Constants
- func AdbPath() string
- func Compression(src, dst string) error
- func GetFreePort() int
- func Uncompression(src, dst string) error
- type AdbClient
- func (adb *AdbClient) Connect(addr string) string
- func (adb *AdbClient) Device(snNtid SerialNTransportID) AdbDevice
- func (adb *AdbClient) DeviceList() []AdbDevice
- func (adb *AdbClient) Disconnect(addr string, raiseErr bool) string
- func (adb *AdbClient) ServerKill()
- func (adb *AdbClient) ServerVersion() int
- func (adb *AdbClient) Shell(serial string, command string, stream bool) interface{}
- func (adb *AdbClient) WaitFor()
- type AdbConnection
- func (adbConnection AdbConnection) CheckOkay()
- func (adbConnection AdbConnection) Close()
- func (adbConnection AdbConnection) Read(n int) []byte
- func (adbConnection AdbConnection) ReadString(n int) string
- func (adbConnection AdbConnection) ReadStringBlock() string
- func (adbConnection AdbConnection) ReadUntilClose() string
- func (adbConnection AdbConnection) SendCommand(cmd string)
- func (adbConnection AdbConnection) SetTimeout(timeOut time.Duration) error
- type AdbDevice
- func (adbDevice AdbDevice) AdbOut(command string) string
- func (adbDevice AdbDevice) CreateConnection(netWork, address string) net.Conn
- func (adbDevice AdbDevice) ForWard(local, remote string, noRebind bool) *AdbConnection
- func (adbDevice AdbDevice) ForWardPort(remote interface{}) int
- func (adbDevice AdbDevice) ForwardList() []ForwardItem
- func (adbDevice AdbDevice) GetDevPath() string
- func (adbDevice AdbDevice) GetFeatures() string
- func (adbDevice AdbDevice) GetSerialNo() string
- func (adbDevice AdbDevice) GetState() string
- func (adbDevice AdbDevice) Info() map[string]string
- func (adbDevice AdbDevice) Push(local, remote string) string
- func (adbDevice AdbDevice) Shell(cmdargs string, stream bool, timeOut time.Duration) interface{}
- func (adbDevice AdbDevice) ShellOutPut(cmd string) string
- func (adbDevice AdbDevice) StartTCPIP(port string) string
- func (adbDevice AdbDevice) String()
- func (adbDevice AdbDevice) Sync() Sync
- type AdbDeviceInfo
- type DeviceEvent
- type FileInfo
- type ForwardItem
- type ReverseItem
- type RunningAppInfo
- type SerialNTransportID
- type ShellMixin
- func (mixin ShellMixin) AppClear(packageName string)
- func (mixin ShellMixin) AppStart(packageName, activity string)
- func (mixin ShellMixin) AppStop(packageName string)
- func (mixin ShellMixin) CLick(x, y int)
- func (mixin ShellMixin) CurrentApp() string
- func (mixin ShellMixin) DumpHierarchy() string
- func (mixin ShellMixin) GetProp(prop string) string
- func (mixin ShellMixin) InstallRemote(remotePath string, clean bool)
- func (mixin ShellMixin) IsScreenOn() bool
- func (mixin ShellMixin) KeyEvent(keyCode string) string
- func (mixin ShellMixin) ListPackages() []string
- func (mixin ShellMixin) OpenBrowser(url string)
- func (mixin ShellMixin) PackageInfo(packageName string)
- func (mixin ShellMixin) Remove(path string)
- func (mixin ShellMixin) Rotation()
- func (mixin ShellMixin) SayHello() string
- func (mixin ShellMixin) SendKeys(text string)
- func (mixin ShellMixin) Swipe(x, y, tox, toy int, duration time.Duration)
- func (mixin ShellMixin) SwitchAirPlane(status bool)
- func (mixin ShellMixin) SwitchScreen(status bool)
- func (mixin ShellMixin) SwitchWifi(status bool)
- func (mixin ShellMixin) Uninstall(packageName string)
- func (mixin ShellMixin) WindowSize()
- func (mixin ShellMixin) WlanIp() string
- type ShellReturn
- type Sync
- func (sync Sync) Exist(path string) bool
- func (sync Sync) IterContent(path string) []byte
- func (sync Sync) IterDirectory(path string) []FileInfo
- func (sync Sync) List(path string) []FileInfo
- func (sync Sync) Pull(src, dst string) int
- func (sync Sync) Push(src, dst string, mode int, check bool) int
- func (sync Sync) ReadBytes(path string) []byte
- func (sync Sync) ReadText(path string) string
- func (sync Sync) Stat(path string) FileInfo
- type WindowSize
Constants ¶
View Source
const ( OKAY = "OKAY" FAIL = "FAIL" DENT = "DENT" DONE = "DONE" DATA = "DATA" TCP = "tcp" UNIX = "unix" DEV = "dev" LOCAL = "local" LOCALRESERVED = "localreserved" LOCALFILESYSTEM = "localfilesystem" LOCALABSTRACT = "localabstract" Windows = "windows" Mac = "darwin" Linux = "linux" WinAdbURL = "https://dl.google.com/android/repository/platform-tools-latest-windows.zip" )
View Source
const Version = "0.0.2"
Variables ¶
This section is empty.
Functions ¶
func Compression ¶
func GetFreePort ¶
func GetFreePort() int
func Uncompression ¶
Types ¶
type AdbClient ¶
AdbClient region AdbClient
func (*AdbClient) Device ¶
func (adb *AdbClient) Device(snNtid SerialNTransportID) AdbDevice
func (*AdbClient) DeviceList ¶
func (*AdbClient) ServerKill ¶
func (adb *AdbClient) ServerKill()
func (*AdbClient) ServerVersion ¶
type AdbConnection ¶
func (AdbConnection) CheckOkay ¶
func (adbConnection AdbConnection) CheckOkay()
func (AdbConnection) Close ¶
func (adbConnection AdbConnection) Close()
func (AdbConnection) Read ¶
func (adbConnection AdbConnection) Read(n int) []byte
func (AdbConnection) ReadString ¶
func (adbConnection AdbConnection) ReadString(n int) string
func (AdbConnection) ReadStringBlock ¶
func (adbConnection AdbConnection) ReadStringBlock() string
func (AdbConnection) ReadUntilClose ¶
func (adbConnection AdbConnection) ReadUntilClose() string
func (AdbConnection) SendCommand ¶
func (adbConnection AdbConnection) SendCommand(cmd string)
func (AdbConnection) SetTimeout ¶
func (adbConnection AdbConnection) SetTimeout(timeOut time.Duration) error
type AdbDevice ¶
type AdbDevice struct {
ShellMixin
}
func (AdbDevice) CreateConnection ¶
func (AdbDevice) ForWard ¶
func (adbDevice AdbDevice) ForWard(local, remote string, noRebind bool) *AdbConnection
func (AdbDevice) ForWardPort ¶
func (AdbDevice) ForwardList ¶
func (adbDevice AdbDevice) ForwardList() []ForwardItem
func (AdbDevice) GetDevPath ¶
func (AdbDevice) GetFeatures ¶
func (AdbDevice) GetSerialNo ¶
func (AdbDevice) ShellOutPut ¶
func (AdbDevice) StartTCPIP ¶
type AdbDeviceInfo ¶
type DeviceEvent ¶
type ForwardItem ¶
type ReverseItem ¶
type RunningAppInfo ¶
type SerialNTransportID ¶
type ShellMixin ¶
type ShellMixin struct { Client *AdbClient Serial string TransportID int Properties map[string]string }
func (ShellMixin) AppClear ¶
func (mixin ShellMixin) AppClear(packageName string)
func (ShellMixin) AppStart ¶
func (mixin ShellMixin) AppStart(packageName, activity string)
func (ShellMixin) AppStop ¶
func (mixin ShellMixin) AppStop(packageName string)
func (ShellMixin) CLick ¶
func (mixin ShellMixin) CLick(x, y int)
func (ShellMixin) CurrentApp ¶
func (mixin ShellMixin) CurrentApp() string
func (ShellMixin) DumpHierarchy ¶
func (mixin ShellMixin) DumpHierarchy() string
func (ShellMixin) GetProp ¶
func (mixin ShellMixin) GetProp(prop string) string
func (ShellMixin) InstallRemote ¶
func (mixin ShellMixin) InstallRemote(remotePath string, clean bool)
func (ShellMixin) IsScreenOn ¶
func (mixin ShellMixin) IsScreenOn() bool
func (ShellMixin) KeyEvent ¶
func (mixin ShellMixin) KeyEvent(keyCode string) string
func (ShellMixin) ListPackages ¶
func (mixin ShellMixin) ListPackages() []string
func (ShellMixin) OpenBrowser ¶
func (mixin ShellMixin) OpenBrowser(url string)
func (ShellMixin) PackageInfo ¶
func (mixin ShellMixin) PackageInfo(packageName string)
func (ShellMixin) Remove ¶
func (mixin ShellMixin) Remove(path string)
func (ShellMixin) Rotation ¶
func (mixin ShellMixin) Rotation()
func (ShellMixin) SayHello ¶
func (mixin ShellMixin) SayHello() string
func (ShellMixin) SendKeys ¶
func (mixin ShellMixin) SendKeys(text string)
func (ShellMixin) SwitchAirPlane ¶
func (mixin ShellMixin) SwitchAirPlane(status bool)
func (ShellMixin) SwitchScreen ¶
func (mixin ShellMixin) SwitchScreen(status bool)
func (ShellMixin) SwitchWifi ¶
func (mixin ShellMixin) SwitchWifi(status bool)
func (ShellMixin) Uninstall ¶
func (mixin ShellMixin) Uninstall(packageName string)
func (ShellMixin) WindowSize ¶
func (mixin ShellMixin) WindowSize()
func (ShellMixin) WlanIp ¶
func (mixin ShellMixin) WlanIp() string
type ShellReturn ¶
type WindowSize ¶
Click to show internal directories.
Click to hide internal directories.