Documentation ¶
Index ¶
- type Adb
- func (adb *Adb) Check() error
- func (adb *Adb) Devices() ([]IDevice, error)
- func (adb *Adb) ExecuteCommand(command ...string) error
- func (adb *Adb) ExecuteCommandWithContext(context context.Context, command ...string) *BufferedOutput
- func (adb *Adb) ExecuteCommandWithReturn(command ...string) (string, error)
- func (adb *Adb) GetVersion() (string, error)
- func (adb *Adb) ReleaseDevice(device *Device)
- func (adb *Adb) Start() error
- func (adb *Adb) Stop() error
- type AdbConfig
- type BufferedOutput
- type Device
- func (device *Device) CatFile(deviceFilePath string) (string, error)
- func (device *Device) CreateDir(remotePath string) error
- func (device *Device) DeleteDir(remotePath string) error
- func (device *Device) DeleteFile(remotePath string) error
- func (device *Device) ForceStop(packageName string) error
- func (device Device) GetCodeName() string
- func (device Device) GetId() string
- func (device Device) GetManufacturer() (string, error)
- func (device Device) GetModel() string
- func (device Device) GetOsVersion() (string, error)
- func (device Device) GetProduct() string
- func (device *Device) Install(packagePath string, overwrite bool) error
- func (device *Device) IsFile(deviceFilePath string) bool
- func (device *Device) IsPackageInstalled(packageName string) bool
- func (device *Device) ListDirectory(directory string) ([]string, error)
- func (device *Device) Logcat(context context.Context) *BufferedOutput
- func (device *Device) LogcatWithFilter(context context.Context, filter string) *BufferedOutput
- func (device *Device) Mount(remotePath string) error
- func (device *Device) Pull(remotePath string, localPath string) error
- func (device *Device) Push(localPath string, remotePath string) error
- func (device *Device) Release()
- func (device *Device) RunActivity(name string, extraParameters ...string) error
- func (device *Device) SetGps(enabled bool) error
- func (device *Device) SetPermission(grant bool, packageName string, permission string) error
- func (device *Device) SetRoot(root bool) error
- func (device *Device) Uninstall(packageName string) error
- func (device *Device) WakeUp() error
- type IDevice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adb ¶
type Adb struct {
// contains filtered or unexported fields
}
func (*Adb) ExecuteCommand ¶
func (*Adb) ExecuteCommandWithContext ¶
func (adb *Adb) ExecuteCommandWithContext(context context.Context, command ...string) *BufferedOutput
func (*Adb) ExecuteCommandWithReturn ¶
func (*Adb) GetVersion ¶
func (*Adb) ReleaseDevice ¶ added in v0.3.0
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func (*Device) DeleteFile ¶ added in v0.2.1
func (Device) GetCodeName ¶ added in v0.4.0
func (Device) GetManufacturer ¶ added in v0.5.0
func (Device) GetOsVersion ¶ added in v0.5.0
func (Device) GetProduct ¶
func (*Device) IsPackageInstalled ¶
func (*Device) ListDirectory ¶
func (*Device) LogcatWithFilter ¶
func (device *Device) LogcatWithFilter(context context.Context, filter string) *BufferedOutput
func (*Device) RunActivity ¶
func (*Device) SetPermission ¶ added in v0.7.0
type IDevice ¶ added in v0.3.0
type IDevice interface { GetId() string GetModel() string GetProduct() string GetCodeName() string GetOsVersion() (string, error) GetManufacturer() (string, error) IsPackageInstalled(packageName string) bool Install(packagePath string, overwrite bool) error Uninstall(packageName string) error ForceStop(packageName string) error RunActivity(name string, extraParameters ...string) error Pull(remotePath string, localPath string) error Push(localPath string, remotePath string) error DeleteFile(remotePath string) error DeleteDir(remotePath string) error CreateDir(remotePath string) error WakeUp() error ListDirectory(directory string) ([]string, error) IsFile(deviceFilePath string) bool Logcat(context context.Context) *BufferedOutput LogcatWithFilter(context context.Context, filter string) *BufferedOutput SetPermission(grant bool, packageName string, permission string) error SetGps(enabled bool) error SetRoot(root bool) error Mount(remotePath string) error Release() }
Click to show internal directories.
Click to hide internal directories.