adb

package
v0.0.0-...-f4b31ea Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package adb contains methods to work with an ADB-base container.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServiceClient

func ServiceClient(ctx context.Context, ctrInfo ctr.ServiceInfo, dut *tlw.Dut) (api.ADBServiceClient, error)

ServiceClient creates service client to the service running on CFT container.

Types

type ADBResponse

type ADBResponse interface {
	GetStdout() []byte
	GetStderr() []byte
	GetExitCode() int32
}

ADBResponse base interface describe ADB response.

func ExecCommand

func ExecCommand(ctx context.Context, adbClient api.ADBServiceClient, timeout time.Duration, command string, args ...string) (ADBResponse, error)

ExecCommand execs command by base-adb service and provide error if adb command failed.

func RunCommand

func RunCommand(ctx context.Context, adbClient api.ADBServiceClient, timeout time.Duration, command string, args ...string) (ADBResponse, error)

RunCommand runs raw command by base-adb service and return result.

Error is provided only if service fail to execute command or timeout. Command execution always represented as exec-code in response.

Jump to

Keyboard shortcuts

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