Open IverCoder opened 6 months ago
Apparently, PyInstaller works to package Thor GUI GTK. I was able to make a working executable on Debian 12 with no extra configuration. Maybe new GitHub releases can include PyInstaller executables, at least before we get it on FlatHub. (although having an alt way to install it wouldn't hurt either).
I figured you were working on that! Nice work!
I've been working on trying to get GTK4 compiled on Debian 10, but after working on it for like a week straight I still haven't gotten quite there. I'm going to work on renaming Thor GUI to "Galaxy Flasher" (or should it be "GalaxyFlasher"?), and adding support for Odin4 and PyThor (keep up the good work, BTW!). Also, I made a few scripts while trying to compile GTK4, I will probably push them to a repo in case you want to have a look at them.
Bro, I figured out what we need for Odin4 support, a shell script! I just added a simple example in the last commit.
Looks great! I was thinking though, it's a little inefficient to run python inside of python (in the case of PyThor)... It would be easy to include PyThor just using git submodules. The issue is finding a way to get PyThor's CLI in the VTE terminal (without running Python again).
Thanks! Yeah, you're right, there are better ways to interface with PyThor. I just improved the wrapper a ton, but I still need to test it more. Also, "Odin4 Wrapper" is not the best name, feel free to suggest anything! 🤣
Alright, I finally got around to testing the Odin4 wrapper (now called "Interactive Odin4"). Only the flash command needed tweaking, Odin4 was complaining about invalid options. Next up is implementing support in Galaxy Flasher!
Odin4 flashing is now supported! I just flashed my S5 with no issues.
You are now able to select a device with Odin4! Also, if there's only one device, it doesn't ask you to select one (something that should be added to Thor).
One of the major changes is that I made a get_command_output function. While I was making it, I saw a lot of similarities between it and scan_output, and after thinking about it, I've realized that scan_output was crucial to Thor GUI because it was able to detect certain lines, say "Choose a device to connect to:", and present a pop-up window to the user. That was important because with Thor GUI you couldn't just have the Log tab in focus and use keys normally to navigate interactive commands, at best you could use the "Space", "Enter", etc. to try and navigate.
Now the user can use commands in the terminal like normal, so we don't need to detect "Choose a device to connect to:" and display a pop-up window. If the user uses the terminal directly than that should imply that they don't want pop-up windows, and if they use the GUI, than get_command_output can handle that stuff on it's own. The same for the command entry, we have the ability to see the commands they run, and use get_command_output for that too.
The only things I can think of right now that to be added to get_command_output is the ability to see more than what's onscreen (I believe the answer is here: term_text = vte.get_text_range_format(Vte.Format(1), 0, 0, 10000, 10000)[0]
, I also just noticed that I removed the comment you had there, I'll have to re-add it.) and the ability to handle interactive commands.
In short, I think that scan_output should eventually be used only when we need to detect the user running a command through the terminal, for things like enabling more buttons. Other than that, get_command_output should be able to fill in. Sorry for the long comment! 🤣
get_output now sees the whole terminal, there's a setting for changing the theme, and I just rewrote Thor's partition selection code. Next is adding a setting that allows the user to select the partitions themselves. The thor_flash function can be improved, but it does work. (it was a PIA to implement 😄)
You're now able to manually select partitions with Thor. I also added a really minimal right-click menu for the terminal.
I think the branch is nearly mature enough for a release. It's not perfect, but that's not what a release is for. It is way better than the previous release; We've gone from partial support of one flash-tool to near full support of two flash-tools.
Here are a few things that should be done before it is released (let me know if you have stuff to add!):
I would love to hear what you think!
@ethical-haquer It looks great! I agree, it's probably time for a release. Publishing Galaxy Flasher to Flathub might also be a good idea (for the TODO list!)
@ethical-haquer It looks great! I agree, it's probably time for a release. Publishing Galaxy Flasher to Flathub might also be a good idea (for the TODO list!)
Thanks! I'm planning to release it tomorrow, hopefully. Which TODO list are you referring to?
So, what do you think of the possible new flash-tool setting? Also, did you see the new print_widget_tree function? It's a pretty simple function, but it can even handle mapping the whole window. I used it to figure out how to add that custom label to the expander row. I'm going to have a look at removing redundant code, improving the scan_output function, and improving the way setting options works. Oh, and I guess I should finish the flash-tool setting as well. 😄 What have you been working on lately?
@ethical-haquer All the commits look great!
@justaCasualCoder Thanks! Here's another one. 😄 Stuff that needs to be done:
...
RUN 5
Successfully connected to the device!
Successfully began an Odin session!
Found start of partitions.
Found end of partitions.
['CP_G900AUCU4COI5_CL5869384_QB6398515_REV00_user_low_ship_MULT', 'I_CERT.tar.md5:', '> [ ] modem.bin (MODEM)', '(Press <space> to select, <enter> to accept)']
FILE: "CP_G900AUCU4COI5_CL5869384_QB6398515_REV00_user_low_ship_MULTI_CERT.tar.md5"
File wasn't selected.
SENDING: "Enter"
RUN 6
Successfully connected to the device!
Successfully began an Odin session!
Verifying flash.
@justaCasualCoder I hope you're enjoying your vacation! I'm actually taking a vacation in Alaska right now. Where are you?
Please don't. libadwaita doesn't work well outside of the Gnome desktop. Switching to libadwaita would significantly reduce the potential user base for this application, essentially limiting it to the fraction of users who happen to use Gnome.
Please don't. libadwaita doesn't work well outside of the Gnome desktop. Switching to libadwaita would significantly reduce the potential user base for this application, essentially limiting it to the fraction of users who happen to use Gnome.
We've already started switching to Libadwaita, and probably will keep using it, but I'm up for supporting multiple GUI toolkits. What GUI toolkit would you prefer? I know of Kivy, Qt, and wxPython, but I'm sure there are others.
Definitely Qt, without question. I am sure you will not look back.
I'll start looking into it, thanks!
@justaCasualCoder I hope you're enjoying your vacation! I'm actually taking a vacation in Alaska right now. Where are you?
I did! Galaxy Flasher is looking really good, great job with that! I might be able to help with QT but I have only used PySide6 a little bit. I'm working on a WebUSB port of Thor, and it's going pretty good so far!
@justaCasualCoder I hope you're enjoying your vacation! I'm actually taking a vacation in Alaska right now. Where are you?
I did! Galaxy Flasher is looking really good, great job with that! I might be able to help with QT but I have only used PySide6 a little bit. I'm working on a WebUSB port of Thor, and it's going pretty good so far!
Thanks! Yeah, I've never used QT before. GF will definitely need to be broken up into separate files. That Thor port sounds nice! So it's like a webpage you can use, right? I was looking into reverse-engineering Odin4, and I think it's possible, but I need to learn a little C++ first.
Thanks! Yeah, I've never used QT before. GF will definitely need to be broken up into separate files. That Thor port sounds nice! So it's like a webpage you can use, right? I was looking into reverse-engineering Odin4, and I think it's possible, but I need to learn a little C++ first.
Yep, just a webpage!
Is your feature request related to a problem? Please describe.
I have used this app a few times and it worked pretty well for me. However, it can use a bit of UI polish and more discoverability by being published on an app store. Few people unfortunately know about this nice piece of software, a bit more public exposure would be a big help.
Describe the solution you'd like.
The app can be ported to LibAdwaita for a quick and easy UI interface, use the XDG portals File Chooser and File Transfer for accessing the files to be flashed and facilitating drag and drop, and probably the Inhibit portal as well to prevent logging out or shutting down while flashing. Then the app can be submitted to Flathub.
Describe why the feature would be helpful
Flathub is the fastest-growing app store for desktop users, and LibAdwaita guarantees a nice UI compliant with GNOME's HIG for the best user experience.
Thor GUI version
Alpha v0.4.5