From 416eba82b4fbb624298f1a7ca2075dcfc75114d6 Mon Sep 17 00:00:00 2001 From: Bjoern Kerler Date: Wed, 14 Jun 2023 23:56:34 +0200 Subject: [PATCH] Add seccfg V3 check if already locked / unlocked --- mtkclient/Library/seccfg.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mtkclient/Library/seccfg.py b/mtkclient/Library/seccfg.py index c158a6b..769f9a7 100644 --- a/mtkclient/Library/seccfg.py +++ b/mtkclient/Library/seccfg.py @@ -243,7 +243,6 @@ class seccfgV3(metaclass=LogBase): self.seccfg_enc_len = 0x01000000 seccfg_attr_new = SECCFG_ATTR.ATTR_DEFAULT - """ if lockflag == "lock" and self.seccfg_attr != SECCFG_ATTR.ATTR_UNLOCK: return False, ("Can't find lock state, current (%#x)" % self.seccfg_attr) elif lockflag == "unlock" and self.seccfg_attr != SECCFG_ATTR.ATTR_DEFAULT \ @@ -252,7 +251,7 @@ class seccfgV3(metaclass=LogBase): and self.seccfg_attr != SECCFG_ATTR.ATTR_VERIFIED \ and self.seccfg_attr != SECCFG_ATTR.ATTR_LOCK: return False, ("Can't find unlock state, current (%#x)" % self.seccfg_attr) - """ + data = bytearray() wf = BytesIO(data) wf.write(self.info)