Repository: bkerler/mtkclient

Issue #1167: MTKClient crashed when trying to unlock bootloader.
Created: 2024-08-25T01:52:50Z
I'm trying to unlock my Redmi 6A. Because I can't access my windows PC, I use Debian instead.
python threw me this error. I have tried install libusb-1.0-0-dev, but still.
$ python3 mtk.py da seccfg unlock
MTK Flash/Exploit Client Public V2.0.1 (c) B.Kerler 2018-2024

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
XFlashExt - Detected V4 Lockstate
Sej - HACC init
Sej - HACC run
Sej - HACC terminate
Sej - HACC init
Sej - HACC run
Sej - HACC terminate
Sej - HACC init
Sej - HACC run
Sej - HACC terminate
Sej - HACC init
Sej - HACC run
Sej - HACC terminate
Traceback (most recent call last):
  File "/home/arkyuki/mtkclient/mtk.py", line 1016, in <module>
    main()
  File "/home/arkyuki/mtkclient/mtk.py", line 1012, in main
    mtk = Main(args).run(parser)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arkyuki/mtkclient/mtkclient/Library/mtk_main.py", line 664, in run
    da_handler.handle_da_cmds(mtk, cmd, self.args)
  File "/home/arkyuki/mtkclient/mtkclient/Library/DA/mtk_da_handler.py", line 877, in handle_da_cmds
    v = mtk.daloader.seccfg(args.flag)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arkyuki/mtkclient/mtkclient/Library/DA/mtk_daloader.py", line 392, in seccfg
    return self.xft.seccfg(lockflag)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arkyuki/mtkclient/mtkclient/Library/DA/xflash/extension/xflash.py", line 654, in seccfg
    if self.xflash.writeflash(addr=partition.sector * self.mtk.daloader.daconfig.pagesize,
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arkyuki/mtkclient/mtkclient/Library/DA/xflash/xflash_lib.py", line 938, in writeflash
    if os.path.exists(filename):
       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen genericpath>", line 19, in exists
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Duplicate issue #1191: Error in arch linux
Created: 2024-09-06T08:39:13Z
Traceback (most recent call last):
File "/home/atharv2951/Desktop/mtkclient/mtk.py", line 1016, in 
main()
File "/home/atharv2951/Desktop/mtkclient/mtk.py", line 1012, in main
mtk = Main(args).run(parser)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/atharv2951/Desktop/mtkclient/mtkclient/Library/mtk_main.py", line 664, in run
da_handler.handle_da_cmds(mtk, cmd, self.args)
File "/home/atharv2951/Desktop/mtkclient/mtkclient/Library/DA/mtk_da_handler.py", line 877, in handle_da_cmds
v = mtk.daloader.seccfg(args.flag)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/atharv2951/Desktop/mtkclient/mtkclient/Library/DA/mtk_daloader.py", line 392, in seccfg
return self.xft.seccfg(lockflag)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/atharv2951/Desktop/mtkclient/mtkclient/Library/DA/xflash/extension/xflash.py", line 654, in seccfg
if self.xflash.writeflash(addr=partition.sector * self.mtk.daloader.daconfig.pagesize,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/atharv2951/Desktop/mtkclient/mtkclient/Library/DA/xflash/xflash_lib.py", line 938, in writeflash
if os.path.exists(filename):
^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 19, in exists
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Closing comment (2024-09-06T09:26:33Z): duplicate of #1167