Merge pull request #549 from mkropat/projid-detection

Support hex digits in OnePlus projid
This commit is contained in:
Bjoern Kerler 2024-05-23 18:52:49 +02:00 committed by GitHub
commit 3e4e569cf7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: