public bool IsDeviceConnected(DeviceIO device)
 {
     this.RefreshDevices();
     foreach (string str in this.ConnectedDevices)
     {
         if (str == device.SerialNumber)
         {
             return(true);
         }
     }
     return(false);
 }
        public bool ShowWaitDeviceDialog(ref DeviceIO newDevice, string deviceSerial = null, string message = null, bool cancelBtn = true)
        {
            frmWaitDeviceDialog dialog = new frmWaitDeviceDialog(deviceSerial, message, cancelBtn);

            dialog.ShowDialog();
            if (dialog.DialogResult == DialogResult.OK)
            {
                newDevice = dialog.Device;
                dialog.Dispose();
                return(true);
            }
            newDevice = null;
            dialog.Dispose();
            return(false);
        }
Esempio n. 3
0
        public static ADBCommand CreateADBShellCmd(DeviceIO device, bool rootShell, string binary, params string[] args)
        {
            string str = $"-s {device.SerialNumber} shell ";

            if (rootShell)
            {
                str = str + "su -c \"" + binary;
            }
            else
            {
                str = str + "\"" + binary;
            }
            int num2 = args.Length - 1;

            for (int i = 0; i <= num2; i++)
            {
                str = str + " " + args[i];
            }
            return(new ADBCommand(str + "\" ; echo 'exitcode='$?"));
        }
Esempio n. 4
0
 public BusyBox(DeviceIO device)
 {
     _device   = device;
     _commands = new List <string>();
     Update();
 }
Esempio n. 5
0
 public KernelInfo(DeviceIO device)
 {
     _device = device;
     GetKernelVersion();
 }
 internal FileSystem(DeviceIO device)
 {
     _device = device;
 }
 public SU_Binary(DeviceIO device)
 {
     _device = device;
     GetSUInfo();
 }
Esempio n. 8
0
 public BuildPropertyParser(DeviceIO device)
 {
     _device = device;
     Update();
 }
 public static FastbootCommand CreateFastbootCmd(DeviceIO device, string command, params string[] args) =>
 CreateFastbootCmd("-s " + device.SerialNumber + " " + command, args);