mirror of
https://github.com/bkerler/edl.git
synced 2024-11-24 16:37:51 -05:00
Additional unlock fixes
This commit is contained in:
parent
571ee4ed89
commit
b97f670433
3 changed files with 9 additions and 3 deletions
|
@ -23,9 +23,12 @@ class generic(metaclass=LogBase):
|
|||
if res[0]:
|
||||
lun = res[1]
|
||||
rpartition = res[2]
|
||||
if rpartition.sectors <= (0x8000//self.cfg.SECTOR_SIZE_IN_BYTES):
|
||||
offsettopatch = 0x7FFF
|
||||
sector, offset = self.fh.calc_offset(rpartition.sector, offsettopatch)
|
||||
else:
|
||||
offsettopatch = 0x7FFFF
|
||||
sector = rpartition.sector + (offsettopatch // self.fh.cfg.SECTOR_SIZE_IN_BYTES)
|
||||
offset = offsettopatch % self.fh.cfg.SECTOR_SIZE_IN_BYTES
|
||||
sector, offset = self.fh.calc_offset(rpartition.sector, offsettopatch)
|
||||
if enable:
|
||||
value = 0x1
|
||||
else:
|
||||
|
|
|
@ -98,3 +98,5 @@ class modules(metaclass=LogBase):
|
|||
self.error("Unknown mode given. Available are: enable, disable.")
|
||||
return False
|
||||
return self.generic.oem_unlock(enable)
|
||||
else:
|
||||
print("Valid options are: oemunlock [enable,disable]")
|
||||
|
|
|
@ -4,6 +4,7 @@ pyserial>=3.4
|
|||
docopt>=0.6.2
|
||||
pylzma>=0.5.0
|
||||
pycryptodome
|
||||
pycryptodomex
|
||||
lxml>=4.6.1
|
||||
colorama
|
||||
usb
|
||||
|
|
Loading…
Reference in a new issue