Documentation
¶
Index ¶
- func WaitAndReturnOutput(result *process.OutputResult, err error, timeout time.Duration) (process.OutputResult, error)
- type Client
- func (c Client) BugReport(dst string) (process.OutputResult, error)
- func (c Client) ClearLogcat() error
- func (c Client) Connect(timeout time.Duration) (process.OutputResult, error)
- func (c Client) DeferredDispatch(eventType events.EventType)
- func (c Client) DisableVerity() error
- func (c Client) Disconnect() (process.OutputResult, error)
- func (c Client) DisconnectAll() (process.OutputResult, error)
- func (c Client) Dispatch(eventType events.EventType, data interface{})
- func (c Client) EnableVerity() error
- func (c Client) GetIsConnected() bool
- func (c Client) GetIsRoot() bool
- func (c Client) GetMemInfo() (map[string]int, error)
- func (c Client) Install(src string, options *InstallOptions) (process.OutputResult, error)
- func (c Client) IsConnected() (bool, error)
- func (c Client) IsRoot() (bool, error)
- func (c Client) ListDevices() ([]*types.Device, error)
- func (c Client) Logcat(options types.LogcatOptions) (process.OutputResult, error)
- func (c Client) LogcatPipe(options types.LogcatOptions) (*processbuilder.Processbuilder, error)
- func (c Client) Mount(dir string) (process.OutputResult, error)
- func (c Client) MustRoot() bool
- func (c Client) NewAdbCommand() *process.ADBCommand
- func (c Client) Pull(src string, dst string) (process.OutputResult, error)
- func (c Client) Push(src string, dst string) (process.OutputResult, error)
- func (c Client) Reboot() (process.OutputResult, error)
- func (c Client) Reconnect(t types.ReconnectType, timeout time.Duration) (process.OutputResult, error)
- func (c Client) Remount() (process.OutputResult, error)
- func (c Client) Root() error
- func (c Client) UnRoot() error
- func (c Client) Uninstall(packageName string) (process.OutputResult, error)
- func (c Client) Unmount(dir string) (process.OutputResult, error)
- func (c Client) WaitForDevice(timeout time.Duration) (process.OutputResult, error)
- type Device
- func (d Device) ActivityManager() *activitymanager.ActivityManager
- func (d Device) ApiLevel() *string
- func (d Device) IsScreenOn() (bool, error)
- func (d Device) Name() *string
- func (d Device) PackageManager() *packagemanager.PackageManager
- func (d Device) Power() (bool, error)
- func (d Device) PowerOff() (bool, error)
- func (d Device) PowerOffOn() (bool, error)
- func (d Device) PowerOn() (bool, error)
- func (d Device) SaveScreenCap(output string) (process.OutputResult, error)
- func (d Device) Version() *string
- func (d Device) WriteScreenCap(output *os.File) (process.OutputResult, error)
- type InstallOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitAndReturnOutput ¶ added in v1.0.29
func WaitAndReturnOutput(result *process.OutputResult, err error, timeout time.Duration) (process.OutputResult, error)
Types ¶
type Client ¶
type Client struct {
Conn *connection.Connection
Mdns *mdns.Mdns
Channel chan rxgo.Item
Address types.Serial
Shell *shell.Shell
}
func NullClient ¶ added in v0.0.2
func (Client) BugReport ¶
func (c Client) BugReport(dst string) (process.OutputResult, error)
BugReport ExecuteWithTimeout and return the result of the command 'adb bugreport' dst: optional target local folder/filename for the bugreport
func (Client) ClearLogcat ¶ added in v1.0.28
func (Client) DeferredDispatch ¶
func (Client) DisableVerity ¶ added in v1.0.44
func (Client) Disconnect ¶
func (c Client) Disconnect() (process.OutputResult, error)
func (Client) DisconnectAll ¶
func (c Client) DisconnectAll() (process.OutputResult, error)
func (Client) EnableVerity ¶ added in v1.0.44
func (Client) GetIsConnected ¶ added in v0.0.5
func (Client) Install ¶
func (c Client) Install(src string, options *InstallOptions) (process.OutputResult, error)
func (Client) IsConnected ¶
func (Client) Logcat ¶ added in v0.0.2
func (c Client) Logcat(options types.LogcatOptions) (process.OutputResult, error)
func (Client) LogcatPipe ¶ added in v1.0.29
func (c Client) LogcatPipe(options types.LogcatOptions) (*processbuilder.Processbuilder, error)
func (Client) NewAdbCommand ¶ added in v1.0.29
func (c Client) NewAdbCommand() *process.ADBCommand
func (Client) Pull ¶
Pull a file from the device. src is the file to be pulled from the device. dst is the destination filepath on the host.
func (Client) Push ¶
Push a file to the connected device. src is the host file to be pushed. dst is the target device where the file should be pushed to.
func (Client) Reconnect ¶
func (c Client) Reconnect(t types.ReconnectType, timeout time.Duration) (process.OutputResult, error)
func (Client) Uninstall ¶
func (c Client) Uninstall(packageName string) (process.OutputResult, error)
func (Client) WaitForDevice ¶
type Device ¶
type Device struct {
Client *Client
}
func (Device) ActivityManager ¶
func (d Device) ActivityManager() *activitymanager.ActivityManager
func (Device) IsScreenOn ¶
IsScreenOn Return true if the device screen is on
func (Device) PackageManager ¶
func (d Device) PackageManager() *packagemanager.PackageManager
func (Device) PowerOff ¶
PowerOff Power off the device (turn the screen off). If the screen is already off it returns false, true otherwise
func (Device) PowerOffOn ¶ added in v1.0.26
PowerOffOn send the power button input key
func (Device) PowerOn ¶
PowerOn Power on the device (turn the screen off). If the screen is already on it returns false, true otherwise
func (Device) SaveScreenCap ¶
func (d Device) SaveScreenCap(output string) (process.OutputResult, error)