diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-10-14 17:27:30 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-10-14 17:27:30 +0300 |
commit | 218cf8f81301db41d32c044128553adaf6fa8ef0 (patch) | |
tree | 221cbf99315d6ac9de8f91fc3423801f4a11fff1 /MainForm.cs | |
parent | 9c2ef235f166989d96903d196dfe30fe47461f52 (diff) |
NAND-C partition write feature
Diffstat (limited to 'MainForm.cs')
-rw-r--r-- | MainForm.cs | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/MainForm.cs b/MainForm.cs index 48afef65..f86f069d 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -940,6 +940,20 @@ namespace com.clusterrr.hakchi_gui return workerForm.DialogResult == DialogResult.OK;
}
+ bool DoNandCFlash()
+ {
+ openDumpFileDialog.FileName = "nandc.hsqs";
+ openDumpFileDialog.DefaultExt = "hsqs";
+ if (openDumpFileDialog.ShowDialog() != DialogResult.OK)
+ return false;
+ var workerForm = new WorkerForm(this);
+ workerForm.Text = Resources.FlashingNand;
+ workerForm.Task = WorkerForm.Tasks.FlashNandC;
+ workerForm.NandDump = openDumpFileDialog.FileName;
+ workerForm.Start();
+ return workerForm.DialogResult == DialogResult.OK;
+ }
+
bool FlashCustomKernel()
{
var workerForm = new WorkerForm(this);
@@ -1133,13 +1147,26 @@ namespace com.clusterrr.hakchi_gui private void dumpNANDBToolStripMenuItem_Click(object sender, EventArgs e)
{
if (RequirePatchedKernel() == DialogResult.No) return;
- if (DoNandBDump()) MessageBox.Show(Resources.NandDumped, Resources.Done, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ if (DoNandBDump())
+ MessageBox.Show(Resources.NandDumped, Resources.Done, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void dumpNANDCPartitionToolStripMenuItem_Click(object sender, EventArgs e)
{
if (RequirePatchedKernel() == DialogResult.No) return;
- if (DoNandCDump()) MessageBox.Show(Resources.NandDumped, Resources.Done, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ if (DoNandCFlash())
+ MessageBox.Show(Resources.NandDumped, Resources.Done, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+
+ private void flashNANDCPartitionToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (MessageBox.Show(Resources.FlashNandCQ, Resources.AreYouSure, MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
+ == DialogResult.Yes)
+ {
+ if (RequirePatchedKernel() == DialogResult.No) return;
+ if (DoNandCFlash())
+ MessageBox.Show("NAND-C flashed", Resources.Done, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
}
private void flashCustomKernelToolStripMenuItem_Click(object sender, EventArgs e)
|