diff --git a/mtkclient/Library/DA/xflash/extension/xflash.py b/mtkclient/Library/DA/xflash/extension/xflash.py index e833dd90..0d91925a 100755 --- a/mtkclient/Library/DA/xflash/extension/xflash.py +++ b/mtkclient/Library/DA/xflash/extension/xflash.py @@ -313,14 +313,20 @@ def cmd(self, cmd): return False def custom_read(self, addr, length): - if self.cmd(XCmd.CUSTOM_READ): - self.xsend(data=addr, is64bit=True) - self.xsend(length) - data = self.xread() - status = self.status() - if status == 0: - return data - return b"" + data = bytearray() + pos = 0 + while pos