From 054dafacaa8a940d4ab1a106a2229ccda22f0a93 Mon Sep 17 00:00:00 2001 From: Bjoern Kerler Date: Wed, 12 Jul 2023 13:04:04 +0200 Subject: [PATCH] Update mtk_gui --- mtk_gui | 4 +++- mtkclient/Library/Port.py | 3 --- mtkclient/Library/hwcrypto.py | 3 --- mtkclient/Library/hwcrypto_dxcc.py | 4 ---- mtkclient/Library/hwcrypto_gcpu.py | 3 --- mtkclient/Library/legacy_ext.py | 4 ---- mtkclient/Library/meta.py | 3 --- mtkclient/Library/mtk_dalegacy.py | 3 --- mtkclient/Library/mtk_daxflash.py | 14 +++++--------- mtkclient/Library/xflash_ext.py | 4 ---- 10 files changed, 8 insertions(+), 37 deletions(-) diff --git a/mtk_gui b/mtk_gui index b194d54..c1cf0e0 100755 --- a/mtk_gui +++ b/mtk_gui @@ -504,13 +504,15 @@ class MainWindow(QMainWindow): self.ui.connectInfo.setHidden(True) self.ui.partProgress.setHidden(False) self.ui.fullProgress.setHidden(False) - self.ui.tabWidget.setHidden(False) self.initread() self.initkeys() self.initunlock() self.initerase() self.initwrite() self.getpartitions() + self.ui.tabWidget.setCurrentIndex(0) + self.ui.tabWidget.update() + self.ui.tabWidget.setHidden(False) else: if 'cantConnect' in phoneInfo: diff --git a/mtkclient/Library/Port.py b/mtkclient/Library/Port.py index 40588d7..d51a449 100755 --- a/mtkclient/Library/Port.py +++ b/mtkclient/Library/Port.py @@ -22,9 +22,6 @@ class Port(metaclass=LogBase): def __init__(self, mtk, portconfig, serialportname:str=None, loglevel=logging.INFO): self.__logger = logsetup(self, self.__logger, loglevel, mtk.config.gui) - self.info = self.__logger.info - self.debug = self.__logger.debug - self.error = self.__logger.error self.config = mtk.config self.mtk = mtk self.serialportname = None diff --git a/mtkclient/Library/hwcrypto.py b/mtkclient/Library/hwcrypto.py index e6611ac..8a3b148 100755 --- a/mtkclient/Library/hwcrypto.py +++ b/mtkclient/Library/hwcrypto.py @@ -32,9 +32,6 @@ class crypto_setup: class hwcrypto(metaclass=LogBase): def __init__(self, setup, loglevel=logging.INFO, gui: bool = False): self.__logger = logsetup(self, self.__logger, loglevel, gui) - self.info = self.__logger.info - self.error = self.__logger.error - self.warning = self.__logger.warning self.dxcc = dxcc(setup, loglevel, gui) self.gcpu = GCpu(setup, loglevel, gui) self.sej = sej(setup, loglevel) diff --git a/mtkclient/Library/hwcrypto_dxcc.py b/mtkclient/Library/hwcrypto_dxcc.py index c2c1322..0110bdf 100755 --- a/mtkclient/Library/hwcrypto_dxcc.py +++ b/mtkclient/Library/hwcrypto_dxcc.py @@ -1076,10 +1076,6 @@ class dxcc(metaclass=LogBase): self.writemem = setup.writemem self.da_payload_addr = setup.da_payload_addr - self.__logger = self.__logger - self.info = self.__logger.info - self.error = self.__logger.error - self.warning = self.__logger.warning self.reg = dxcc_reg(setup) def tzcc_clk(self, value): diff --git a/mtkclient/Library/hwcrypto_gcpu.py b/mtkclient/Library/hwcrypto_gcpu.py index 1fddd67..232be39 100755 --- a/mtkclient/Library/hwcrypto_gcpu.py +++ b/mtkclient/Library/hwcrypto_gcpu.py @@ -195,9 +195,6 @@ def xor_data(a: bytearray, b: bytearray, length=None): class GCpu(metaclass=LogBase): def __init__(self, setup, loglevel=logging.INFO, gui: bool = False): self.__logger = logsetup(self, self.__logger, loglevel, gui) - self.info = self.__logger.info - self.error = self.__logger.error - self.warning = self.__logger.warning self.read32 = setup.read32 self.write32 = setup.write32 self.reg = GCpuReg(setup) diff --git a/mtkclient/Library/legacy_ext.py b/mtkclient/Library/legacy_ext.py index 741d351..14d989f 100644 --- a/mtkclient/Library/legacy_ext.py +++ b/mtkclient/Library/legacy_ext.py @@ -22,10 +22,6 @@ class legacyext(metaclass=LogBase): def __init__(self, mtk, legacy, loglevel): self.pathconfig = pathconfig() self.__logger = logsetup(self, self.__logger, loglevel, mtk.config.gui) - self.info = self.__logger.info - self.debug = self.__logger.debug - self.error = self.__logger.error - self.warning = self.__logger.warning self.mtk = mtk self.loglevel = loglevel self.__logger = self.__logger diff --git a/mtkclient/Library/meta.py b/mtkclient/Library/meta.py index 44cc341..963f3a2 100644 --- a/mtkclient/Library/meta.py +++ b/mtkclient/Library/meta.py @@ -20,9 +20,6 @@ class META(metaclass=LogBase): def __init__(self, mtk, loglevel=logging.INFO): self.mtk = mtk self.__logger = logsetup(self, self.__logger, loglevel, mtk.config.gui) - self.info = self.__logger.info - self.debug = self.__logger.debug - self.error = self.__logger.error self.gcpu = None self.config = mtk.config self.display = True diff --git a/mtkclient/Library/mtk_dalegacy.py b/mtkclient/Library/mtk_dalegacy.py index fc003ea..0a02f05 100755 --- a/mtkclient/Library/mtk_dalegacy.py +++ b/mtkclient/Library/mtk_dalegacy.py @@ -836,9 +836,6 @@ class DALegacy(metaclass=LogBase): def __init__(self, mtk, daconfig, loglevel=logging.INFO): self.__logger = logsetup(self, self.__logger, loglevel, mtk.config.gui) - self.debug = self.debug - self.error = self.error - self.info = self.info self.emmc = None self.nand = None self.nor = None diff --git a/mtkclient/Library/mtk_daxflash.py b/mtkclient/Library/mtk_daxflash.py index 5efcba9..47a459a 100755 --- a/mtkclient/Library/mtk_daxflash.py +++ b/mtkclient/Library/mtk_daxflash.py @@ -139,10 +139,6 @@ class DAXFlash(metaclass=LogBase): def __init__(self, mtk, daconfig, loglevel=logging.INFO): self.__logger = logsetup(self, self.__logger, loglevel, mtk.config.gui) - self.info = self.__logger.info - self.debug = self.__logger.debug - self.error = self.__logger.error - self.warning = self.__logger.warning self.mtk = mtk self.loglevel = loglevel self.daext = False @@ -542,11 +538,11 @@ class DAXFlash(metaclass=LogBase): data[:(5 * 2)]) status = self.status() if status == 0: - self.info("HW-CODE : 0x%X", chipid.hw_code) - self.info("HWSUB-CODE : 0x%X", chipid.hw_sub_code) - self.info("HW-VERSION : 0x%X", chipid.hw_version) - self.info("SW-VERSION : 0x%X", chipid.sw_version) - self.info("CHIP-EVOLUTION : 0x%X", chipid.chip_evolution) + self.info("HW-CODE : 0x%X" % chipid.hw_code) + self.info("HWSUB-CODE : 0x%X" % chipid.hw_sub_code) + self.info("HW-VERSION : 0x%X" % chipid.hw_version) + self.info("SW-VERSION : 0x%X" % chipid.sw_version) + self.info("CHIP-EVOLUTION : 0x%X" % chipid.chip_evolution) return chipid else: self.error(f"Error on getting chip id: {self.eh.status(status)}") diff --git a/mtkclient/Library/xflash_ext.py b/mtkclient/Library/xflash_ext.py index 4b7905c..544d46c 100644 --- a/mtkclient/Library/xflash_ext.py +++ b/mtkclient/Library/xflash_ext.py @@ -43,10 +43,6 @@ class xflashext(metaclass=LogBase): def __init__(self, mtk, xflash, loglevel): self.pathconfig = pathconfig() self.__logger = logsetup(self, self.__logger, loglevel, mtk.config.gui) - self.info = self.__logger.info - self.debug = self.__logger.debug - self.error = self.__logger.error - self.warning = self.__logger.warning self.mtk = mtk self.loglevel = loglevel self.__logger = self.__logger