Skip to content

ethical-haquer/Thor_GUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thor GUI

License Github Releases

A GUI for the Thor Flash Utility.

Screenshot of Thor GUI
Screenshots
NOTE: These screenshots may not be up-to-date. I really need to automate creating them...

Options Tab:
Options Tab
Pit Tab:
Pit Tab
Settings Tab:
Settings Tab
Help Tab:
Help Tab
About Tab:
About Tab
Command Entry:
Command Entry
"Connect Device" Window:
Connect Device Window
"Select Partitions" Window:
Select Partitions Window
"Verify Flash" Window:
Verify Flash Window

Intro

After witnessing a new Linux user, who had just switched over from Windows, struggle with using Odin4's CLI, I decided to try and make a GUI for the Thor Flash Utility. If you aren't comfortable with the command line, or just prefer a GUI, then this could be helpful for you. On the other hand, if you are comfortable using the command line, then you may just want to use Thor in the terminal. And yes, this is my first GitHub project, so please let me know if you have any suggestions. 🙂

Disclaimer

Currently, Thor GUI is in an Alpha stage. Not all of Thor's features have been implemented in the GUI, and there are known (and possibly unknown) bugs. A list of missing features and know bugs in the latest release can be found below.

Known Bugs

In addition to Thor's own issues, here are Thor GUI's:

Functional:

  • Flashing Odin archives is currently broken. The code that handles this needs to be re-written.
  • Currently, the only interactive Thor commands (ones that require user input, such as "flashFile") that can be used are "connect" and "flashTar". This doesn't affect non-interactive Thor commands that don't require input, such as "help", "begin odin", etc.

Aesthetic:

  • The output from interactive commands (ones that require user input, such as flashTar, connect, etc.) is echoed. So if Thor outputs interactive text, it will be displayed two times. Also, when Thor GUI sends Thor keypresses to select things and such, Thor will send the new output, also echoed. Like when a "[ ]" changes to a "[X]", that whole section of output will be displayed again.

Supported platforms

  • Linux (x64 and arm64)
  • Windows
  • macOS

Implemented Thor features

  • Connecting/Disconnecting devices
  • Starting/Stopping an Odin session
  • Setting options
  • Typing and sending Thor a command
  • Flashing Odin archives
  • Flashing a single partition
  • Printing a description of a device's partition table
  • Dumping a device's partition table into a PIT file
  • Printing a description of any PIT file

To-Do

  • Add Windows and macOS support
  • Improve documentation
  • Automate updating screenshots and screen-recordings (for this README)

Prerequisites

Python

If you're on Linux, you probably already have Python installed. Look here if you don't.

Tkinter

You probably already have Tkinter installed, but if you get "ModuleNotFoundError: No module named 'tkinter'", do this:

Debian-based distros:

sudo apt-get install python3-tk

Fedora:

sudo dnf install python3-tkinter

These Python packages:

  • pexpect
  • sv-ttk
  • tkinter-tooltip
  • tkinterdnd2-universal
  • zenipy

To install all of them:

pip install pexpect sv-ttk tkinter-tooltip tkinterdnd2-universal zenipy

Installation

  • First, make sure you have the above prerequisites.

  • Download the latest "thor-gui_os_version.zip" file from here.

  • Once it's downloaded, extract it.

  • Then run:

    python3 PATH/TO/thor-gui.py
    
  • If a sweet-looking GUI shows up, then you've finished installing Thor GUI!

Note

If you encounter any issues, or have any questions, just let me know and I'll be glad to help. 🙂

Usage

NOTE: This screen-recording is not up-to-date. I really need to automate creating it...

Screen_Recording.mp4
Guide
Starting Thor (0:00):
To start Thor, click the "Start Thor" button. This is usually the first thing you'd do after running Thor GUI.

Connecting to a device (0:09):
To connect to a device, click the "Connect" button. A pop-up window will appear, asking you what device you'd like to connect to. Choose a device, and then click "Select".

Starting an Odin protocol (0:17):
To start an Odin protocol, which is needed to flash a device, click the "Start Odin protocol" button.
Fun fact: The top three buttons in Thor GUI are placed in the order they should be used, from left to right.

Flashing Odin archives (0:19)
To flash Odin archives, first select what files to flash. You may either select the files with a file picker, by clicking one of the file buttons (For example, to select a BL file, click the "BL" button), or type the file path into the corresponding entry. Only files which are selected with the check-boxes will be flashed.

To flash the selected files, hit the "Start" button. There are a few requirements that must be met for it to start the flash:
At least one file must be selected (with the check-boxes),
All selected files must exist,
All selected files must be a .tar, .md5, or .zip,
All selected files must be in the same directory.

If any of these above conditions is not met, Thor GUI will simply let you know, so don't worry.

After a flash has been started, you will be presented with a "Select Partitions" Window. You may click "Select All" to select all of the listed partitions, or choose certain partitions to flash. Once you have finished selecting the partitions you want to flash, hit the "Select" button. There will be a "Select Partitions" Window for every file you selected with the check-boxes.

After you have finished selecting partitions to flash you will see a "Verify Flash" window. This is your chance to cancel the flash if needed, by clicking the "No" button. Otherwise, click the "Yes" button and the flash will start.

Running a Thor command (1:12):
To send Thor a command, enter it into the Command Entry (upper-right corner of Thor GUI, under the "Start Thor" button) and hit Enter. (the key on the keyboard, not the button on Thor GUI)

How you can help

Here are some ways you can help me improve/finish Thor GUI:

  • Find and report bugs. If you find an issue that isn't listed above in "Known Bugs", please let me know!
  • Help translate Thor GUI into your language. Refer to this readme for more info.
  • Improve the code. Pull requests are always welcome!
  • Suggest an improvement by opening up a feature request!

Credits

TheAirBlow for the Thor Flash Utility

rdbende for the Sun Valley tkk theme

Not_Rich@XDA for continuing to test out new versions and suggest improvements.

Myself, ethical_haquer, for Thor GUI

License

Thor GUI is licensed under GPLv3. Please see LICENSE for the full license text.