Versions in this module Expand all Collapse all v1 v1.0.0 May 6, 2024 Changes in this version + const AdbError + const AdbExecutableName + const AdbPort + const AssertionError + const ConnectionResetError + const DeviceAny + const DeviceLocal + const DeviceNotFound + const DeviceSerial + const DeviceUsb + const FileNoExistError + const NetworkError + const ParseError + const ServerNotAvailable + var MtimeOfClose = time.Time + func ErrorWithCauseChain(err error) string + func HasErrCode(err error, code ErrCode) bool + type Adb struct + func New() (*Adb, error) + func NewWithConfig(config ServerConfig) (*Adb, error) + func (c *Adb) Connect(host string, port int) error + func (c *Adb) Device(descriptor DeviceDescriptor) *Device + func (c *Adb) Dial() (*wire.Conn, error) + func (c *Adb) KillServer() error + func (c *Adb) ListDeviceSerials() ([]string, error) + func (c *Adb) ListDevices() ([]*DeviceInfo, error) + func (c *Adb) NewDeviceWatcher() *DeviceWatcher + func (c *Adb) ServerVersion() (int, error) + func (c *Adb) StartServer() error + type Device struct + func (c *Device) DeviceInfo() (*DeviceInfo, error) + func (c *Device) DevicePath() (string, error) + func (c *Device) ListDirEntries(path string) (*DirEntries, error) + func (c *Device) OpenRead(path string) (io.ReadCloser, error) + func (c *Device) OpenWrite(path string, perms os.FileMode, mtime time.Time) (io.WriteCloser, error) + func (c *Device) Remount() (string, error) + func (c *Device) RunCommand(cmd string, args ...string) (string, error) + func (c *Device) Serial() (string, error) + func (c *Device) Stat(path string) (*DirEntry, error) + func (c *Device) State() (DeviceState, error) + func (c *Device) String() string + type DeviceDescriptor struct + func AnyDevice() DeviceDescriptor + func AnyLocalDevice() DeviceDescriptor + func AnyUsbDevice() DeviceDescriptor + func DeviceWithSerial(serial string) DeviceDescriptor + func (d DeviceDescriptor) String() string + type DeviceInfo struct + DeviceInfo string + Model string + Product string + Serial string + Usb string + func (d *DeviceInfo) IsUsb() bool + type DeviceState int8 + const StateDisconnected + const StateInvalid + const StateOffline + const StateOnline + const StateUnauthorized + func (i DeviceState) String() string + type DeviceStateChangedEvent struct + NewState DeviceState + OldState DeviceState + Serial string + func (s DeviceStateChangedEvent) CameOnline() bool + func (s DeviceStateChangedEvent) WentOffline() bool + type DeviceWatcher struct + func (w *DeviceWatcher) C() <-chan DeviceStateChangedEvent + func (w *DeviceWatcher) Err() error + func (w *DeviceWatcher) Shutdown() + type Dialer interface + Dial func(address string) (*wire.Conn, error) + type DirEntries struct + func (entries *DirEntries) Close() error + func (entries *DirEntries) Entry() *DirEntry + func (entries *DirEntries) Err() error + func (entries *DirEntries) Next() bool + func (entries *DirEntries) ReadAll() (result []*DirEntry, err error) + type DirEntry struct + Mode os.FileMode + ModifiedAt time.Time + Name string + Size int32 + type ErrCode errors.ErrCode + type ServerConfig struct + Host string + PathToAdb string + Port int