Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-14 17:27:30 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-14 17:27:30 +0300
commit218cf8f81301db41d32c044128553adaf6fa8ef0 (patch)
tree221cbf99315d6ac9de8f91fc3423801f4a11fff1 /MainForm.cs
parent9c2ef235f166989d96903d196dfe30fe47461f52 (diff)
NAND-C partition write feature
Diffstat (limited to 'MainForm.cs')
-rw-r--r--MainForm.cs31
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)