mirror of
https://github.com/bkerler/mtkclient.git
synced 2024-11-30 19:26:56 -05:00
Giving better info while connecting to phone.
This commit is contained in:
parent
b10ac235bf
commit
3a143f3c46
4 changed files with 16 additions and 9 deletions
|
@ -118,7 +118,7 @@ sudo reboot
|
|||
## Usage
|
||||
|
||||
### Using MTKTools via the graphical user interface:
|
||||
For the 'basics' you can use the GUI interface. This supports dumping partitions for now. Run the following command:
|
||||
For the 'basics' you can use the GUI interface. This supports dumping partitions or the full flash for now. Run the following command:
|
||||
```
|
||||
python mtk_gui
|
||||
```
|
||||
|
|
21
mtk_gui
21
mtk_gui
|
@ -62,10 +62,13 @@ def getDevInfo(self, parameters):
|
|||
|
||||
mtkClass = devhandler.mtkClass
|
||||
da_handler = devhandler.da_handler
|
||||
if mtkClass.port.cdc.connect() == False:
|
||||
mtkClass.preloader.init()
|
||||
else:
|
||||
phoneInfo['cdcInit'] = True;
|
||||
try:
|
||||
if mtkClass.port.cdc.connect() == False:
|
||||
mtkClass.preloader.init()
|
||||
else:
|
||||
phoneInfo['cdcInit'] = True
|
||||
except:
|
||||
phoneInfo['cantConnect'] = True
|
||||
phoneInfo['chipset'] = str(mtkClass.config.chipconfig.name) + \
|
||||
" (" + str(mtkClass.config.chipconfig.description) + ")"
|
||||
self.sendUpdateSignal.emit()
|
||||
|
@ -81,6 +84,9 @@ def getDevInfo(self, parameters):
|
|||
else:
|
||||
phoneInfo['bootMode'] = "Preloader mode"
|
||||
self.sendUpdateSignal.emit()
|
||||
else:
|
||||
phoneInfo['cantConnect'] = True
|
||||
self.sendUpdateSignal.emit()
|
||||
# try:
|
||||
# print(mtkClass.daloader.get_partition_data(parttype="user"))
|
||||
# except Exception:
|
||||
|
@ -96,7 +102,10 @@ def sendToLog(info):
|
|||
|
||||
def updateGui():
|
||||
global phoneInfo
|
||||
mainwindow.phoneInfoTextbox.setText("Phone detected:\n" + phoneInfo['chipset'] + "\n" + phoneInfo['bootMode'])
|
||||
if (phoneInfo['cdcInit'] and phoneInfo['bootMode'] == "" ):
|
||||
mainwindow.phoneInfoTextbox.setText("Phone detected:\nReading model info...")
|
||||
else:
|
||||
mainwindow.phoneInfoTextbox.setText("Phone detected:\n" + phoneInfo['chipset'] + "\n" + phoneInfo['bootMode'])
|
||||
mainwindow.status.setText("Device detected, please wait.\nThis can take a while...")
|
||||
if phoneInfo['daInit']:
|
||||
mainwindow.status.setText("Device connected :)")
|
||||
|
@ -106,7 +115,7 @@ def updateGui():
|
|||
spinnerAnim.stop()
|
||||
mainwindow.spinner_pic.setHidden(True)
|
||||
else:
|
||||
if not phoneInfo['cdcInit']:
|
||||
if 'cantConnect' in phoneInfo:
|
||||
mainwindow.status.setText("Error initialising. Did you install the drivers?")
|
||||
spinnerAnim.start()
|
||||
mainwindow.spinner_pic.setHidden(False)
|
||||
|
|
|
@ -198,7 +198,6 @@ class Ui_MainWindow(object):
|
|||
self.menubar.addAction(self.toolsFlashMenu.menuAction())
|
||||
self.readFlashMenu.addAction(self.actionRead_partition_s)
|
||||
self.readFlashMenu.addAction(self.actionRead_full_flash)
|
||||
self.readFlashMenu.addAction(self.actionRead_offset)
|
||||
self.writeFlashMenu.addAction(self.actionWrite_partition_s)
|
||||
self.writeFlashMenu.addAction(self.actionWrite_full_flash)
|
||||
self.writeFlashMenu.addAction(self.actionWrite_at_offset)
|
||||
|
|
|
@ -413,7 +413,6 @@
|
|||
</property>
|
||||
<addaction name="actionRead_partition_s"/>
|
||||
<addaction name="actionRead_full_flash"/>
|
||||
<addaction name="actionRead_offset"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="writeFlashMenu">
|
||||
<property name="title">
|
||||
|
|
Loading…
Reference in a new issue