mirror of
https://github.com/bkerler/edl.git
synced 2025-02-17 12:10:38 -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]:
|
if res[0]:
|
||||||
lun = res[1]
|
lun = res[1]
|
||||||
rpartition = res[2]
|
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
|
offsettopatch = 0x7FFFF
|
||||||
sector = rpartition.sector + (offsettopatch // self.fh.cfg.SECTOR_SIZE_IN_BYTES)
|
sector, offset = self.fh.calc_offset(rpartition.sector, offsettopatch)
|
||||||
offset = offsettopatch % self.fh.cfg.SECTOR_SIZE_IN_BYTES
|
|
||||||
if enable:
|
if enable:
|
||||||
value = 0x1
|
value = 0x1
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -98,3 +98,5 @@ class modules(metaclass=LogBase):
|
||||||
self.error("Unknown mode given. Available are: enable, disable.")
|
self.error("Unknown mode given. Available are: enable, disable.")
|
||||||
return False
|
return False
|
||||||
return self.generic.oem_unlock(enable)
|
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
|
docopt>=0.6.2
|
||||||
pylzma>=0.5.0
|
pylzma>=0.5.0
|
||||||
pycryptodome
|
pycryptodome
|
||||||
|
pycryptodomex
|
||||||
lxml>=4.6.1
|
lxml>=4.6.1
|
||||||
colorama
|
colorama
|
||||||
usb
|
usb
|
||||||
|
|
Loading…
Reference in a new issue