debug

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIAdbManagerAllowDebugging             = binder.FirstCallTransaction + 0
	TransactionIAdbManagerDenyDebugging              = binder.FirstCallTransaction + 1
	TransactionIAdbManagerClearDebuggingKeys         = binder.FirstCallTransaction + 2
	TransactionIAdbManagerAllowWirelessDebugging     = binder.FirstCallTransaction + 3
	TransactionIAdbManagerDenyWirelessDebugging      = binder.FirstCallTransaction + 4
	TransactionIAdbManagerGetPairedDevices           = binder.FirstCallTransaction + 5
	TransactionIAdbManagerUnpairDevice               = binder.FirstCallTransaction + 6
	TransactionIAdbManagerEnablePairingByPairingCode = binder.FirstCallTransaction + 7
	TransactionIAdbManagerEnablePairingByQrCode      = binder.FirstCallTransaction + 8
	TransactionIAdbManagerGetAdbWirelessPort         = binder.FirstCallTransaction + 9
	TransactionIAdbManagerDisablePairing             = binder.FirstCallTransaction + 10
	TransactionIAdbManagerIsAdbWifiSupported         = binder.FirstCallTransaction + 11
	TransactionIAdbManagerIsAdbWifiQrSupported       = binder.FirstCallTransaction + 12
	TransactionIAdbManagerRegisterCallback           = binder.FirstCallTransaction + 13
	TransactionIAdbManagerUnregisterCallback         = binder.FirstCallTransaction + 14
)
View Source
const (
	MethodIAdbManagerAllowDebugging             = "allowDebugging"
	MethodIAdbManagerDenyDebugging              = "denyDebugging"
	MethodIAdbManagerClearDebuggingKeys         = "clearDebuggingKeys"
	MethodIAdbManagerAllowWirelessDebugging     = "allowWirelessDebugging"
	MethodIAdbManagerDenyWirelessDebugging      = "denyWirelessDebugging"
	MethodIAdbManagerGetPairedDevices           = "getPairedDevices"
	MethodIAdbManagerUnpairDevice               = "unpairDevice"
	MethodIAdbManagerEnablePairingByPairingCode = "enablePairingByPairingCode"
	MethodIAdbManagerEnablePairingByQrCode      = "enablePairingByQrCode"
	MethodIAdbManagerGetAdbWirelessPort         = "getAdbWirelessPort"
	MethodIAdbManagerDisablePairing             = "disablePairing"
	MethodIAdbManagerIsAdbWifiSupported         = "isAdbWifiSupported"
	MethodIAdbManagerIsAdbWifiQrSupported       = "isAdbWifiQrSupported"
	MethodIAdbManagerRegisterCallback           = "registerCallback"
	MethodIAdbManagerUnregisterCallback         = "unregisterCallback"
)
View Source
const DescriptorIAdbCallback = "android.debug.IAdbCallback"
View Source
const DescriptorIAdbManager = "android.debug.IAdbManager"
View Source
const DescriptorIAdbTransport = "android.debug.IAdbTransport"
View Source
const (
	MethodIAdbCallbackOnDebuggingChanged = "onDebuggingChanged"
)
View Source
const (
	MethodIAdbTransportOnAdbEnabled = "onAdbEnabled"
)
View Source
const (
	TransactionIAdbCallbackOnDebuggingChanged = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionIAdbTransportOnAdbEnabled = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdbCallbackProxy

type AdbCallbackProxy struct {
	Remote binder.IBinder
}

func NewAdbCallbackProxy

func NewAdbCallbackProxy(
	remote binder.IBinder,
) *AdbCallbackProxy

func (*AdbCallbackProxy) AsBinder

func (p *AdbCallbackProxy) AsBinder() binder.IBinder

func (*AdbCallbackProxy) OnDebuggingChanged

func (p *AdbCallbackProxy) OnDebuggingChanged(
	ctx context.Context,
	enabled bool,
	type_ AdbTransportType,
) error

type AdbCallbackStub

type AdbCallbackStub struct {
	Impl      IAdbCallback
	Transport binder.VersionAwareTransport
}

AdbCallbackStub dispatches incoming binder transactions to a typed IAdbCallback implementation.

func (*AdbCallbackStub) Descriptor

func (s *AdbCallbackStub) Descriptor() string

func (*AdbCallbackStub) OnTransaction

func (s *AdbCallbackStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type AdbManagerProxy

type AdbManagerProxy struct {
	Remote binder.IBinder
}

func GetAdbManager

func GetAdbManager(
	ctx context.Context,
	sm *servicemanager.ServiceManager,
) (*AdbManagerProxy, error)

GetAdbManager retrieves the AdbService service and returns a typed proxy.

func NewAdbManagerProxy

func NewAdbManagerProxy(
	remote binder.IBinder,
) *AdbManagerProxy

func (*AdbManagerProxy) AllowDebugging

func (p *AdbManagerProxy) AllowDebugging(
	ctx context.Context,
	alwaysAllow bool,
	publicKey string,
) error

func (*AdbManagerProxy) AllowWirelessDebugging

func (p *AdbManagerProxy) AllowWirelessDebugging(
	ctx context.Context,
	alwaysAllow bool,
	bssid string,
) error

func (*AdbManagerProxy) AsBinder

func (p *AdbManagerProxy) AsBinder() binder.IBinder

func (*AdbManagerProxy) ClearDebuggingKeys

func (p *AdbManagerProxy) ClearDebuggingKeys(
	ctx context.Context,
) error

func (*AdbManagerProxy) DenyDebugging

func (p *AdbManagerProxy) DenyDebugging(
	ctx context.Context,
) error

func (*AdbManagerProxy) DenyWirelessDebugging

func (p *AdbManagerProxy) DenyWirelessDebugging(
	ctx context.Context,
) error

func (*AdbManagerProxy) DisablePairing

func (p *AdbManagerProxy) DisablePairing(
	ctx context.Context,
) error

func (*AdbManagerProxy) EnablePairingByPairingCode

func (p *AdbManagerProxy) EnablePairingByPairingCode(
	ctx context.Context,
) error

func (*AdbManagerProxy) EnablePairingByQrCode

func (p *AdbManagerProxy) EnablePairingByQrCode(
	ctx context.Context,
	serviceName string,
	password string,
) error

func (*AdbManagerProxy) GetAdbWirelessPort

func (p *AdbManagerProxy) GetAdbWirelessPort(
	ctx context.Context,
) (int32, error)

func (*AdbManagerProxy) GetPairedDevices

func (p *AdbManagerProxy) GetPairedDevices(
	ctx context.Context,
) ([]FingerprintAndPairDevice, error)

func (*AdbManagerProxy) IsAdbWifiQrSupported

func (p *AdbManagerProxy) IsAdbWifiQrSupported(
	ctx context.Context,
) (bool, error)

func (*AdbManagerProxy) IsAdbWifiSupported

func (p *AdbManagerProxy) IsAdbWifiSupported(
	ctx context.Context,
) (bool, error)

func (*AdbManagerProxy) RegisterCallback

func (p *AdbManagerProxy) RegisterCallback(
	ctx context.Context,
	callback IAdbCallback,
) error

func (*AdbManagerProxy) UnpairDevice

func (p *AdbManagerProxy) UnpairDevice(
	ctx context.Context,
	fingerprint string,
) error

func (*AdbManagerProxy) UnregisterCallback

func (p *AdbManagerProxy) UnregisterCallback(
	ctx context.Context,
	callback IAdbCallback,
) error

type AdbManagerStub

type AdbManagerStub struct {
	Impl      IAdbManager
	Transport binder.VersionAwareTransport
}

AdbManagerStub dispatches incoming binder transactions to a typed IAdbManager implementation.

func (*AdbManagerStub) Descriptor

func (s *AdbManagerStub) Descriptor() string

func (*AdbManagerStub) OnTransaction

func (s *AdbManagerStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type AdbTransportProxy

type AdbTransportProxy struct {
	Remote binder.IBinder
}

func NewAdbTransportProxy

func NewAdbTransportProxy(
	remote binder.IBinder,
) *AdbTransportProxy

func (*AdbTransportProxy) AsBinder

func (p *AdbTransportProxy) AsBinder() binder.IBinder

func (*AdbTransportProxy) OnAdbEnabled

func (p *AdbTransportProxy) OnAdbEnabled(
	ctx context.Context,
	enabled bool,
	type_ AdbTransportType,
) error

type AdbTransportStub

type AdbTransportStub struct {
	Impl      IAdbTransport
	Transport binder.VersionAwareTransport
}

AdbTransportStub dispatches incoming binder transactions to a typed IAdbTransport implementation.

func (*AdbTransportStub) Descriptor

func (s *AdbTransportStub) Descriptor() string

func (*AdbTransportStub) OnTransaction

func (s *AdbTransportStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type AdbTransportType

type AdbTransportType byte
const (
	AdbTransportTypeUSB  AdbTransportType = 0
	AdbTransportTypeWIFI AdbTransportType = 1
)

type FingerprintAndPairDevice

type FingerprintAndPairDevice struct {
	KeyFingerprint string
	Device         PairDevice
}

func (*FingerprintAndPairDevice) MarshalParcel

func (s *FingerprintAndPairDevice) MarshalParcel(
	p *parcel.Parcel,
) error

func (*FingerprintAndPairDevice) UnmarshalParcel

func (s *FingerprintAndPairDevice) UnmarshalParcel(
	p *parcel.Parcel,
) error

type IAdbCallback

type IAdbCallback interface {
	AsBinder() binder.IBinder
	OnDebuggingChanged(ctx context.Context, enabled bool, type_ AdbTransportType) error
}

func NewAdbCallbackStub

func NewAdbCallbackStub(
	impl IAdbCallbackServer,
) IAdbCallback

NewAdbCallbackStub creates a server-side IAdbCallback wrapping the given server implementation. The returned value satisfies IAdbCallback and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IAdbCallbackServer

type IAdbCallbackServer interface {
	OnDebuggingChanged(ctx context.Context, enabled bool, type_ AdbTransportType) error
}

IAdbCallbackServer is the server-side interface that user implementations provide to NewAdbCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IAdbManager

type IAdbManager interface {
	AsBinder() binder.IBinder
	AllowDebugging(ctx context.Context, alwaysAllow bool, publicKey string) error
	DenyDebugging(ctx context.Context) error
	ClearDebuggingKeys(ctx context.Context) error
	AllowWirelessDebugging(ctx context.Context, alwaysAllow bool, bssid string) error
	DenyWirelessDebugging(ctx context.Context) error
	GetPairedDevices(ctx context.Context) ([]FingerprintAndPairDevice, error)
	UnpairDevice(ctx context.Context, fingerprint string) error
	EnablePairingByPairingCode(ctx context.Context) error
	EnablePairingByQrCode(ctx context.Context, serviceName string, password string) error
	GetAdbWirelessPort(ctx context.Context) (int32, error)
	DisablePairing(ctx context.Context) error
	IsAdbWifiSupported(ctx context.Context) (bool, error)
	IsAdbWifiQrSupported(ctx context.Context) (bool, error)
	RegisterCallback(ctx context.Context, callback IAdbCallback) error
	UnregisterCallback(ctx context.Context, callback IAdbCallback) error
}

func NewAdbManagerStub

func NewAdbManagerStub(
	impl IAdbManagerServer,
) IAdbManager

NewAdbManagerStub creates a server-side IAdbManager wrapping the given server implementation. The returned value satisfies IAdbManager and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IAdbManagerServer

type IAdbManagerServer interface {
	AllowDebugging(ctx context.Context, alwaysAllow bool, publicKey string) error
	DenyDebugging(ctx context.Context) error
	ClearDebuggingKeys(ctx context.Context) error
	AllowWirelessDebugging(ctx context.Context, alwaysAllow bool, bssid string) error
	DenyWirelessDebugging(ctx context.Context) error
	GetPairedDevices(ctx context.Context) ([]FingerprintAndPairDevice, error)
	UnpairDevice(ctx context.Context, fingerprint string) error
	EnablePairingByPairingCode(ctx context.Context) error
	EnablePairingByQrCode(ctx context.Context, serviceName string, password string) error
	GetAdbWirelessPort(ctx context.Context) (int32, error)
	DisablePairing(ctx context.Context) error
	IsAdbWifiSupported(ctx context.Context) (bool, error)
	IsAdbWifiQrSupported(ctx context.Context) (bool, error)
	RegisterCallback(ctx context.Context, callback IAdbCallback) error
	UnregisterCallback(ctx context.Context, callback IAdbCallback) error
}

IAdbManagerServer is the server-side interface that user implementations provide to NewAdbManagerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IAdbTransport

type IAdbTransport interface {
	AsBinder() binder.IBinder
	OnAdbEnabled(ctx context.Context, enabled bool, type_ AdbTransportType) error
}

func NewAdbTransportStub

func NewAdbTransportStub(
	impl IAdbTransportServer,
) IAdbTransport

NewAdbTransportStub creates a server-side IAdbTransport wrapping the given server implementation. The returned value satisfies IAdbTransport and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IAdbTransportServer

type IAdbTransportServer interface {
	OnAdbEnabled(ctx context.Context, enabled bool, type_ AdbTransportType) error
}

IAdbTransportServer is the server-side interface that user implementations provide to NewAdbTransportStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type PairDevice

type PairDevice struct {
	Name      string
	Guid      string
	Connected bool
}

func (*PairDevice) MarshalParcel

func (s *PairDevice) MarshalParcel(
	p *parcel.Parcel,
) error

func (*PairDevice) UnmarshalParcel

func (s *PairDevice) UnmarshalParcel(
	p *parcel.Parcel,
) error

Jump to

Keyboard shortcuts

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