manager

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdbClient

type AdbClient struct {
	// contains filtered or unexported fields
}

func GetAdbClient

func GetAdbClient() *AdbClient

func (*AdbClient) Connect

func (a *AdbClient) Connect(ip string, port string) (string, error)

Connect adb connect

func (*AdbClient) Forward

func (a *AdbClient) Forward(serial string, devicePort, pcPort string) (bool, error)

Forward adb forward

func (*AdbClient) ForwardList

func (a *AdbClient) ForwardList() string

ForwardList adb forward

func (*AdbClient) GetApkAbi

func (a *AdbClient) GetApkAbi(serial, packageName string) string

GetApkAbi get apk abi

func (*AdbClient) GetApkPath

func (a *AdbClient) GetApkPath(serial, packageName string) (string, error)

GetApkPath get apk installed path (com.r2studio.robotmon)

func (*AdbClient) GetAppProcess

func (a *AdbClient) GetAppProcess(serial string) (bool, bool, bool)

GetAppProcess for robotmon starting service

func (*AdbClient) GetDeviceABI

func (a *AdbClient) GetDeviceABI(serial string) (string, error)

GetDeviceABI get device abi, arm64-v8a, armeabi-v7a or x86

func (*AdbClient) GetDevices

func (a *AdbClient) GetDevices() ([]string, error)

GetDevices adb devices

func (*AdbClient) GetIPAddress

func (a *AdbClient) GetIPAddress(serial string) string

func (*AdbClient) GetPids

func (a *AdbClient) GetPids(serial string, process string) ([]string, error)

GetPids adb shell "ps | grep process" (app_process)

func (*AdbClient) GetRobotmonStartCommand

func (a *AdbClient) GetRobotmonStartCommand(serial string) (string, []string, error)

GetRobotmonStartCommand getRobotmonStartCommand

func (*AdbClient) Init

func (a *AdbClient) Init()

Init init client

func (*AdbClient) Install

func (a *AdbClient) Install(serial, apk string) (string, error)

Install adb install

func (*AdbClient) IsFileExist

func (a *AdbClient) IsFileExist(serial, path string) bool

IsFileExist check is file exist in device

func (*AdbClient) Restart

func (a *AdbClient) Restart()

Restart adb kill-server then adb start-server

func (*AdbClient) Shell

func (a *AdbClient) Shell(serial, command string) (string, error)

Shell adb shell

func (*AdbClient) StartRobotmonService

func (a *AdbClient) StartRobotmonService(serial string) ([]string, error)

func (*AdbClient) StopService

func (a *AdbClient) StopService(serial string) error

func (*AdbClient) TCPIP

func (a *AdbClient) TCPIP(serial, port string) error

TCPIP adb tcpip

func (*AdbClient) Uninstall

func (a *AdbClient) Uninstall(serial, apkID string) (string, error)

Uninstall adb uninstall

type AppService

type AppService struct {
	// contains filtered or unexported fields
}

AppService app service struct

func NewAppService

func NewAppService(adbClient *AdbClient) *AppService

NewAppService new app service

func (*AppService) AdbConnect

func (a *AppService) AdbConnect(ctx context.Context, req *rpc.AdbConnectParams) (*rpc.Message, error)

AdbConnect call adb connect

func (*AppService) AdbForward

func (a *AppService) AdbForward(ctx context.Context, req *rpc.AdbForwardParams) (*rpc.Message, error)

AdbForward call adb shell

func (*AppService) AdbForwardList

func (a *AppService) AdbForwardList(context.Context, *rpc.Empty) (*rpc.Message, error)

AdbForwardList call adb shell

func (*AppService) AdbRestart

func (a *AppService) AdbRestart(context.Context, *rpc.Empty) (*rpc.Empty, error)

AdbRestart call adb kill-server then adb start-server

func (*AppService) AdbShell

func (a *AppService) AdbShell(ctx context.Context, req *rpc.AdbShellParams) (*rpc.Message, error)

AdbShell call adb shell

func (*AppService) AdbTCPIP

func (a *AppService) AdbTCPIP(ctx context.Context, req *rpc.AdbTCPIPParams) (*rpc.Message, error)

AdbTCPIP call adb shell

func (*AppService) CreateProxy

func (a *AppService) CreateProxy(ctx context.Context, req *rpc.CreateGRPCProxy) (*rpc.Message, error)

CreateProxy get devices

func (*AppService) GetDevices

func (a *AppService) GetDevices(context.Context, *rpc.Empty) (*rpc.Devices, error)

GetDevices get devices

func (*AppService) GetStartCommand

func (a *AppService) GetStartCommand(ctx context.Context, req *rpc.DeviceSerial) (*rpc.GetStartCommandResult, error)

GetStartCommand get devices

func (*AppService) Init

func (a *AppService) Init()

Init init app service

func (*AppService) StartService

func (a *AppService) StartService(ctx context.Context, req *rpc.DeviceSerial) (*rpc.StartServiceResult, error)

StartService get devices

func (*AppService) StopService

func (a *AppService) StopService(ctx context.Context, req *rpc.DeviceSerial) (*rpc.Message, error)

StopService get devices

Directories

Path Synopsis
commandline module
proxy module

Jump to

Keyboard shortcuts

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