Пример #1
0
        private void SetDevice(AdbSocket adbSocket)
        {
            if (String.IsNullOrEmpty(DeviceSerialNumber))
            {
                throw new AdbException("No device selected");
            }

            adbSocket.SendCommand($"host:transport:{DeviceSerialNumber}");
        }
Пример #2
0
        private String SendSyncCommand(AdbSocket adbSocket, String command, String parameter, Boolean readResponse = true)
        {
            if (null == parameter)
            {
                throw new ArgumentNullException(nameof(parameter));
            }

            SetDevice(adbSocket);

            adbSocket.SendCommand("sync:");

            return(adbSocket.SendSyncCommand(command, parameter, readResponse));
        }