diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-09-28 00:10:24 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-09-28 00:10:24 +0300 |
commit | 0a82a5ec4240ac836c4186f517c8b49013ae889c (patch) | |
tree | 496cdff1252cc06f8d651926138a6b3a01529454 /MainForm.cs | |
parent | fe8cd0fc4e716b1bef4aff1fc4ff7b6b5180474b (diff) |
NAND write feature (not working yet, it WILL BRICK YOUR CONSOLE, so it's hidden), some fixes
Diffstat (limited to 'MainForm.cs')
-rw-r--r-- | MainForm.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/MainForm.cs b/MainForm.cs index f93b107b..08f0058b 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -229,6 +229,7 @@ namespace com.clusterrr.hakchi_gui WorkerForm.GetMemoryStats();
new Thread(RecalculateSelectedGamesThread).Start();
+ /*
// It's good idea to sync time... or not?
// Requesting autoshutdown state
var autoshutdown = Clovershell.ExecuteSimple("cat /var/lib/clover/profiles/0/shutdown.txt");
@@ -243,6 +244,8 @@ namespace com.clusterrr.hakchi_gui // Restoring automatic shutdown
if (autoshutdown != "0")
Clovershell.ExecuteSimple(string.Format("echo -n {0} > /var/lib/clover/profiles/0/shutdown.txt", autoshutdown));
+ */
+ // It was bad idea
}
catch (Exception ex)
{
@@ -780,6 +783,20 @@ namespace com.clusterrr.hakchi_gui return workerForm.DialogResult == DialogResult.OK;
}
+ bool DoNandFlash()
+ {
+ openDumpFileDialog.FileName = "nand.bin";
+ openDumpFileDialog.DefaultExt = "bin";
+ if (openDumpFileDialog.ShowDialog() != DialogResult.OK)
+ return false;
+ var workerForm = new WorkerForm();
+ workerForm.Text = "...";
+ workerForm.Task = WorkerForm.Tasks.FlashNand;
+ workerForm.NandDump = openDumpFileDialog.FileName;
+ workerForm.Start();
+ return workerForm.DialogResult == DialogResult.OK;
+ }
+
bool DoNandBDump()
{
saveDumpFileDialog.FileName = "nandb.hsqs";
@@ -985,6 +1002,15 @@ namespace com.clusterrr.hakchi_gui {
if (DoNandDump()) MessageBox.Show(Resources.NandDumped, Resources.Done, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
+
+ private void toolFlashTheWholeNANDStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (MessageBox.Show("...", Resources.AreYouSure, MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
+ == System.Windows.Forms.DialogResult.Yes)
+ {
+ DoNandFlash();
+ }
+ }
private void dumpNANDBToolStripMenuItem_Click(object sender, EventArgs e)
{
@@ -1576,5 +1602,6 @@ namespace com.clusterrr.hakchi_gui MessageBox.Show(this, ex.Message, Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
+
}
}
|