From 5e5a15b0a3554a1797c48281ec20490df6ac1dbe Mon Sep 17 00:00:00 2001 From: Strong Recommend Date: Tue, 9 Jan 2024 10:58:45 +0300 Subject: [PATCH] HOTFIX V28F --- HuaweiUnlock/LangProc.cs | 2 +- HuaweiUnlock/TOOLS/Fastboot.cs | 2 +- HuaweiUnlock/TOOLS/HISI.cs | 22 ++--- HuaweiUnlock/Window.Designer.cs | 149 +++++++++++++------------------- HuaweiUnlock/Window.cs | 19 +--- HuaweiUnlock/Window.resx | 10 +-- 6 files changed, 78 insertions(+), 126 deletions(-) diff --git a/HuaweiUnlock/LangProc.cs b/HuaweiUnlock/LangProc.cs index fc9df9b..3624f4b 100644 --- a/HuaweiUnlock/LangProc.cs +++ b/HuaweiUnlock/LangProc.cs @@ -20,7 +20,7 @@ namespace HuaweiUnlocker { public static class LangProc { - public const string APP_VERSION = "27F"; + public const string APP_VERSION = "28F"; public static TextBox LOGGBOX; public static string log, loge, newline = Environment.NewLine, PrevFolder = "c:\\"; private static StreamWriter se = new StreamWriter("log.txt"); diff --git a/HuaweiUnlock/TOOLS/Fastboot.cs b/HuaweiUnlock/TOOLS/Fastboot.cs index 05da928..68f27a4 100644 --- a/HuaweiUnlock/TOOLS/Fastboot.cs +++ b/HuaweiUnlock/TOOLS/Fastboot.cs @@ -58,7 +58,7 @@ private FastbootStatus GetStatus(string header) return FastbootStatus.Unknown; } } - public bool Connect(int waittime = 0) + public bool Connect(int waittime = 100) { if (waittime == 0) waittime = DefaultTimeoutWait; if (device != null) Disconnect(); diff --git a/HuaweiUnlock/TOOLS/HISI.cs b/HuaweiUnlock/TOOLS/HISI.cs index a4bf8b0..03a844d 100644 --- a/HuaweiUnlock/TOOLS/HISI.cs +++ b/HuaweiUnlock/TOOLS/HISI.cs @@ -14,7 +14,7 @@ public class HISI public delegate void RunWorkerCompletedHandler(); public event RunWorkerCompletedHandler RunWorkerCompleted; - private Fastboot fb; + private Fastboot fb = new Fastboot(); public string BSN = "NaN"; public string BNUM = "NaN"; public string AVER = "NaN"; @@ -60,7 +60,7 @@ public void FlashBootloader(Bootloader bootloader, string port) flasher.Close(); } - public bool ReadInfo(int waittime = 0) + public bool ReadInfo(int waittime = 100) { if (fb.Connect(waittime)) { @@ -190,14 +190,14 @@ public string ReadFactoryKey() var res = fb.Command("getvar:nve:WVLOCK"); var match = Regex.Match(res.Payload, @"[\w\d]{16}"); - return match.Success ? match.Value : null; + return match.Success ? match.Value : "NaN"; } public string ReadFactoryKeyMethod2() { var res = fb.Command("getvar:nve:USRKEY"); var match = Regex.Match(res.Payload, @"[\w\d]{16}"); - return match.Success ? match.Value : null; + return match.Success ? match.Value : "NaN"; } public string ReadIndentifier() { @@ -249,7 +249,7 @@ public string WriteBOOTLOADERKEY(string key) } public string UnlockSec_Method2() { - if(fb.Connect()) + if(IsDeviceConnected()) { var res = fb.Command("oem sec_unlock"); LOG(0, res.Payload); @@ -263,13 +263,9 @@ public bool IsDeviceConnected() } public string Reboot() { - if (fb.Connect()) - { - var res = fb.Command("reboot"); - LOG(0, res.Payload); - return res.Payload; - } - return "NaN"; + var res = fb.Command("reboot"); + LOG(0, res.Payload); + return res.Payload; } public void WriteKirinBootloader(Bootloader d, string port) { @@ -296,7 +292,7 @@ public void StartUnlockPRCS(bool frp, string key, Bootloader d, string port) FlashBootloader(d, port); LOG(0, "[Fastboot] ", "CheckCon"); - if (ReadInfo()) + if (fb.Connect()) { if (!frp) { diff --git a/HuaweiUnlock/Window.Designer.cs b/HuaweiUnlock/Window.Designer.cs index 4a6f468..676b66c 100644 --- a/HuaweiUnlock/Window.Designer.cs +++ b/HuaweiUnlock/Window.Designer.cs @@ -18,12 +18,12 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Window)); this.pather = new System.Windows.Forms.TextBox(); this.DETECTED = new System.Windows.Forms.Label(); @@ -136,7 +136,6 @@ private void InitializeComponent() this.BoardU = new HuaweiUnlocker.UI.NButton(); this.UnpBTN = new HuaweiUnlocker.UI.NButton(); this.FlashUpdAppBTN = new HuaweiUnlocker.UI.NButton(); - this.EraseDA = new HuaweiUnlocker.UI.NButton(); this.SelPth = new HuaweiUnlocker.UI.NButton(); this.Selecty2 = new HuaweiUnlocker.UI.NButton(); this.Selecty3 = new HuaweiUnlocker.UI.NButton(); @@ -269,7 +268,6 @@ private void InitializeComponent() this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(38)))), ((int)(((byte)(49))))); this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel1.Controls.Add(this.EraseDA); this.panel1.Controls.Add(this.SelPth); this.panel1.Controls.Add(this.PatXm); this.panel1.Controls.Add(this.Selecty2); @@ -518,9 +516,9 @@ private void InitializeComponent() this.ACTBOX.Controls.Add(this.SLDEV); this.ACTBOX.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold); this.ACTBOX.ForeColor = System.Drawing.Color.Cornsilk; - this.ACTBOX.Location = new System.Drawing.Point(6, 434); + this.ACTBOX.Location = new System.Drawing.Point(6, 418); this.ACTBOX.Name = "ACTBOX"; - this.ACTBOX.Size = new System.Drawing.Size(720, 151); + this.ACTBOX.Size = new System.Drawing.Size(720, 134); this.ACTBOX.TabIndex = 20; this.ACTBOX.TabStop = false; this.ACTBOX.Text = "Action"; @@ -733,41 +731,41 @@ private void InitializeComponent() this.PARTLIST.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(38)))), ((int)(((byte)(49))))); this.PARTLIST.BorderStyle = System.Windows.Forms.BorderStyle.None; this.PARTLIST.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Sunken; - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopCenter; - dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(42)))), ((int)(((byte)(80))))); - dataGridViewCellStyle10.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.Menu; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(42)))), ((int)(((byte)(80))))); - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.PARTLIST.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopCenter; + dataGridViewCellStyle37.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(42)))), ((int)(((byte)(80))))); + dataGridViewCellStyle37.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); + dataGridViewCellStyle37.ForeColor = System.Drawing.SystemColors.Menu; + dataGridViewCellStyle37.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle37.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(42)))), ((int)(((byte)(80))))); + dataGridViewCellStyle37.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.PARTLIST.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle37; this.PARTLIST.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.PARTLIST.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.P, this.O, this.L}); - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(44)))), ((int)(((byte)(62)))), ((int)(((byte)(80))))); - dataGridViewCellStyle11.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); - dataGridViewCellStyle11.ForeColor = System.Drawing.Color.Snow; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(47)))), ((int)(((byte)(60))))); - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.PARTLIST.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle38.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(44)))), ((int)(((byte)(62)))), ((int)(((byte)(80))))); + dataGridViewCellStyle38.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); + dataGridViewCellStyle38.ForeColor = System.Drawing.Color.Snow; + dataGridViewCellStyle38.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle38.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(47)))), ((int)(((byte)(60))))); + dataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.PARTLIST.DefaultCellStyle = dataGridViewCellStyle38; this.PARTLIST.Dock = System.Windows.Forms.DockStyle.Fill; this.PARTLIST.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(38)))), ((int)(((byte)(49))))); this.PARTLIST.ImeMode = System.Windows.Forms.ImeMode.Close; this.PARTLIST.Location = new System.Drawing.Point(3, 3); this.PARTLIST.Name = "PARTLIST"; this.PARTLIST.ReadOnly = true; - dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(47)))), ((int)(((byte)(60))))); - dataGridViewCellStyle12.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); - dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.Info; - dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle12.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(47)))), ((int)(((byte)(60))))); - dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.PARTLIST.RowHeadersDefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle39.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle39.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(47)))), ((int)(((byte)(60))))); + dataGridViewCellStyle39.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); + dataGridViewCellStyle39.ForeColor = System.Drawing.SystemColors.Info; + dataGridViewCellStyle39.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle39.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(47)))), ((int)(((byte)(60))))); + dataGridViewCellStyle39.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.PARTLIST.RowHeadersDefaultCellStyle = dataGridViewCellStyle39; this.PARTLIST.RowHeadersVisible = false; this.PARTLIST.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders; this.PARTLIST.RowTemplate.ReadOnly = true; @@ -1114,40 +1112,40 @@ private void InitializeComponent() this.KirinFiles.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(38)))), ((int)(((byte)(49))))); this.KirinFiles.BorderStyle = System.Windows.Forms.BorderStyle.None; this.KirinFiles.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Sunken; - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopCenter; - dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(42)))), ((int)(((byte)(80))))); - dataGridViewCellStyle7.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.Menu; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(42)))), ((int)(((byte)(80))))); - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.KirinFiles.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle40.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopCenter; + dataGridViewCellStyle40.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(42)))), ((int)(((byte)(80))))); + dataGridViewCellStyle40.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); + dataGridViewCellStyle40.ForeColor = System.Drawing.SystemColors.Menu; + dataGridViewCellStyle40.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle40.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(42)))), ((int)(((byte)(80))))); + dataGridViewCellStyle40.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.KirinFiles.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle40; this.KirinFiles.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.KirinFiles.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn3}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(44)))), ((int)(((byte)(62)))), ((int)(((byte)(80))))); - dataGridViewCellStyle8.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); - dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Snow; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(47)))), ((int)(((byte)(60))))); - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.KirinFiles.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle41.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle41.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(44)))), ((int)(((byte)(62)))), ((int)(((byte)(80))))); + dataGridViewCellStyle41.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); + dataGridViewCellStyle41.ForeColor = System.Drawing.Color.Snow; + dataGridViewCellStyle41.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle41.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(47)))), ((int)(((byte)(60))))); + dataGridViewCellStyle41.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.KirinFiles.DefaultCellStyle = dataGridViewCellStyle41; this.KirinFiles.Dock = System.Windows.Forms.DockStyle.Bottom; this.KirinFiles.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(38)))), ((int)(((byte)(49))))); this.KirinFiles.ImeMode = System.Windows.Forms.ImeMode.Close; this.KirinFiles.Location = new System.Drawing.Point(0, 132); this.KirinFiles.Name = "KirinFiles"; this.KirinFiles.ReadOnly = true; - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(47)))), ((int)(((byte)(60))))); - dataGridViewCellStyle9.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.Info; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(47)))), ((int)(((byte)(60))))); - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.KirinFiles.RowHeadersDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle42.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle42.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(47)))), ((int)(((byte)(60))))); + dataGridViewCellStyle42.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold); + dataGridViewCellStyle42.ForeColor = System.Drawing.SystemColors.Info; + dataGridViewCellStyle42.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle42.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(47)))), ((int)(((byte)(60))))); + dataGridViewCellStyle42.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.KirinFiles.RowHeadersDefaultCellStyle = dataGridViewCellStyle42; this.KirinFiles.RowHeadersVisible = false; this.KirinFiles.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders; this.KirinFiles.RowTemplate.ReadOnly = true; @@ -1652,7 +1650,7 @@ private void InitializeComponent() this.SLDEV.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(38)))), ((int)(((byte)(49))))); this.SLDEV.Controls.Add(this.DEVICER); this.SLDEV.ForeColor = System.Drawing.Color.Cornsilk; - this.SLDEV.Location = new System.Drawing.Point(5, 24); + this.SLDEV.Location = new System.Drawing.Point(6, 24); this.SLDEV.Name = "SLDEV"; this.SLDEV.Size = new System.Drawing.Size(706, 57); this.SLDEV.TabIndex = 19; @@ -1799,12 +1797,12 @@ private void InitializeComponent() this.BoardU.Cursor = System.Windows.Forms.Cursors.Hand; this.BoardU.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.BoardU.ForeColor = System.Drawing.Color.White; - this.BoardU.Location = new System.Drawing.Point(4, 95); + this.BoardU.Location = new System.Drawing.Point(11, 86); this.BoardU.Margin = new System.Windows.Forms.Padding(2); this.BoardU.Name = "BoardU"; this.BoardU.RippleColor = System.Drawing.Color.Beige; this.BoardU.RoundingEnable = false; - this.BoardU.Size = new System.Drawing.Size(707, 39); + this.BoardU.Size = new System.Drawing.Size(696, 39); this.BoardU.TabIndex = 17; this.BoardU.Text = "Download And Unlock"; this.BoardU.TextHover = null; @@ -1868,34 +1866,6 @@ private void InitializeComponent() this.FlashUpdAppBTN.UseZoomEffectOnHover = false; this.FlashUpdAppBTN.Click += new System.EventHandler(this.FlashUpdAppBTN_Click); // - // EraseDA - // - this.EraseDA.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(47)))), ((int)(((byte)(70))))); - this.EraseDA.BackColorAdditional = System.Drawing.Color.Gray; - this.EraseDA.BackColorGradientEnabled = false; - this.EraseDA.BackColorGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal; - this.EraseDA.BorderColor = System.Drawing.Color.Tomato; - this.EraseDA.BorderColorEnabled = false; - this.EraseDA.BorderColorOnHover = System.Drawing.Color.Tomato; - this.EraseDA.BorderColorOnHoverEnabled = false; - this.EraseDA.Cursor = System.Windows.Forms.Cursors.Hand; - this.EraseDA.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.EraseDA.ForeColor = System.Drawing.Color.White; - this.EraseDA.Location = new System.Drawing.Point(6, 141); - this.EraseDA.Margin = new System.Windows.Forms.Padding(2); - this.EraseDA.Name = "EraseDA"; - this.EraseDA.RippleColor = System.Drawing.Color.Black; - this.EraseDA.RoundingEnable = false; - this.EraseDA.Size = new System.Drawing.Size(339, 39); - this.EraseDA.TabIndex = 22; - this.EraseDA.Text = "Erase UserData"; - this.EraseDA.TextHover = null; - this.EraseDA.UseDownPressEffectOnClick = false; - this.EraseDA.UseRippleEffect = true; - this.EraseDA.UseVisualStyleBackColor = false; - this.EraseDA.UseZoomEffectOnHover = false; - this.EraseDA.Click += new System.EventHandler(this.EraseDA_Click); - // // SelPth // this.SelPth.AutoSize = true; @@ -2554,7 +2524,6 @@ private void InitializeComponent() private UI.NButton BoardU; private System.Windows.Forms.Button HomeeBTN; private UI.NButton UnlockFrp; - private UI.NButton EraseDA; private UI.NButton Flash; private UI.NButton DUMPALL; private System.Windows.Forms.Button QcomPartsBTN; diff --git a/HuaweiUnlock/Window.cs b/HuaweiUnlock/Window.cs index e19cef6..4b1653c 100644 --- a/HuaweiUnlock/Window.cs +++ b/HuaweiUnlock/Window.cs @@ -138,7 +138,6 @@ public void Lang() ReadPA.Text = Language.Get("ReadPA"); WritePA.Text = Language.Get("WritePA"); ErasePA.Text = Language.Get("ErasePA"); - EraseDA.Text = Language.Get("EraseDA"); FrpHISIUnlock.Text = UnlockFrp.Text = Language.Get("UnlockBTN"); HomeTag.Text = Language.Get("HomeTag"); UnlockTag.Text = Language.Get("UnlockTag"); @@ -551,25 +550,13 @@ private void FrBTN_Click(object sender, EventArgs e) DIAG.FACTORY_RESET_MNF(1); } - private void EraseDA_Click(object sender, EventArgs e) - { - if (!CheckDevice(AutoLdr.Checked ? "" : LoaderBox.Text, PORTBOX.Text)) return; - DialogResult dialogResult = System.Windows.Forms.MessageBox.Show(Language.Get("AreY") + Temp, "WARNING: CAN CAUSE DAMAGE", MessageBoxButtons.YesNo); - if (dialogResult == DialogResult.Yes) - { - LOG(0, "ErPS", Temp); - Erase("userdata", AutoLdr.Checked ? "" : LoaderBox.Text); - Progress(100); - } - } - private void RdHISIinfo_Click(object sender, EventArgs e) { Tab.Enabled = false; try { LOG(-1, "=============READ INFO (FASTBOOT)============="); - if (HISI.ReadInfo()) + if (HISI.ReadInfo(60)) { BuildIdTxt.Text = HISI.AVER; ModelIdTxt.Text = HISI.MODEL; @@ -592,7 +579,7 @@ private void FBLstHISI_Click(object sender, EventArgs e) LOG(-1, "=============> VALUE: " + (EnDisFBLOCK.Checked ? 0 : 1) + " <============="); try { - if (HISI.ReadInfo()) + if (HISI.ReadInfo(60)) { BuildIdTxt.Text = HISI.AVER; ModelIdTxt.Text = HISI.MODEL; @@ -619,7 +606,7 @@ private void HISI_board_FB_Click(object sender, EventArgs e) LOG(-1, "=============REWRITE KEY (FASTBOOT)============="); LOG(-1, "=============> KEY: " + BLkeyHI.Text + " <============="); LOG(-1, "=============> LENGHT: 16 <============="); - if (HISI.ReadInfo()) + if (HISI.ReadInfo(60)) { BuildIdTxt.Text = HISI.AVER; ModelIdTxt.Text = HISI.MODEL; diff --git a/HuaweiUnlock/Window.resx b/HuaweiUnlock/Window.resx index b4d6d90..d51f752 100644 --- a/HuaweiUnlock/Window.resx +++ b/HuaweiUnlock/Window.resx @@ -117,19 +117,19 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + True - + True - + True - + True - + True