private void btn_phoneinformation_screenshot_Click(object sender, EventArgs e) { //reWrited by [6769] //var proc = new Process(); //proc.StartInfo.FileName = "tools\\screenshot.bat"; //proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; //proc.Start(); //while (proc.HasExited == false) //{ // groupBox11.Enabled = false; // tabControl1.Enabled = false; // Thread.Sleep(100); // //Cursor = Cursors.WaitCursor; //} //groupBox11.Enabled = true; //tabControl1.Enabled = true; ////Cursor = Cursors.Default; //there is unnecessary to invoke such a batch file to execute some adb shell; groupBox11.Enabled = false; tabControl1.Enabled = false; StandardIO.AdbCMDBackgroundNoReturn("", "shell screencap -p /sdcard/screenshot.png", " -s " + GetSelectedSerialnumber(), true); StandardIO.AdbCMDBackgroundNoReturn("", "pull /sdcard/screenshot.png", " -s " + GetSelectedSerialnumber(), true); StandardIO.AdbCMDBackgroundNoReturn("", "shell rm /sdcard/screenshot.png", " -s " + GetSelectedSerialnumber()); //open sreenshot.png on PC; groupBox11.Enabled = true; tabControl1.Enabled = true; StandardIO.StandardCMDshell("start screenshot.png"); }
private void button6_Click(object sender, EventArgs e) { string serial = GetSelectedSerialnumber(); Thread thr = new Thread(() => { StandardIO.AdbCMDBackgroundNoReturn("", "shell wm size reset", " -s " + serial); }); thr.Start(); }
private void button5_Click(object sender, EventArgs e) { string serial = GetSelectedSerialnumber(); Thread thr = new Thread(() => { StandardIO.AdbCMDBackgroundNoReturn("", "shell wm size " + txt_phoneinformation_resolution.Text, " -s " + serial); }); thr.Start(); }
private void button2_Click(object sender, EventArgs e) { string serial = GetSelectedSerialnumber(); Thread thr = new Thread(() => { StandardIO.AdbCMDBackgroundNoReturn("", "shell su root busybox ifconfig wlan0 down", " -s " + serial); }); thr.Start(); Thread thr2 = new Thread(() => { StandardIO.AdbCMDBackground("", "shell su root busybox ifconfig wlan0 up", " -s " + serial); }); thr2.Start(); }
private void btn_phoneinformation_spoofmac_Click(object sender, EventArgs e) { var s = txt_phoneinformation_mac.Text; var r = new Regex(@"(([a-f]|[0-9]|[A-F]){2}\:){5}([a-f]|[0-9]|[A-F]){2}\b"); if (r.Match(s).Success) { string serial = GetSelectedSerialnumber(); Thread thr = new Thread(() => { StandardIO.AdbCMDBackgroundNoReturn("", "shell su root busybox ifconfig wlan0 hw ether " + s, "-s " + serial); }); thr.Start(); } else { MessageBox.Show("Please enter a valid MAC address", "Error"); } }
private void btn_rebootmenu_reboot_Click(object sender, EventArgs e) { Close(); MainForm mainform = Application.OpenForms.OfType <MainForm>().Single(); string serial = " -s " + mainform.cbSerials.SelectedItem.ToString();; string cmd = null; switch (combo_rebootmenu.SelectedIndex) { case 0: //StandardIO.AdbCMDBackground("", "shell reboot -p", serial); cmd = "shell reboot -p"; break; case 1: //StandardIO.AdbCMDBackground("", "reboot", serial); cmd = "reboot"; break; case 2: //StandardIO.AdbCMDBackground("", "reboot bootloader", serial); cmd = "reboot bootloader"; break; case 3: //StandardIO.AdbCMDBackground("", "reboot recovery", serial); cmd = "reboot recovery"; break; } Thread thr = new Thread(() => { StandardIO.AdbCMDBackgroundNoReturn("", cmd, serial); }); thr.Start(); }
private void btn_remountsystem_Click(object sender, EventArgs e) { StandardIO.AdbCMDBackgroundNoReturn("", "remount"); }