Fix issue with buffer write flash (filename being none instead of "")

This commit is contained in:
Bjoern Kerler 2024-09-17 19:14:20 +02:00
parent f8272a402e
commit 8fff2aba85
No known key found for this signature in database
GPG key ID: A3E0FAF79F2F4578
3 changed files with 4 additions and 4 deletions
mtkclient/Library/DA
legacy/extension
mtk_da_handler.py
xml/extension

View file

@ -195,7 +195,7 @@ class LegacyExt(metaclass=LogBase):
return False, writedata
if self.legacy.writeflash(addr=partition.sector * self.mtk.daloader.daconfig.pagesize,
length=len(writedata),
filename=None, wdata=writedata, parttype="user", display=True):
filename="", wdata=writedata, parttype="user", display=True):
return True, "Successfully wrote seccfg."
return False, "Error on writing seccfg config to flash."

View file

@ -540,7 +540,7 @@ class DaHandler(metaclass=LogBase):
wsize = min(sectorsize, 0x200000)
if self.mtk.daloader.writeflash(addr=sector * self.config.pagesize,
length=wsize,
filename=None,
filename="",
wdata=wipedata[:wsize],
parttype="user"):
print(
@ -584,7 +584,7 @@ class DaHandler(metaclass=LogBase):
wsize = min(sectorsize, 0x200000)
if self.mtk.daloader.writeflash(addr=sector * self.config.pagesize,
length=wsize,
filename=None,
filename="",
wdata=wipedata[:wsize],
parttype=parttype):
print(

View file

@ -711,7 +711,7 @@ class XmlFlashExt(metaclass=LogBase):
return False, writedata
if self.xflash.writeflash(addr=partition.sector * self.mtk.daloader.daconfig.pagesize,
length=len(writedata),
filename=None, wdata=writedata, parttype="user", display=True):
filename="", wdata=writedata, parttype="user", display=True):
return True, "Successfully wrote seccfg."
return False, "Error on writing seccfg config to flash."