private void btn_restore_restore_Click(object sender, EventArgs e) { if (txt_restore_path.Text == "") { MessageBox.Show("Please select a file!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { StandardIO.AdbCMD("restore \"" + txt_restore_path.Text + "\"", " -s " + GetSelectedSerialnumber()); } }
private void btn_push_push_Click(object sender, EventArgs e) { if (txt_push_fromfilepath.Text == "" || txt_push_tofilepath.Text == "") { MessageBox.Show("Please select a file and chose destination!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { var s = "push \"" + txt_push_fromfilepath.Text + "\"" + " \"" + txt_push_tofilepath.Text + "\""; StandardIO.AdbCMD(s, " -s " + GetSelectedSerialnumber()); } }
private void btn_sideload_sideload_Click(object sender, EventArgs e) { if (txt_sideload_path.Text != "") { var s = "sideload \"" + txt_sideload_path.Text + "\""; StandardIO.AdbCMD(s, " -s " + GetSelectedSerialnumber()); } else { MessageBox.Show("Please select a file!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btn_run_Click(object sender, EventArgs e) { var s = txt_customcommand.Text; if (s == "") { MessageBox.Show("Please enter a command!", "Error"); } else { StandardIO.AdbCMD(@s, " -s " + GetSelectedSerialnumber()); } }
private void btn_backup_backup_Click(object sender, EventArgs e) { var name = " -f \"" + txt_backup_path.Text + "\""; var apk = " -noapk"; var shared = " -noshared"; var all = " -all"; var system = " -system"; var package = txt_backup_packagename.Text; if (cb_backup_package.Checked == false) { if (txt_backup_path.Text == "") { MessageBox.Show("Please select a destination!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { if (cb_backup_withapk.Checked) { apk = " -apk"; } if (cb_backup_shared.Checked) { shared = " -shared"; } if (cb_backup_nosystem.Checked) { system = " -nosystem"; } StandardIO.AdbCMD("backup" + apk + shared + all + system + name, " -s " + GetSelectedSerialnumber()); } } else { if (txt_backup_path.Text == "") { MessageBox.Show("Please select a destination!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { StandardIO.AdbCMD("backup -apk " + package + name, " -s " + GetSelectedSerialnumber()); } } }
private void btn_openshell_Click(object sender, EventArgs e) { StandardIO.AdbCMD("shell", " -s " + GetSelectedSerialnumber()); }