mirror of
https://github.com/bkerler/mtkclient.git
synced 2024-11-14 19:25:05 -05:00
mtk_class: Use serial_handshake if serialportname provided
- Fixes: EP_OUT = self.cdc.EP_OUT.write ^^^^^^^^^^^^^^^ AttributeError: 'serial_class' object has no attribute 'EP_OUT'
This commit is contained in:
parent
31819b814d
commit
9e54803fb5
1 changed files with 4 additions and 1 deletions
|
@ -202,7 +202,10 @@ class Mtk(metaclass=LogBase):
|
|||
self.config.payloadfile = os.path.join(self.pathconfig.get_payloads_path(),
|
||||
self.config.chipconfig.loader)
|
||||
if plt.runpayload(filename=self.config.payloadfile):
|
||||
mtk.port.run_handshake()
|
||||
if mtk.serialportname:
|
||||
mtk.port.serial_handshake()
|
||||
else:
|
||||
mtk.port.handshake()
|
||||
return mtk
|
||||
else:
|
||||
self.error("Error on running kamakiri payload")
|
||||
|
|
Loading…
Reference in a new issue