diff --git a/mtkclient/Library/kamakiri.py b/mtkclient/Library/kamakiri.py index 4874833..9dd25bd 100755 --- a/mtkclient/Library/kamakiri.py +++ b/mtkclient/Library/kamakiri.py @@ -288,12 +288,11 @@ class Kamakiri(metaclass=LogBase): self.error(f"Error on opening {filename} for writing: {str(e)}") return False - def dump_preloader(self, length=0x80000): + def dump_preloader(self): try: filename = "" - self.mtk.port.usbwrite(pack(">I",length)) - ack = unpack(" 0: data = self.mtk.port.usbread(length) idx = data.find(b"MTK_BLOADER_INFO") if idx != -1: diff --git a/mtkclient/Library/pltools.py b/mtkclient/Library/pltools.py index 171d396..dcbb3a0 100755 --- a/mtkclient/Library/pltools.py +++ b/mtkclient/Library/pltools.py @@ -252,7 +252,7 @@ class PLTools(metaclass=LogBase): if btype == "kamakiri": self.info("Kamakiri / DA Run") if self.runpayload(filename=pfilename, ptype="kamakiri", ack=0xC1C2C3C4, offset=0): - data,filename=self.kama.dump_preloader(0x80000) + data,filename=self.kama.dump_preloader() return data, filename else: self.error("Error on sending payload: " + pfilename) @@ -260,7 +260,7 @@ class PLTools(metaclass=LogBase): elif btype == "kamakiri2" or btype is None: self.info("Kamakiri2") if self.runpayload(filename=pfilename, ptype="kamakiri2", ack=0xC1C2C3C4, offset=0): - data,filename=self.kama.dump_preloader(0x80000) + data,filename=self.kama.dump_preloader() return data, filename else: self.error("Error on sending payload: " + pfilename) diff --git a/mtkclient/payloads/generic_preloader_dump_payload.bin b/mtkclient/payloads/generic_preloader_dump_payload.bin index 215d55d..138cb20 100755 Binary files a/mtkclient/payloads/generic_preloader_dump_payload.bin and b/mtkclient/payloads/generic_preloader_dump_payload.bin differ