Documentation
¶
Index ¶
- Constants
- Variables
- func SetDebug(debug bool)
- type Client
- func (c Client) Connect(ip string, port ...int) (err error)
- func (c Client) DeviceList() (devices []Device, err error)
- func (c Client) DeviceSerialList() (serials []string, err error)
- func (c Client) Disconnect(ip string, port ...int) (err error)
- func (c Client) DisconnectAll() (err error)
- func (c Client) ForwardKillAll() (err error)
- func (c Client) ForwardList() (deviceForward []DeviceForward, err error)
- func (c Client) KillServer() (err error)
- func (c Client) ServerVersion() (version int, err error)
- type Device
- func (d Device) DeviceInfo() map[string]string
- func (d Device) DevicePath() (string, error)
- func (d Device) EnableAdbOverTCP(port ...int) (err error)
- func (d Device) Forward(localPort, remotePort int, noRebind ...bool) (err error)
- func (d Device) ForwardKill(localPort int) (err error)
- func (d Device) ForwardList() (deviceForwardList []DeviceForward, err error)
- func (d Device) IsUsb() bool
- func (d Device) List(remotePath string) (devFileInfos []DeviceFileInfo, err error)
- func (d Device) Model() string
- func (d Device) Product() string
- func (d Device) Pull(remotePath string, dest io.Writer) (err error)
- func (d Device) Push(source io.Reader, remotePath string, modification time.Time, ...) (err error)
- func (d Device) PushFile(local *os.File, remotePath string, modification ...time.Time) (err error)
- func (d Device) RunShellCommand(cmd string, args ...string) (string, error)
- func (d Device) RunShellCommandWithBytes(cmd string, args ...string) ([]byte, error)
- func (d Device) Serial() string
- func (d Device) State() (DeviceState, error)
- func (d Device) Usb() string
- type DeviceFileInfo
- type DeviceForward
- type DeviceState
Constants ¶
View Source
const AdbDaemonPort = 5555
View Source
const AdbServerPort = 5037
View Source
const DefaultFileMode = os.FileMode(0664)
Variables ¶
View Source
var DefaultAdbReadTimeout time.Duration = 60
View Source
var ErrConnBroken = errors.New("socket connection broken")
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) DeviceList ¶
func (Client) DeviceSerialList ¶
func (Client) DisconnectAll ¶
func (Client) ForwardKillAll ¶
func (Client) ForwardList ¶
func (c Client) ForwardList() (deviceForward []DeviceForward, err error)
func (Client) KillServer ¶
func (Client) ServerVersion ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func (Device) DeviceInfo ¶
func (Device) DevicePath ¶
func (Device) EnableAdbOverTCP ¶
func (Device) ForwardKill ¶
func (Device) ForwardList ¶
func (d Device) ForwardList() (deviceForwardList []DeviceForward, err error)
func (Device) List ¶
func (d Device) List(remotePath string) (devFileInfos []DeviceFileInfo, err error)
func (Device) RunShellCommand ¶
func (Device) RunShellCommandWithBytes ¶
func (Device) State ¶
func (d Device) State() (DeviceState, error)
type DeviceFileInfo ¶
func (DeviceFileInfo) IsDir ¶
func (info DeviceFileInfo) IsDir() bool
type DeviceForward ¶
type DeviceState ¶
type DeviceState string
const ( StateUnknown DeviceState = "UNKNOWN" StateOnline DeviceState = "online" StateOffline DeviceState = "offline" StateDisconnected DeviceState = "disconnected" )
Click to show internal directories.
Click to hide internal directories.