Documentation ¶
Index ¶
- type AdbClient
- func (a *AdbClient) Connect(ip string, port string) (string, error)
- func (a *AdbClient) Forward(serial string, devicePort, pcPort string) (bool, error)
- func (a *AdbClient) ForwardList() string
- func (a *AdbClient) GetApkAbi(serial, packageName string) string
- func (a *AdbClient) GetApkPath(serial, packageName string) (string, error)
- func (a *AdbClient) GetAppProcess(serial string) (bool, bool, bool)
- func (a *AdbClient) GetDeviceABI(serial string) (string, error)
- func (a *AdbClient) GetDevices() ([]string, error)
- func (a *AdbClient) GetIPAddress(serial string) string
- func (a *AdbClient) GetPids(serial string, process string) ([]string, error)
- func (a *AdbClient) GetRobotmonStartCommand(serial string) (string, []string, error)
- func (a *AdbClient) Init()
- func (a *AdbClient) Install(serial, apk string) (string, error)
- func (a *AdbClient) IsFileExist(serial, path string) bool
- func (a *AdbClient) Restart()
- func (a *AdbClient) Shell(serial, command string) (string, error)
- func (a *AdbClient) StartRobotmonService(serial string) ([]string, error)
- func (a *AdbClient) StopService(serial string) error
- func (a *AdbClient) TCPIP(serial, port string) error
- func (a *AdbClient) Uninstall(serial, apkID string) (string, error)
- type AppService
- func (a *AppService) AdbConnect(ctx context.Context, req *rpc.AdbConnectParams) (*rpc.Message, error)
- func (a *AppService) AdbForward(ctx context.Context, req *rpc.AdbForwardParams) (*rpc.Message, error)
- func (a *AppService) AdbForwardList(context.Context, *rpc.Empty) (*rpc.Message, error)
- func (a *AppService) AdbRestart(context.Context, *rpc.Empty) (*rpc.Empty, error)
- func (a *AppService) AdbShell(ctx context.Context, req *rpc.AdbShellParams) (*rpc.Message, error)
- func (a *AppService) AdbTCPIP(ctx context.Context, req *rpc.AdbTCPIPParams) (*rpc.Message, error)
- func (a *AppService) CreateProxy(ctx context.Context, req *rpc.CreateGRPCProxy) (*rpc.Message, error)
- func (a *AppService) GetDevices(context.Context, *rpc.Empty) (*rpc.Devices, error)
- func (a *AppService) GetStartCommand(ctx context.Context, req *rpc.DeviceSerial) (*rpc.GetStartCommandResult, error)
- func (a *AppService) Init()
- func (a *AppService) StartService(ctx context.Context, req *rpc.DeviceSerial) (*rpc.StartServiceResult, error)
- func (a *AppService) StopService(ctx context.Context, req *rpc.DeviceSerial) (*rpc.Message, error)
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) GetApkPath ¶
GetApkPath get apk installed path (com.r2studio.robotmon)
func (*AdbClient) GetAppProcess ¶
GetAppProcess for robotmon starting service
func (*AdbClient) GetDeviceABI ¶
GetDeviceABI get device abi, arm64-v8a, armeabi-v7a or x86
func (*AdbClient) GetDevices ¶
GetDevices adb devices
func (*AdbClient) GetIPAddress ¶
func (*AdbClient) GetRobotmonStartCommand ¶
GetRobotmonStartCommand getRobotmonStartCommand
func (*AdbClient) IsFileExist ¶
IsFileExist check is file exist in device
func (*AdbClient) Restart ¶
func (a *AdbClient) Restart()
Restart adb kill-server then adb start-server
func (*AdbClient) StartRobotmonService ¶
func (*AdbClient) StopService ¶
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 ¶
AdbForwardList call adb shell
func (*AppService) AdbRestart ¶
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 ¶
GetDevices get devices
func (*AppService) GetStartCommand ¶
func (a *AppService) GetStartCommand(ctx context.Context, req *rpc.DeviceSerial) (*rpc.GetStartCommandResult, error)
GetStartCommand get devices
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