mirror of
https://github.com/bkerler/mtkclient.git
synced 2024-11-14 19:25:05 -05:00
Removing unused imports
Signed-off-by: Jiri Podivin <jpodivin@gmail.com>
This commit is contained in:
parent
b1da81173e
commit
5005936780
23 changed files with 18 additions and 51 deletions
|
@ -1,8 +1,6 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) B.Kerler 2018-2021
|
||||
import serial
|
||||
import serial.tools.list_ports
|
||||
import inspect
|
||||
import traceback
|
||||
from binascii import hexlify
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) B.Kerler 2018-2022
|
||||
import os.path
|
||||
import time
|
||||
import sys
|
||||
if sys.platform != "win32":
|
||||
|
@ -17,8 +16,6 @@ def _reset_input_buffer_org(self):
|
|||
import serial
|
||||
import serial.tools.list_ports
|
||||
import inspect
|
||||
import traceback
|
||||
from binascii import hexlify
|
||||
from mtkclient.Library.utils import *
|
||||
from mtkclient.Library.Connection.devicehandler import DeviceClass
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) B.Kerler 2018-2021 GPLv3 License
|
||||
import io
|
||||
import logging
|
||||
|
||||
import usb.core # pyusb
|
||||
|
@ -12,13 +11,11 @@ import traceback
|
|||
import array
|
||||
import usb.backend.libusb0
|
||||
import usb.backend.libusb1
|
||||
from struct import calcsize
|
||||
from struct import pack, calcsize
|
||||
from enum import Enum
|
||||
from binascii import hexlify
|
||||
from ctypes import c_void_p, c_int
|
||||
from mtkclient.Library.utils import *
|
||||
from struct import pack, calcsize
|
||||
import traceback
|
||||
from mtkclient.Library.Connection.devicehandler import DeviceClass
|
||||
USB_DIR_OUT = 0 # to device
|
||||
USB_DIR_IN = 0x80 # to host
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import logging
|
||||
import os
|
||||
from struct import unpack
|
||||
from mtkclient.Library.utils import LogBase, read_object, logsetup
|
||||
from mtkclient.Library.utils import LogBase, logsetup
|
||||
from mtkclient.config.payloads import pathconfig
|
||||
from mtkclient.config.brom_config import damodes
|
||||
from mtkclient.Library.utils import structhelper
|
||||
|
|
|
@ -6,7 +6,7 @@ import os
|
|||
import sys
|
||||
import logging
|
||||
from enum import Enum
|
||||
from struct import unpack, pack
|
||||
from struct import unpack
|
||||
from binascii import hexlify
|
||||
|
||||
try:
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# (c) B.Kerler 2018-2021 GPLv3 License
|
||||
import logging
|
||||
import time
|
||||
|
||||
from mtkclient.Library.utils import LogBase, logsetup
|
||||
from mtkclient.Library.hwcrypto_gcpu import GCpu
|
||||
from mtkclient.Library.hwcrypto_dxcc import dxcc
|
||||
from mtkclient.Library.hwcrypto_sej import sej
|
||||
from mtkclient.Library.cqdma import cqdma
|
||||
from struct import unpack
|
||||
|
||||
|
||||
class crypto_setup:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
# DXCC = Discretix CryptoCell
|
||||
|
||||
import logging, os
|
||||
import logging
|
||||
import hashlib
|
||||
from struct import pack
|
||||
from Cryptodome.Util.number import bytes_to_long
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
import logging, os
|
||||
from struct import pack, unpack
|
||||
from mtkclient.Library.utils import LogBase
|
||||
from binascii import hexlify
|
||||
|
||||
CustomSeed = bytearray(b"12abcdef")
|
||||
|
||||
|
@ -524,7 +523,6 @@ class sej(metaclass=LogBase):
|
|||
self.sej_set_mode(AES_CBC_MODE)
|
||||
self.sej_set_key(AES_HW_KEY, AES_KEY_128)
|
||||
hw_key = self.sej_do_aes(True, iv, swkey, 32)
|
||||
# print(hexlify(hw_key))
|
||||
self.sej_set_key(AES_HW_WRAP_KEY, AES_KEY_256, hw_key)
|
||||
|
||||
def sej_sec_cfg_sw(self, data, encrypt=True):
|
||||
|
|
|
@ -6,7 +6,7 @@ import array
|
|||
import time
|
||||
import os
|
||||
from struct import pack, unpack
|
||||
from mtkclient.Library.utils import LogBase, print_progress, revdword, logsetup, getint
|
||||
from mtkclient.Library.utils import LogBase, print_progress, revdword, logsetup
|
||||
from mtkclient.Library.Connection.usblib import usb
|
||||
from mtkclient.config.payloads import pathconfig
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ from mtkclient.Library.settings import hwparam
|
|||
from mtkclient.config.payloads import pathconfig
|
||||
from mtkclient.Library.error import ErrorHandler
|
||||
from mtkclient.Library.hwcrypto import crypto_setup, hwcrypto
|
||||
from mtkclient.Library.utils import LogBase, progress, logsetup, find_binary
|
||||
from mtkclient.Library.utils import LogBase, logsetup, find_binary
|
||||
from mtkclient.Library.seccfg import seccfg
|
||||
from binascii import hexlify
|
||||
from mtkclient.Library.utils import mtktee
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) B.Kerler 2018-2021 GPLv3 License
|
||||
import os
|
||||
import time
|
||||
import sys
|
||||
import logging
|
||||
from enum import Enum
|
||||
from struct import unpack, pack
|
||||
from binascii import hexlify
|
||||
from mtkclient.Library.utils import LogBase, logsetup
|
||||
from mtkclient.Library.error import ErrorHandler
|
||||
|
||||
class META(metaclass=LogBase):
|
||||
class Mode(Enum):
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# (c) B.Kerler 2018-2021 GPLv3 License
|
||||
import sys
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
|
@ -15,7 +14,7 @@ from mtkclient.config.payloads import pathconfig
|
|||
from mtkclient.Library.legacy_ext import legacyext
|
||||
from mtkclient.config.mtk_config import Mtk_Config
|
||||
from queue import Queue
|
||||
from threading import Thread, Event
|
||||
from threading import Thread
|
||||
|
||||
rq = Queue()
|
||||
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
import logging
|
||||
import time
|
||||
import os
|
||||
import hashlib
|
||||
from binascii import hexlify
|
||||
from struct import pack, unpack
|
||||
from mtkclient.Library.utils import LogBase, progress, logsetup
|
||||
from mtkclient.Library.utils import LogBase, logsetup
|
||||
from mtkclient.Library.error import ErrorHandler
|
||||
from mtkclient.Library.daconfig import EMMC_PartitionType, UFS_PartitionType, DaStorage
|
||||
from mtkclient.Library.partition import Partition
|
||||
|
@ -15,7 +14,7 @@ from mtkclient.config.payloads import pathconfig
|
|||
from mtkclient.Library.xflash_ext import xflashext, XCmd
|
||||
from mtkclient.Library.settings import hwparam
|
||||
from queue import Queue
|
||||
from threading import Thread, Event
|
||||
from threading import Thread
|
||||
|
||||
rq = Queue()
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ from mtkclient.Library.utils import print_progress
|
|||
from mtkclient.Library.error import ErrorHandler
|
||||
from mtkclient.Library.mtk_da_cmd import DA_handler
|
||||
from mtkclient.Library.gpt import gpt_settings
|
||||
import argparse
|
||||
metamodes = "[FASTBOOT, FACTFACT, METAMETA, FACTORYM, ADVEMETA, AT+NBOOT]"
|
||||
|
||||
class ArgHandler(metaclass=LogBase):
|
||||
|
|
|
@ -3,13 +3,11 @@
|
|||
# (c) B.Kerler 2018-2021 GPLv3 License
|
||||
import os
|
||||
import logging
|
||||
import shutil
|
||||
from enum import Enum
|
||||
from struct import unpack, pack
|
||||
from binascii import hexlify
|
||||
from mtkclient.Library.utils import LogBase, logsetup
|
||||
from mtkclient.Library.error import ErrorHandler
|
||||
import time
|
||||
|
||||
USBDL_BIT_EN = 0x00000001 # 1: download bit enabled
|
||||
USBDL_BROM = 0x00000002 # 0: usbdl by brom; 1: usbdl by bootloader
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# (c) B.Kerler 2018-2021 GPLv3 License
|
||||
import logging
|
||||
import os.path
|
||||
|
||||
from mtkclient.Library.utils import LogBase, logsetup
|
||||
from mtkclient.Library.gpt import gpt
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import hmac
|
||||
import os
|
||||
from struct import unpack, pack
|
||||
|
||||
|
@ -9,7 +8,6 @@ from mtkclient.Library.hwcrypto import crypto_setup, hwcrypto
|
|||
from mtkclient.Library.utils import LogBase, progress, logsetup, find_binary
|
||||
from mtkclient.Library.seccfg import seccfg
|
||||
from binascii import hexlify
|
||||
import hashlib
|
||||
from mtkclient.Library.utils import mtktee
|
||||
import json
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ from binascii import hexlify
|
|||
from mtkclient.Library.utils import LogBase
|
||||
from mtkclient.Library.settings import hwparam
|
||||
from mtkclient.config.brom_config import chipconfig, damodes, hwconfig
|
||||
from struct import pack
|
||||
try:
|
||||
from PySide6.QtCore import QObject
|
||||
except ImportError:
|
||||
|
|
|
@ -8,17 +8,12 @@
|
|||
## WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
################################################################################
|
||||
|
||||
from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
|
||||
QMetaObject, QObject, QPoint, QRect,
|
||||
QSize, QTime, QUrl, Qt)
|
||||
from PySide6.QtGui import (QAction, QBrush, QColor, QConicalGradient,
|
||||
QCursor, QFont, QFontDatabase, QGradient,
|
||||
QIcon, QImage, QKeySequence, QLinearGradient,
|
||||
QPainter, QPalette, QPixmap, QRadialGradient,
|
||||
QTransform)
|
||||
from PySide6.QtWidgets import (QAbstractScrollArea, QApplication, QCheckBox, QFrame,
|
||||
QGridLayout, QHBoxLayout, QHeaderView, QLabel,
|
||||
QLayout, QMainWindow, QMenu, QMenuBar,
|
||||
from PySide6.QtCore import (QCoreApplication, QMetaObject, QRect,
|
||||
QSize, Qt)
|
||||
from PySide6.QtGui import QAction, QPixmap
|
||||
from PySide6.QtWidgets import (QAbstractScrollArea, QCheckBox, QFrame,
|
||||
QGridLayout, QHBoxLayout, QLabel,
|
||||
QLayout, QMenu, QMenuBar,
|
||||
QPlainTextEdit, QProgressBar, QPushButton, QScrollArea,
|
||||
QSizePolicy, QSpacerItem, QTabWidget, QTableWidget,
|
||||
QTableWidgetItem, QVBoxLayout, QWidget)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import os
|
||||
import sys
|
||||
import mock
|
||||
import time
|
||||
from PySide6.QtCore import Slot, QObject, Signal
|
||||
from PySide6.QtCore import QObject, Signal
|
||||
from mtkclient.gui.toolkit import convert_size, FDialog, trap_exc_during_debug, asyncThread
|
||||
|
||||
sys.excepthook = trap_exc_during_debug
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from PySide6.QtCore import Slot, QObject, Signal
|
||||
from PySide6.QtWidgets import QTableWidget, QTableWidgetItem
|
||||
from PySide6.QtWidgets import QTableWidgetItem
|
||||
from mtkclient.gui.toolkit import trap_exc_during_debug, asyncThread, FDialog
|
||||
from mtkclient.Library.mtk_da_cmd import DA_handler
|
||||
import os
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import os
|
||||
import sys
|
||||
import time
|
||||
import mock
|
||||
from PySide6.QtCore import QObject, Signal
|
||||
from mtkclient.gui.toolkit import trap_exc_during_debug, asyncThread, convert_size, FDialog, CheckBox, TimeEstim
|
||||
from mtkclient.gui.toolkit import trap_exc_during_debug, asyncThread, FDialog
|
||||
|
||||
sys.excepthook = trap_exc_during_debug
|
||||
|
||||
|
|
1
setup.py
1
setup.py
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
from setuptools import setup, find_packages
|
||||
import os
|
||||
|
||||
setup(
|
||||
name='mtkclient',
|
||||
|
|
Loading…
Reference in a new issue