From 6e8f1cf7e661f11891f3bf11484a518461c2f882 Mon Sep 17 00:00:00 2001 From: Michael Kropat Date: Wed, 22 May 2024 23:12:11 -0400 Subject: [PATCH] Support hex digits in projid Most of the deviceconfig keys have only 0-9 digits, however the format is actually hex, as evidenced by a handful of entries (for example: OP9 Pro TMO / "2085A"). --- edlclient/Library/Modules/oneplus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edlclient/Library/Modules/oneplus.py b/edlclient/Library/Modules/oneplus.py index c87daa7..1054900 100755 --- a/edlclient/Library/Modules/oneplus.py +++ b/edlclient/Library/Modules/oneplus.py @@ -149,7 +149,7 @@ class oneplus(metaclass=LogBase): data = self.fh.cmd_read_buffer(lun, rpartition.sector, 1, False) value = data.data[24:24 + 5] try: - test = int(value.decode('utf-8')) + test = int(value.decode('utf-8'), 16) self.info("Oneplus protection with prjid %d detected" % test) projid = value.decode('utf-8') except: