public static string GetDeviceDetails() { ProcessOutput output = AppProcess.RunProcess("adb devices -l"); //MessageBox.Show(output.Output.Split('\n').Length + ""); string[] lines = output.Output.Split('\n'); string data = "No Device Found"; //int cnt = 0; foreach (string line in lines) { if (line.Trim() != string.Empty && line.Contains("device") == true) { data = line.Trim(); //lbl.Text = line ; //cnt++; } } return(data); }
private void button2_Click(object sender, EventArgs e) { ProcessOutput output = AppProcess.RunProcess("adb devices"); lbl.Text = output.Output + "\n" + output.Error; }
public static int GetRotationSituation() { string line = AppProcess.RunProcess("adb shell settings get system accelerometer_rotation").Output; return(Int32.Parse(line.Trim())); }
private void button7_Click(object sender, EventArgs e) { string line = AppProcess.RunProcess("adb shell settings get system accelerometer_rotation").Output; MessageBox.Show(line.Trim().Split('\n').Length + ""); }