adbnet

package
v0.0.0-...-b520893 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package adbnet implements helpers for making connections throughand listening on the target device.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(server adb.Dialer, network, address string) (net.Conn, error)

Dial calls Dialer.Dial.

func Service

func Service(network, address string) (string, error)

Service returns the ADB service to use for the specified network and address.

Types

type Dialer

type Dialer struct {
	// Server is the device to connect through. It must not be nil.
	Server adb.Dialer
}

Dialer is like net.Dialer.

It currently supports the networks "tcp" and "unix". It also supports "tcp4" and "tcp6", but not if a hostname is used.

Note that adbd has a tendency to hang if a unix socket misbehaves, requiring a reboot, so I recommend against using them unless you must (it'd be better to start a process which proxies to it). See b/418203510.

func (*Dialer) Dial

func (d *Dialer) Dial(network, address string) (net.Conn, error)

Dial is like net.Dialer.Dial.

func (*Dialer) DialContext

func (d *Dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error)

Dial is like net.Dialer.DialContext.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL