Categorygithub.com/ned-lambdatest/mobile-device-adb
modulepackage
0.0.0-20220829111145-dbfc2c05ccb3
Repository: https://github.com/ned-lambdatest/mobile-device-adb.git
Documentation: pkg.go.dev

# README

#goadb

Build Status GoDoc

A Golang library for interacting with the Android Debug Bridge (adb).

See demo.go for usage.

Usage

go run cmd/adb/main.go

usage: main [<flags>] <command> [<args> ...]

Flags:
      --help           Show context-sensitive help (also try --help-long and --help-man).
  -s, --serial=SERIAL  Connect to device by serial number.

Commands:
  help [<command>...]
    Show help.

  shell [<command>...]
    Run a shell command on the device.

  devices [<flags>]
    List devices.

  pull [<flags>] <remote> [<local>]
    Pull a file from the device.

  push [<flags>] <local> <remote>
    Push a file to the device.

Get List of devices

go run cmd/adb/main.go devices

Output:
ABCDEFGH

Watch for the device list

go run cmd/adb/main.go devices --watch

Output:
{Serial:ABCDEFGH OldState:StateDisconnected NewState:StateOnline}
{Serial:ABCDEFGH OldState:StateOnline NewState:StateOffline}
{Serial:ABCDEFGH OldState:StateOffline NewState:StateDisconnected}
{Serial:ABCDEFGH OldState:StateDisconnected NewState:StateOffline}
{Serial:ABCDEFGH OldState:StateOffline NewState:StateAuthorizing}
{Serial:ABCDEFGH OldState:StateAuthorizing NewState:StateOffline}
{Serial:ABCDEFGH OldState:StateOffline NewState:StateOnline}

# Packages

No description provided by the author
No description provided by the author
Package wire implements the low-level part of the client/server wire protocol.

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
New creates a new Adb client that uses the default ServerConfig.
No description provided by the author

# Constants

No description provided by the author
Default port the adb server listens on.
host:transport-any and host:<request>.
host:transport-local and host-local:<request>.
host:transport:<serial> and host-serial:<serial>:<request>.
host:transport-usb and host-usb:<request>.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

MtimeOfClose should be passed to OpenWrite to set the file modification time to the time the Close method is called.

# Structs

Adb communicates with host services on the adb server.
Device communicates with a specific Android device.
No description provided by the author
No description provided by the author
DeviceStateChangedEvent represents a device state transition.
DeviceWatcher publishes device status change events.
DirEntries iterates over directory entries.
DirEntry holds information about a directory entry on a device.
No description provided by the author

# Interfaces

Dialer knows how to create connections to an adb server.

# Type aliases

DeviceState represents one of the 3 possible states adb will report devices.