Skip to content

Commit

Permalink
Support hex digits in projid
Browse files Browse the repository at this point in the history
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").
  • Loading branch information
mkropat committed May 23, 2024
1 parent 8573eba commit 6e8f1cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion edlclient/Library/Modules/oneplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def __init__(self, fh, projid:str="18825", serial=123456, ATOBuild=0, Flash_Mode
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:
Expand Down

0 comments on commit 6e8f1cf

Please sign in to comment.