diff --git a/ATA-GUI/ATA-GUI.csproj b/ATA-GUI/ATA-GUI.csproj index e714496..80b435d 100644 --- a/ATA-GUI/ATA-GUI.csproj +++ b/ATA-GUI/ATA-GUI.csproj @@ -10,9 +10,9 @@ © 2021-2024 Massimiliano Sartore - 3.7.4.0 - 3.7.4.0 - 3.7.4.0 + 3.7.5.0 + 3.7.5.0 + 3.7.5.0 publish\ diff --git a/ATA-GUI/Classes/ATA.cs b/ATA-GUI/Classes/ATA.cs index f50f1f8..a8b3484 100644 --- a/ATA-GUI/Classes/ATA.cs +++ b/ATA-GUI/Classes/ATA.cs @@ -1,16 +1,16 @@ -using System; +using Newtonsoft.Json; +using System; using System.Collections.Generic; using System.Drawing; using System.Net.Http; using System.Threading.Tasks; using System.Windows.Forms; -using Newtonsoft.Json; namespace ATA_GUI.Classes { internal class ATA { - public static readonly string CURRENTVERSION = "v3.7.4"; + public static readonly string CURRENTVERSION = "v3.7.5"; public static readonly string IPFileName = "IPList.txt"; public HashSet IPList { get; } = new HashSet(); diff --git a/ATA-GUI/Forms/AboutForm.cs b/ATA-GUI/Forms/AboutForm.cs index 0c83ccd..658fcf0 100644 --- a/ATA-GUI/Forms/AboutForm.cs +++ b/ATA-GUI/Forms/AboutForm.cs @@ -1,7 +1,7 @@ -using System; -using System.Windows.Forms; -using ATA_GUI.Classes; +using ATA_GUI.Classes; using ATA_GUI.Utils; +using System; +using System.Windows.Forms; namespace ATA_GUI { diff --git a/ATA-GUI/Forms/BloatwareRemoverForm.cs b/ATA-GUI/Forms/BloatwareRemoverForm.cs index 7e64cfb..87ece76 100644 --- a/ATA-GUI/Forms/BloatwareRemoverForm.cs +++ b/ATA-GUI/Forms/BloatwareRemoverForm.cs @@ -1,11 +1,11 @@ -using System; +using ATA_GUI.Classes; +using ATA_GUI.Utils; +using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Windows.Forms; using System.Xml; -using ATA_GUI.Classes; -using ATA_GUI.Utils; namespace ATA_GUI { diff --git a/ATA-GUI/Forms/BootloaderMenuForm.cs b/ATA-GUI/Forms/BootloaderMenuForm.cs index 3742eb9..131d735 100644 --- a/ATA-GUI/Forms/BootloaderMenuForm.cs +++ b/ATA-GUI/Forms/BootloaderMenuForm.cs @@ -1,6 +1,6 @@ -using System; +using ATA_GUI.Utils; +using System; using System.Windows.Forms; -using ATA_GUI.Utils; namespace ATA_GUI { diff --git a/ATA-GUI/Forms/DefaultAppForm.cs b/ATA-GUI/Forms/DefaultAppForm.cs index 505ab49..fffaa2f 100644 --- a/ATA-GUI/Forms/DefaultAppForm.cs +++ b/ATA-GUI/Forms/DefaultAppForm.cs @@ -1,7 +1,7 @@ -using System; -using System.Windows.Forms; -using ATA_GUI.Classes; +using ATA_GUI.Classes; using ATA_GUI.Utils; +using System; +using System.Windows.Forms; namespace ATA_GUI { diff --git a/ATA-GUI/Forms/DeviceLogsForm.cs b/ATA-GUI/Forms/DeviceLogsForm.cs index af9f21e..879983e 100644 --- a/ATA-GUI/Forms/DeviceLogsForm.cs +++ b/ATA-GUI/Forms/DeviceLogsForm.cs @@ -1,11 +1,11 @@ -using System; +using ATA_GUI.Classes; +using ATA_GUI.Utils; +using System; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.Linq; using System.Windows.Forms; -using ATA_GUI.Classes; -using ATA_GUI.Utils; namespace ATA_GUI { diff --git a/ATA-GUI/Forms/FeedbackForm.cs b/ATA-GUI/Forms/FeedbackForm.cs index 335003b..a334eea 100644 --- a/ATA-GUI/Forms/FeedbackForm.cs +++ b/ATA-GUI/Forms/FeedbackForm.cs @@ -1,8 +1,8 @@ -using System; +using ATA_GUI.Utils; +using System; using System.IO; using System.Windows.Forms; using System.Xml; -using ATA_GUI.Utils; namespace ATA_GUI { diff --git a/ATA-GUI/Forms/LoadingForm.cs b/ATA-GUI/Forms/LoadingForm.cs index 9969c26..8136a50 100644 --- a/ATA-GUI/Forms/LoadingForm.cs +++ b/ATA-GUI/Forms/LoadingForm.cs @@ -1,11 +1,11 @@ -using System; +using ATA_GUI.Utils; +using System; using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Linq; using System.Threading; using System.Windows.Forms; -using ATA_GUI.Utils; namespace ATA_GUI { @@ -90,7 +90,7 @@ private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e) { labelFileName.Text = x; Refresh(); - string result = ConsoleProcess.adbFastbootCommandR(command + x, 0).ToLowerInvariant(); + string result = ConsoleProcess.adbProcess(command + x).ToLowerInvariant(); if (result.Contains("not found") || result.Contains("fail") || result.Trim().Length == 0) { failedApps.Add(x); @@ -100,7 +100,7 @@ private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e) break; case OperationType.Transfer: - _ = ConsoleProcess.adbFastbootCommandR(new[] { "-s " + deviceSerial + " shell mkdir sdcard/ATA" }, 0); + _ = ConsoleProcess.adbProcess("-s " + deviceSerial + " shell mkdir sdcard/ATA"); array.ForEach(file => { @@ -108,7 +108,7 @@ private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e) { labelFileName.Text = file[(file.LastIndexOf('\\') + 1)..]; Refresh(); - if (ConsoleProcess.adbFastbootCommandR(new[] { "-s " + deviceSerial + " push " + file + " sdcard/ATA " }, 0) == null) + if (ConsoleProcess.adbProcess("-s " + deviceSerial + " push " + file + " sdcard/ATA ") == null) { failedApps.Add(file); } @@ -128,10 +128,10 @@ private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e) { labelFileName.Text = x; Refresh(); - string[] pathList = ConsoleProcess.adbFastbootCommandR("-s " + deviceSerial + " shell pm path " + x, 0).Split('\n').Where(it => it.Contains("package")).ToArray(); + string[] pathList = ConsoleProcess.adbProcess("-s " + deviceSerial + " shell pm path " + x).Split('\n').Where(it => it.Contains("package")).ToArray(); foreach (string path in pathList) { - string result = ConsoleProcess.adbFastbootCommandR(("-s " + deviceSerial + " pull " + path.Replace("package:", "").Trim() + " " + Application.StartupPath + "APKS\\" + x + "_" + path[(path.LastIndexOf('/') + 1)..]).Trim(), 0); + string result = ConsoleProcess.adbProcess(("-s " + deviceSerial + " pull " + path.Replace("package:", "").Trim() + " " + Application.StartupPath + "APKS\\" + x + "_" + path[(path.LastIndexOf('/') + 1)..]).Trim()); if (!result.Contains("file pulled")) { failedApps.Add(result); diff --git a/ATA-GUI/Forms/MainForm.Designer.cs b/ATA-GUI/Forms/MainForm.Designer.cs index fdad154..b39b7de 100644 --- a/ATA-GUI/Forms/MainForm.Designer.cs +++ b/ATA-GUI/Forms/MainForm.Designer.cs @@ -30,7 +30,7 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); labelLog = new System.Windows.Forms.Label(); buttonLogClear = new System.Windows.Forms.Button(); @@ -43,12 +43,12 @@ private void InitializeComponent() labelIP = new System.Windows.Forms.Label(); label1 = new System.Windows.Forms.Label(); labelAV = new System.Windows.Forms.Label(); - labelD = new System.Windows.Forms.Label(); - labelB = new System.Windows.Forms.Label(); + labelDevice = new System.Windows.Forms.Label(); + labelBoard = new System.Windows.Forms.Label(); labelModel = new System.Windows.Forms.Label(); labelManu = new System.Windows.Forms.Label(); - labelCA = new System.Windows.Forms.Label(); - labelBU = new System.Windows.Forms.Label(); + labelCPUAb = new System.Windows.Forms.Label(); + labelBuildU = new System.Windows.Forms.Label(); labelAndroidVersion = new System.Windows.Forms.Label(); labelProductDevice = new System.Windows.Forms.Label(); labelProductBoard = new System.Windows.Forms.Label(); @@ -295,12 +295,12 @@ private void InitializeComponent() groupBoxDeviceInfo.Controls.Add(labelIP); groupBoxDeviceInfo.Controls.Add(label1); groupBoxDeviceInfo.Controls.Add(labelAV); - groupBoxDeviceInfo.Controls.Add(labelD); - groupBoxDeviceInfo.Controls.Add(labelB); + groupBoxDeviceInfo.Controls.Add(labelDevice); + groupBoxDeviceInfo.Controls.Add(labelBoard); groupBoxDeviceInfo.Controls.Add(labelModel); groupBoxDeviceInfo.Controls.Add(labelManu); - groupBoxDeviceInfo.Controls.Add(labelCA); - groupBoxDeviceInfo.Controls.Add(labelBU); + groupBoxDeviceInfo.Controls.Add(labelCPUAb); + groupBoxDeviceInfo.Controls.Add(labelBuildU); groupBoxDeviceInfo.Controls.Add(labelAndroidVersion); groupBoxDeviceInfo.Controls.Add(labelProductDevice); groupBoxDeviceInfo.Controls.Add(labelProductBoard); @@ -399,25 +399,25 @@ private void InitializeComponent() labelAV.TabIndex = 13; labelAV.Text = "EMPTY"; // - // labelD + // labelDevice // - labelD.AutoSize = true; - labelD.Location = new System.Drawing.Point(115, 93); - labelD.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - labelD.Name = "labelD"; - labelD.Size = new System.Drawing.Size(44, 15); - labelD.TabIndex = 12; - labelD.Text = "EMPTY"; + labelDevice.AutoSize = true; + labelDevice.Location = new System.Drawing.Point(115, 93); + labelDevice.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelDevice.Name = "labelDevice"; + labelDevice.Size = new System.Drawing.Size(44, 15); + labelDevice.TabIndex = 12; + labelDevice.Text = "EMPTY"; // - // labelB + // labelBoard // - labelB.AutoSize = true; - labelB.Location = new System.Drawing.Point(115, 78); - labelB.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - labelB.Name = "labelB"; - labelB.Size = new System.Drawing.Size(44, 15); - labelB.TabIndex = 11; - labelB.Text = "EMPTY"; + labelBoard.AutoSize = true; + labelBoard.Location = new System.Drawing.Point(115, 78); + labelBoard.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelBoard.Name = "labelBoard"; + labelBoard.Size = new System.Drawing.Size(44, 15); + labelBoard.TabIndex = 11; + labelBoard.Text = "EMPTY"; // // labelModel // @@ -439,25 +439,25 @@ private void InitializeComponent() labelManu.TabIndex = 9; labelManu.Text = "EMPTY"; // - // labelCA + // labelCPUAb // - labelCA.AutoSize = true; - labelCA.Location = new System.Drawing.Point(115, 33); - labelCA.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - labelCA.Name = "labelCA"; - labelCA.Size = new System.Drawing.Size(44, 15); - labelCA.TabIndex = 8; - labelCA.Text = "EMPTY"; + labelCPUAb.AutoSize = true; + labelCPUAb.Location = new System.Drawing.Point(115, 33); + labelCPUAb.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelCPUAb.Name = "labelCPUAb"; + labelCPUAb.Size = new System.Drawing.Size(44, 15); + labelCPUAb.TabIndex = 8; + labelCPUAb.Text = "EMPTY"; // - // labelBU + // labelBuildU // - labelBU.AutoSize = true; - labelBU.Location = new System.Drawing.Point(115, 18); - labelBU.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - labelBU.Name = "labelBU"; - labelBU.Size = new System.Drawing.Size(44, 15); - labelBU.TabIndex = 7; - labelBU.Text = "EMPTY"; + labelBuildU.AutoSize = true; + labelBuildU.Location = new System.Drawing.Point(115, 18); + labelBuildU.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + labelBuildU.Name = "labelBuildU"; + labelBuildU.Size = new System.Drawing.Size(44, 15); + labelBuildU.TabIndex = 7; + labelBuildU.Text = "EMPTY"; // // labelAndroidVersion // @@ -591,8 +591,8 @@ private void InitializeComponent() // dataGridViewPackages.AllowUserToAddRows = false; dataGridViewPackages.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - dataGridViewPackages.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + dataGridViewPackages.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle2; dataGridViewPackages.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; dataGridViewPackages.BackgroundColor = System.Drawing.Color.White; dataGridViewPackages.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; @@ -2271,12 +2271,12 @@ private void InitializeComponent() private System.Windows.Forms.Label labelLog; private System.Windows.Forms.GroupBox groupBoxDeviceInfo; private System.Windows.Forms.Label labelAV; - private System.Windows.Forms.Label labelD; - private System.Windows.Forms.Label labelB; + private System.Windows.Forms.Label labelDevice; + private System.Windows.Forms.Label labelBoard; private System.Windows.Forms.Label labelModel; private System.Windows.Forms.Label labelManu; - private System.Windows.Forms.Label labelCA; - private System.Windows.Forms.Label labelBU; + private System.Windows.Forms.Label labelCPUAb; + private System.Windows.Forms.Label labelBuildU; private System.Windows.Forms.Label labelAndroidVersion; private System.Windows.Forms.Label labelProductDevice; private System.Windows.Forms.Label labelProductBoard; diff --git a/ATA-GUI/Forms/MainForm.cs b/ATA-GUI/Forms/MainForm.cs index 1efaf26..050cdf1 100644 --- a/ATA-GUI/Forms/MainForm.cs +++ b/ATA-GUI/Forms/MainForm.cs @@ -1,3 +1,9 @@ +using ATA_GUI.Classes; +using ATA_GUI.Forms; +using ATA_GUI.Utils; +using Ionic.Zip; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Diagnostics; @@ -13,12 +19,6 @@ using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; -using ATA_GUI.Classes; -using ATA_GUI.Forms; -using ATA_GUI.Utils; -using Ionic.Zip; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; namespace ATA_GUI { @@ -251,8 +251,7 @@ private void ExtractDeviceData() string[] arrayDeviceInfoCommands = { "-s "+ ATA.CurrentDeviceSelected.ID +" shell getprop ro.build.version.release", "-s "+ ATA.CurrentDeviceSelected.ID +" shell getprop ro.build.user", "-s "+ ATA.CurrentDeviceSelected.ID +" shell getprop ro.product.cpu.abilist", "-s "+ ATA.CurrentDeviceSelected.ID +" shell getprop ro.product.manufacturer" , "-s "+ ATA.CurrentDeviceSelected.ID +" shell getprop ro.product.model", "-s "+ ATA.CurrentDeviceSelected.ID +" shell getprop ro.product.board", "-s "+ ATA.CurrentDeviceSelected.ID +" shell getprop ro.product.device"}; - string deviceinfo = ConsoleProcess.adbFastbootCommandR(arrayDeviceInfoCommands, 0); - string[] arrayDeviceInfo = deviceinfo.Split('\n'); + string[] arrayDeviceInfo = ConsoleProcess.adbFastbootCommandR(arrayDeviceInfoCommands, 0); if (arrayDeviceInfo.Length > 6) { @@ -283,12 +282,12 @@ private void ExtractDeviceData() } labelAV.Text = arrayDeviceInfo[0]; - labelBU.Text = arrayDeviceInfo[1]; - labelCA.Text = arrayDeviceInfo[2]; + labelBuildU.Text = arrayDeviceInfo[1]; + labelCPUAb.Text = arrayDeviceInfo[2]; labelManu.Text = arrayDeviceInfo[3]; labelModel.Text = arrayDeviceInfo[4]; - labelB.Text = arrayDeviceInfo[5]; - labelD.Text = arrayDeviceInfo[6]; + labelBoard.Text = arrayDeviceInfo[5]; + labelDevice.Text = arrayDeviceInfo[6]; if (arrayDeviceInfo.Length > 6) { diff --git a/ATA-GUI/Forms/MainForm.resx b/ATA-GUI/Forms/MainForm.resx index 67fa3aa..55d0a3b 100644 --- a/ATA-GUI/Forms/MainForm.resx +++ b/ATA-GUI/Forms/MainForm.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 853, 19 + True diff --git a/ATA-GUI/Forms/ScrollableMessageBoxForm.cs b/ATA-GUI/Forms/ScrollableMessageBoxForm.cs index 2da3abf..0a61413 100644 --- a/ATA-GUI/Forms/ScrollableMessageBoxForm.cs +++ b/ATA-GUI/Forms/ScrollableMessageBoxForm.cs @@ -1,5 +1,5 @@ -using System.Windows.Forms; -using ATA_GUI.Utils; +using ATA_GUI.Utils; +using System.Windows.Forms; namespace ATA_GUI { diff --git a/ATA-GUI/Forms/SettingsForm.cs b/ATA-GUI/Forms/SettingsForm.cs index f54b8c6..75a4ac5 100644 --- a/ATA-GUI/Forms/SettingsForm.cs +++ b/ATA-GUI/Forms/SettingsForm.cs @@ -1,9 +1,9 @@ -using System; -using System.IO; -using System.Windows.Forms; -using ATA_GUI.Classes; +using ATA_GUI.Classes; using ATA_GUI.Utils; using Newtonsoft.Json.Linq; +using System; +using System.IO; +using System.Windows.Forms; namespace ATA_GUI { diff --git a/ATA-GUI/Forms/TaskManager.cs b/ATA-GUI/Forms/TaskManager.cs index 85fceb3..1989275 100644 --- a/ATA-GUI/Forms/TaskManager.cs +++ b/ATA-GUI/Forms/TaskManager.cs @@ -1,10 +1,9 @@ -using System; +using ATA_GUI.Utils; +using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Windows.Forms; -using ATA_GUI.Classes; -using ATA_GUI.Utils; namespace ATA_GUI { @@ -43,7 +42,10 @@ private void appsToolStripMenuItem_Click(object sender, EventArgs e) foreach (DataGridViewRow row in dataGridViewTasks.Rows) { - row.Visible = arrayApks.Any(it => ((string)row.Cells[8].Value).Contains(it.Trim())); + row.Visible = arrayApks.Any((it) => + { + return row.Cells[8].Value != null && ((string)row.Cells[8].Value).Contains(it.Trim()); + }); } } @@ -51,7 +53,7 @@ private void loadTasks() { textBoxTaskName.Text = ""; dataGridViewTasks.Rows.Clear(); - string[] tasks = ConsoleProcess.adbFastbootCommandR(new string[] { " -s " + ATA.CurrentDeviceSelected.ID + " shell ps" }, 0).Split('\n'); + string[] tasks = ConsoleProcess.adbProcess(MainForm.commandAssemblerF("shell ps")).Split('\n'); for (int i = 1; i < tasks.Length; i++) { diff --git a/ATA-GUI/Forms/UpdateForm.cs b/ATA-GUI/Forms/UpdateForm.cs index a93e7eb..334f6a9 100644 --- a/ATA-GUI/Forms/UpdateForm.cs +++ b/ATA-GUI/Forms/UpdateForm.cs @@ -1,11 +1,11 @@ -using System; +using ATA_GUI.Utils; +using Ionic.Zip; +using System; using System.IO; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; -using ATA_GUI.Utils; -using Ionic.Zip; namespace ATA_GUI { diff --git a/ATA-GUI/Forms/WirelessPairingForm.cs b/ATA-GUI/Forms/WirelessPairingForm.cs index 8ad2cf2..1981681 100644 --- a/ATA-GUI/Forms/WirelessPairingForm.cs +++ b/ATA-GUI/Forms/WirelessPairingForm.cs @@ -1,6 +1,6 @@ -using System; +using ATA_GUI.Utils; +using System; using System.Windows.Forms; -using ATA_GUI.Utils; namespace ATA_GUI.Forms { diff --git a/ATA-GUI/Utils/APK.cs b/ATA-GUI/Utils/APK.cs index 4357e7c..4696079 100644 --- a/ATA-GUI/Utils/APK.cs +++ b/ATA-GUI/Utils/APK.cs @@ -1,7 +1,7 @@ -using System; +using ATA_GUI.Classes; +using System; using System.Collections.Generic; using System.IO; -using ATA_GUI.Classes; namespace ATA_GUI.Utils { diff --git a/ATA-GUI/Utils/ConsoleProcess.cs b/ATA-GUI/Utils/ConsoleProcess.cs index d3ae4db..7933488 100644 --- a/ATA-GUI/Utils/ConsoleProcess.cs +++ b/ATA-GUI/Utils/ConsoleProcess.cs @@ -1,6 +1,6 @@ using System; +using System.Collections.Generic; using System.Diagnostics; -using System.Text; using System.Threading.Tasks; using System.Windows.Forms; @@ -20,12 +20,14 @@ public static string adbProcess(string command) public static string adbFastbootCommandR(string command, int type) { - return adbFastbootCommandR(new[] { command }, type); + string[] r = adbFastbootCommandR(new[] { command }, type); + + return r.Length > 0 ? r[0] : string.Empty; } - public static string adbFastbootCommandR(string[] args, int type) + public static string[] adbFastbootCommandR(string[] args, int type) { - StringBuilder ret = new(); + List ret = new List(); Cursor.Current = Cursors.WaitCursor; string executable = type switch @@ -56,21 +58,21 @@ public static string adbFastbootCommandR(string[] args, int type) if (!string.IsNullOrEmpty(error)) { - ret.AppendLine(error); + ret.Add(error); } } string output = process.StandardOutput.ReadToEnd(); if (!string.IsNullOrEmpty(output)) { - ret.AppendLine(output); + ret.Add(output); } process.WaitForExit(); } Cursor.Current = Cursors.Default; - return ret.ToString().Trim(); + return ret.ToArray(); } public static string scrcpyVersion(string arguments)