bkerler / mtkclient

MTK reverse engineering and flash tool
GNU General Public License v3.0
2.71k stars 528 forks source link

Damaged Partition? Any solution? #1160

Closed weskerty closed 2 months ago

weskerty commented 2 months ago

Preloader - CPU: MT6765/MT8768t(Helio P35/G35) Preloader - HW version: 0x0 Preloader - WDT: 0x10007000 Preloader - Uart: 0x11002000 Preloader - Brom payload addr: 0x100a00 Preloader - DA payload addr: 0x201000 Preloader - CQ_DMA addr: 0x10212000 Preloader - Var1: 0x25 Preloader - Disabling Watchdog... Preloader - HW code: 0x766 Preloader - Target config: 0x0 Preloader - SBC enabled: False Preloader - SLA enabled: False Preloader - DAA enabled: False Preloader - SWJTAG enabled: False Preloader - EPP_PARAM at 0x600 after EMMC_BOOT/SDMMC_BOOT: False Preloader - Root cert required: False Preloader - Mem read auth: False Preloader - Mem write auth: False Preloader - Cmd 0xC8 blocked: False Preloader - Get Target info Preloader - BROM mode detected. Preloader - HW subcode: 0x8a00 Preloader - HW Ver: 0xca00 Preloader - SW Ver: 0x0 Preloader - ME_ID: 17D17201963D3BB1F67CDDD45431DED3 Preloader - SOC_ID: 63224E158703AD31CFA76039EE9C4C8EE56CF67347F32CFBA94641AE3BD9F22C DaHandler - Device is unprotected. DaHandler - Device is in BROM-Mode. Bypassing security. DaHandler - Using supplied preloader. Skipping exploitation! DAXFlash - Uploading xflash stage 1 from MTK_DA_V5.bin XFlashExt - Patching da1 ... Mtk - Patched "Patched loader msg" in preloader Mtk - Patched "hash_check" in preloader Mtk - Patched "Patched loader msg" in preloader Mtk - Patched "get_vfy_policy" in preloader XFlashExt - Patching da2 ... XFlashExt - Security check patched XFlashExt - DA version anti-rollback patched XFlashExt - SBC patched to be disabled XFlashExt - Register read/write not allowed patched DAXFlash - Successfully uploaded stage 1, jumping .. Preloader - Jumping to 0x200000 Preloader - Jumping to 0x200000: ok. DAXFlash - Successfully received DA sync DAXFlash - Sending emi data ... DAXFlash - DRAM setup passed. DAXFlash - Sending emi data succeeded. DAXFlash - Uploading stage 2... DAXFlash - Upload data was accepted. Jumping to stage 2... DAXFlash - Boot to succeeded. DAXFlash - Successfully uploaded stage 2 DAXFlash - DA SLA is disabled DAXFlash - EMMC FWVer: 0x0 DAXFlash - EMMC ID: SLD128 DAXFlash - EMMC CID: 880103534c443132385505ac1ab048b5 DAXFlash - EMMC Boot1 Size: 0x400000 DAXFlash - EMMC Boot2 Size: 0x400000 DAXFlash - EMMC GP1 Size: 0x0 DAXFlash - EMMC GP2 Size: 0x0 DAXFlash - EMMC GP3 Size: 0x0 DAXFlash - EMMC GP4 Size: 0x0 DAXFlash - EMMC RPMB Size: 0x400000 DAXFlash - EMMC USER Size: 0x1ccf000000 DAXFlash - HW-CODE : 0x766 DAXFlash - HWSUB-CODE : 0x8A00 DAXFlash - HW-VERSION : 0xCA00 DAXFlash - SW-VERSION : 0x0 DAXFlash - CHIP-EVOLUTION : 0x0 DAXFlash - DA-VERSION : 1.0 DAXFlash - Extensions were accepted. Jumping to extensions... DAXFlash DAXFlash - [LIB]: ←[31mStage was't executed. Maybe dram issue ?.←[0m DAXFlash DAXFlash - [LIB]: ←[33mDA Extensions failed to enable←[0m DaHandler - Writing offset 0x128000 with length 0x200000

DAXFlash - [LIB]: ←[33mDA Extensions failed to enable←[0m Traceback (most recent call last): File "F:\Escritorio\mtkclient\mtk.py", line 1000, in mtk = Main(args).run(parser) ^^^^^^^^^^^^^^^^^^^^^^ File "F:\Escritorio\mtkclient\mtkclient\Library\mtk_main.py", line 664, in run da_handler.handle_da_cmds(mtk, cmd, self.args) File "F:\Escritorio\mtkclient\mtkclient\Library\DA\mtk_da_handler.py", line 835, in handle_da_cmds v = mtk.daloader.seccfg(args.flag) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Escritorio\mtkclient\mtkclient\Library\DA\mtk_daloader.py", line 392, in seccfg return self.xft.seccfg(lockflag) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Escritorio\mtkclient\mtkclient\Library\DA\xflash\extension\xflash.py", line 580, in seccfg data, guid_gpt = self.xflash.partition.get_gpt(self.mtk.config.gpt_settings, "user") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Escritorio\mtkclient\mtkclient\Library\partition.py", line 70, in get_gpt data = self.readflash(addr=0, length=2 * self.config.pagesize, filename="", parttype=parttype, display=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Escritorio\mtkclient\mtkclient\Library\DA\xflash\xflash_lib.py", line 825, in readflash self.get_packet_length() File "F:\Escritorio\mtkclient\mtkclient\Library\DA\xflash\xflash_lib.py", line 730, in get_packet_length resp = self.send_devctrl(self.Cmd.GET_PACKET_LENGTH) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\Escritorio\mtkclient\mtkclient\Library\DA\xflash\xflash_lib.py", line 184, in send_devctrl status[0] = self.status() ^^^^^^^^^^^^^ File "F:\Escritorio\mtkclient\mtkclient\Library\DA\xflash\xflash_lib.py", line 135, in status magic, datatype, length = unpack("<III", hdr) ^^^^^^^^^^^^^^^^^^^ struct.error: unpack requires a buffer of 12 bytes

bkerler commented 2 months ago

Duplicate of #1152