adbclient

package
v0.0.0-...-7a729f8 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ADB_FORWARD_TCP = "TCP"
	ADB_FORWARD_UDS = "uds"
)

Variables

This section is empty.

Functions

func HTTPRequest

func HTTPRequest(path2adb, uri, deviceId string, options ...Option) (body []byte, err error)

通过adb 发送 http请求(指定端口)

Types

type Option

type Option func(*Options)

func WithAdbSrvPort

func WithAdbSrvPort(value int) Option

func WithHTTPMethod

func WithHTTPMethod(value string) Option

func WithPostData

func WithPostData(value []byte) Option

func WithProtocol

func WithProtocol(value string) Option

func WithSaveFilePath

func WithSaveFilePath(value string) Option

func WithServicePort

func WithServicePort(value int) Option

func WithUDSPath

func WithUDSPath(value string) Option

type Options

type Options struct {
	Adbsrvport   int    // adbsrvport adb server 的端口号 [5037]
	ServicePort  int    // servicePort 设备侧监听端口号 [9008]
	Method       string // method 请求方法
	SaveFilePath string // 针对文件下载方法有效,保存文件到本地路径
	PostData     []byte // 请求消息体
	Protocol     string // TCP OR UDS
	UDSPath      string // UDS local file system path
}

Jump to

Keyboard shortcuts

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