Exemple #1
0
        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);
        }
Exemple #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            ProcessOutput output = AppProcess.RunProcess("adb devices");

            lbl.Text = output.Output + "\n" + output.Error;
        }
Exemple #3
0
        public static int GetRotationSituation()
        {
            string line = AppProcess.RunProcess("adb shell settings get system accelerometer_rotation").Output;

            return(Int32.Parse(line.Trim()));
        }
Exemple #4
0
        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 + "");
        }