Documentation ¶
Overview ¶
Package adb is a simple wrapper around calling adb.
Index ¶
- type Adb
- type AdbImpl
- func (a AdbImpl) EnsureOnline(ctx context.Context) error
- func (a AdbImpl) RawDumpSys(ctx context.Context, service string) (string, error)
- func (a AdbImpl) RawProperties(ctx context.Context) (string, error)
- func (a AdbImpl) Reboot(ctx context.Context) error
- func (a AdbImpl) Uptime(ctx context.Context) (time.Duration, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adb ¶
type Adb interface { // EnsureOnline returns nil if the Android device is online and ready to // run, otherwise it will try to bring it back online and if that fails will // return an error. EnsureOnline(ctx context.Context) error // RawProperties returns the unfiltered output of running "adb shell getprop". RawProperties(ctx context.Context) (string, error) // RawDumpSys returns the unfiltered output of running "adb shell dumpsys <service>". RawDumpSys(ctx context.Context, service string) (string, error) // Reboot the device. Reboot(ctx context.Context) error // Uptime returns how long the device has been awake since its last reboot. Uptime(ctx context.Context) (time.Duration, error) }
Adb is the interface that AdbImpl provides.
type AdbImpl ¶
type AdbImpl struct{}
AdbImpl handles talking to the adb process.
func (AdbImpl) EnsureOnline ¶
EnsureOnline implements the Adb interface.
func (AdbImpl) RawDumpSys ¶
RawDumpSys implements the Adb interface.
func (AdbImpl) RawProperties ¶
RawProperties implements the Adb interface.
Click to show internal directories.
Click to hide internal directories.