private void SetDeviceList() { string active = String.Empty; this.Invoke((Action) delegate { devicecheck.Clear(); }); List <DataModelDevicesItem> adbDevices = ADB.Devices(); List <DataModelDevicesItem> fastbootDevices = Fastboot.Devices(); foreach (DataModelDevicesItem device in adbDevices) { this.Invoke((Action) delegate { cAppend("Device adb connected!"); devicecheck.Add(" Device: Online! - ADB"); devicecheck.Add(" Mode: " + state); listBoxDeviceStatus.DataSource = devicecheck; }); } foreach (DataModelDevicesItem device in fastbootDevices) { this.Invoke((Action) delegate { cAppend("Device fastboot connected!"); devicecheck.Add(" Device: Online! - FASTBOOT"); devicecheck.Add(" Mode: " + state); listBoxDeviceStatus.DataSource = devicecheck; }); } ADB.SelectDevice(); Fastboot.SelectDevice(); }
private void SetDeviceList() { string active = String.Empty; List <DataModelDevicesItem> adbDevices = ADB.Devices(); List <DataModelDevicesItem> fastbootDevices = Fastboot.Devices(); foreach (DataModelDevicesItem device in adbDevices) { this.Invoke((Action) delegate { cAppend("Device: Online! - ADB"); cAppend("Device Codename: " + LoadDeviceServer.devicecodename); cAppend("Mode: " + state); cAppendDebloat("Device: Online! - ADB"); cAppendDebloat("Device Codename: " + LoadDeviceServer.devicecodename); cAppendDebloat("Mode: " + state); }); } foreach (DataModelDevicesItem device in fastbootDevices) { this.Invoke((Action) delegate { cAppend("Device: Online! - FASTBOOT"); cAppend("Device Codename: " + LoadDeviceServer.devicecodename); cAppend("Mode: " + state); cAppendDebloat("Device: Online! - FASTBOOT"); cAppendDebloat("Device Codename: " + LoadDeviceServer.devicecodename); cAppendDebloat("Mode: " + state); }); } ADB.SelectDevice(); Fastboot.SelectDevice(); }
public static string ExecuteCommand(Fastboot command, bool forceRegular = false) { string result = ""; lock (_lock) { result = Command.RunProcessReturnOutput(@"C:\adb\" + ADB_EXE, command.Command, forceRegular, command.Timeout); } return(result); }
public async void FFlash(string command) { List <String> devices = await Task.Run(() => Fastboot.Instance().Execute("fastboot " + command));; devices.ToString(); var devices1 = String.Join("", devices.ToArray()); cAppend("MOTO FLASH: Flashing... {" + devices1 + "}"); if (backgroundWorker == null) { backgroundWorker.RunWorkerAsync(); } }
private void DeviceDetectionService() { ADB.Start(); Fastboot.Instance(); if (Fastboot.ConnectionMonitor.Start()) { Fastboot.ConnectionMonitor.Callback += ConnectionMonitorCallback; if (ADB.IsStarted) { SetDeviceList(); if (ADB.ConnectionMonitor.Start()) { ADB.ConnectionMonitor.Callback += ConnectionMonitorCallback; } } } }