connection

package
v1.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RebootTimeout = time.Duration(30) * time.Second

Functions

This section is empty.

Types

type Connection

type Connection struct {
	ADBPath string
	Verbose bool
}

func NewConnection

func NewConnection(verbose bool) *Connection

func (Connection) BugReport

func (c Connection) BugReport(addr string, dst string) (process.OutputResult, error)

func (Connection) Connect

func (c Connection) Connect(addr string, timeout time.Duration) (process.OutputResult, error)

Connect try to connect to the device with the given address

func (Connection) Disconnect

func (c Connection) Disconnect(addr string) (process.OutputResult, error)

Disconnect disconnect the given device

func (Connection) DisconnectAll

func (c Connection) DisconnectAll() (process.OutputResult, error)

DisconnectAll disconnect from any connected devices

func (Connection) GetState

func (c Connection) GetState(addr string) (process.OutputResult, error)

GetState gets the connection state with the given device address

func (Connection) Install

func (c Connection) Install(addr string, src string, args ...string) (process.OutputResult, error)

func (Connection) IsRoot

func (c Connection) IsRoot(addr string) (bool, error)

func (Connection) ListDevices

func (c Connection) ListDevices() ([]*types.Device, error)

func (Connection) Mount

func (c Connection) Mount(addr string, dir string) (process.OutputResult, error)

func (Connection) NewAdbCommand added in v1.0.29

func (c Connection) NewAdbCommand() *process.ADBCommand

func (Connection) Pull

func (c Connection) Pull(addr string, src string, dst string) (process.OutputResult, error)

func (Connection) Push

func (c Connection) Push(addr string, src string, dst string) (process.OutputResult, error)

func (Connection) Reboot

func (c Connection) Reboot(addr string) (process.OutputResult, error)

func (Connection) Reconnect

func (c Connection) Reconnect(t types.ReconnectType, timeout time.Duration) (process.OutputResult, error)

Reconnect try to reconnect to the given device address

func (Connection) Remount

func (c Connection) Remount(addr string) (process.OutputResult, error)

func (Connection) Root

func (c Connection) Root(addr string) (process.OutputResult, error)

func (Connection) UnRoot

func (c Connection) UnRoot(addr string) (process.OutputResult, error)

func (Connection) Uninstall

func (c Connection) Uninstall(addr string, packageName string, args ...string) (process.OutputResult, error)

func (Connection) Unmount

func (c Connection) Unmount(addr string, dir string) (process.OutputResult, error)

func (Connection) Version

func (c Connection) Version() (string, error)

Version returns the adb version

func (Connection) WaitForDevice

func (c Connection) WaitForDevice(addr string, timeout time.Duration) (process.OutputResult, error)

WaitForDevice returns when the device is ready

func (Connection) Which

func (c Connection) Which(addr string, command string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL