Skip to content
/ goadb Public
forked from ltpquang/goadb

A Golang library for interacting with adb.

License

Notifications You must be signed in to change notification settings

Alpa-1/goadb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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}

About

A Golang library for interacting with adb.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.8%
  • Makefile 0.2%