yashsingh1/xdaforums huggingface dataset:
[Android Software Development] ZG_DEV:
Thanks for this GREAT TOOL, 👍
[Android Software Development] ethical_haquer:
New Release:

Thor GUI Alpha v0.3.2 release

Minor release.

Fixed the following bugs:

The text in the "Connect Device" and "Force Stop" windows is not in the middle.

Other changes:

There are now tool-tips, along with a setting to turn them on and off. This adds a new prerequisite: tkinter-tooltip.

pip install tkinter-tooltip

The Thor GUI XDA link was updated to link to this new thread.

The 'Verify Flash' window now goes to the middle of Thor GUI when opened, and the text in it has the proper padding.

Just like the last release, be aware that you should either delete the old 'thor_gui_settings.pkl' file before running this version of Thor GUI for the first time, or keep each version of Thor GUI in it's own directory.

If you get an error like "ValueError: not enough values to unpack (expected 3, got 1)", then that means you have an old 'thor_gui_settings.pkl' file from a previous version in the same directory as the newer Thor_GUI.py file, so the old settings file must be manually deleted.

Hopefully, this will be the last release that has this issue, as the version of Thor GUI is now saved as a variable to the settings file, and therefore newer versions of Thor GUI can figure out how old the 'thor_gui_settings.pkl' file it finds is, and behave accordingly.
[Android Software Development] ZG_DEV:
Nice ;)
[Android Software Development] ethical_haquer:
As you may have noticed, there was no new release this week.

That's because I'm working on Thor GUI v0.4.0.

It should have drag and drop Odin archive selection, the ability to run Thor with sudo, and an automatic installer for .NET.

However, the automatic installer will only support a few distros at first, and will not be fully complete. It will probably be improved in v0.4.1. Till next week! (hopefully)
[Android Software Development] Not_Rich:
I am glad I could contribute one idea.
[Android Software Development] ethical_haquer:
Yes, thanks for suggesting that!
[Android Software Development] ethical_haquer:
I just learned that you don't always need .NET to run C# programs like Thor. You can also publish a self-contained app. What this means is that instead of having to automate installing .NET on different distros, I can use one self-contained app instead, meaning in theory every Linux distro can be supported. I'll see how it goes!
[Android Software Development] ethical_haquer:
Here are the self-contained, single file builds of Thor that I plan to use in Thor GUI v0.4.0. If you want to try them out feel free; use "./TheAirBlow.Thor.Shell" to run them. There's an x64 one and an arm64 one, so make sure you download the right one for your computer. The main difference is that you don't even need to have dotnet installed to run them. Let me know if you try them and they don't work for some reason! :)
[Android Software Development] ethical_haquer:
New Release:

Thor GUI Alpha v0.4.0 release

Thor GUI Alpha v0.4.0 is here! The main focus with this release was to make Thor GUI more user-friendly, and that meant removing dotnet as a prerequisite. Yep, you don't need dotnet to run Thor GUI any more!

Changes:

A self-contained, single file build of Thor is bundled in this release. This means you don't need dotnet to run Thor (and therefore Thor GUI) now. The binary Thor builds were built from Thor's source code with these commands: "dotnet publish -r linux-x64 -p:PublishSingleFile=true -p:DebugType=embedded --self-contained -o /output/directory" and "dotnet publish -r linux-arm64 -p:PublishSingleFile=true -p:DebugType=embedded --self-contained -o /output/directory". These two binaries are located in the "Thor" folder of the attached file. It will work on x64 and arm64 computers running Linux, currently.

Dragging and dropping Odin Archives is now supported. Just open a file manager, drag the file you want over the corresponding Odin Archive Entry, and drop it. This adds a new prerequisite, tkinterdnd2-universal:

pip install tkinterdnd2-universal

Thanks to @Not_Rich for this feature request.

Apparently, on certain distros or configurations, there would be a "Failed to open the device for RW: Permission denied (13)" error when connecting a device from Thor GUI, even though connecting with Thor itself worked fine. Having Thor GUI run Thor with sudo solved this issue, so there is now a setting to run Thor with sudo. Thanks to @DokiDokiYandere for reporting this and helping find a fix.

Removed the ugly border around the ScrolledText widget in the Log tab. Eventually the scrollbar will also have to be changed.

Although allowing Thor GUI settings to transfer over to later versions was supposed to work in the last release, it doesn't. However, transferring settings from this release to newer ones should work.
[Android Software Development] ethical_haquer:
New Release:

Thor GUI Alpha v0.4.1 release

Minor release.

Changes:

Added a setting which allows you to change what directory the file picker should open to. The default value is "~", your home directory. It is located at Settings - Flashing - Initial file picker directory.

Removed the "True/False" output, it was for debugging. ("True" on first run, "False" otherwise)

This is also the first release where your settings will be able to be transferred from a previous version of Thor GUI, in this case only v0.4.0. Simply extract this new release, and before running it, copy/paste the "thor_gui_settings.pkl" file from v0.4.0 in with the newly extracted files. Then run this new version. It will detect the settings file, figure out what version of Thor GUI created it, in this case v0.4.0, and act appropriately. You should see the following message in Thor GUI's output if you did it properly: "The found 'thor_gui_settings.pkl' file was not created by this version of Thor_GUI, so Thor GUI is updating it."
[Android Software Development] ethical_haquer:
New Release:

Thor GUI Alpha v0.4.2 release

Minor release.

Fixed the following bugs:

On aarch64 (such as Raspberry Pi OS 64 bit), clicking "Start Thor" results in a continuous string of error messages, and Thor GUI has to be force stopped. This issue can be fixed with a one-liner.

Other changes:

Previously, if your architecture wasn't x86_64 or arm64, Thor GUI would display a string of error messages and would have to be force stopped. Now Thor GUI will let you know that your architecture isn't supported.

There is now a setting to use an external Thor build. It is located at "Settings - Thor - Use an external Thor build".

When Thor GUI asks for your password to run Thor with sudo, the Command Entry will now take focus. This should help users figure out where to enter their password. Thanks to @Not_Rich for this suggestion.

@Not_Rich has reported that with Thor GUI v0.4.1, trying to connect to a device results in this error: "cannot show selection prompt since the current terminal does not support ansi escape sequences". Connecting to the same device with v0.3.2 worked fine though.

I will look into this more and hopefully figure out what's causing it soon.

Using Thor GUI v0.4.1 or this release on Debian 12, drag-and-drop doesn't work. It shows a "+" when hovering a file over one of the Odin Archive Entries, but dropping the file doesn't display the file path in the entry. I'll have to do more testing to figure out what's causing this issue.
[Android Software Development] rpatelnet:
Will the tool be released for Windows and macOS anytime soon?
[Android Software Development] ethical_haquer:
Hopefully, support for Windows and macOS will be added in the next few months.

Currently I am working on Thor GUI v0.5.0, which will include a rewrite of Thor in Python. Once v0.5.0 is out I plan to work on adding support for other operating systems.
[Android Software Development] rpatelnet:
Shared your tool - https://androidmtk.com/thor-flash-utility
[Android Software Development] ethical_haquer:
Thanks! Just remember, @TheAirBlow created the Thor Flash Utility ("Thor", for short), and I created Thor GUI, a GUI for it.

Could you please update your review with this info?

Perhaps mention that although Thor is a command-line tool, there is also a GUI for it, Thor GUI.

@TheAirBlow should be listed first in the credits, for creating the Thor Flash Utility, and I should be listed second for creating Thor GUI, a GUI for Thor. Also, feel free to mention that both Thor and Thor GUI are open-source.

I really appreciate you sharing Thor GUI, but I hope you can update your post because I don't want to take credit for @TheAirBlow's tool. Feel free to ask if you have any questions! :)
[Android Software Development] rpatelnet:
I have just updated the article. I apologize for the delay.
[Android Software Development] ethical_haquer:
Thanks!(y)
[Android Software Development] piero-e:
hi, thanks for the effort !

noob question, trying to install the program, i have an error message :

~/Téléchargements/thor-gui_linux_0.4.2-alpha$ python3 Thor_GUI.py
Traceback (most recent call last):
File "Thor_GUI.py", line 19, in <module>
import tkinter as tk
ModuleNotFoundError: No module named 'tkinter'
[Android Software Development] Not_Rich:
sudo apt-get install python3-tk

Should do it
[Android Software Development] ethical_haquer:
Thanks for the kind words! What @Not_Rich said will indeed do the trick, if you're using a distro with apt. I've added Python and Tkinter to the prerequisites section of the GitHub README. Let me know if you have any other questions! :)
[Android Software Development] ethical_haquer:
A bit of a status update:

Instead of working on Vidar until I rewrite Thor in Python, I'm going to continue working on multiple smaller releases for Thor GUI. Rewriting Thor in Python is no longer the priority, improving Thor GUI's code and adding support for other operating systems is.

Thor currently only supports Linux, but what if I added support for other flashing utilities as well as Thor? Support for Heimdall is planned. If Heimdall support is added in Thor GUI, then with a few modifications Thor GUI should also support Windows and macOS.

Vidar (as a Python rewrite of Thor) will hopefully still be worked on, and finished, and then that can also be added as an option for Thor GUI.

That's all for now!
[Android Software Development] ethical_haquer:
Python.NET could be used in a later release in order to use Thor's classes from Thor GUI, instead of using a Pexpect sub-process.
[Android Software Development] ethical_haquer:
New Release:

Thor GUI Alpha v0.4.3 release

Happy New Year!

Although this release won't look much different than v0.4.2 on the outside, Thor GUI is starting to be re-written with classes. There are still a couple noticeable changes though:

There is now a setting to always use a dark Log, regardless of the theme. It is located at "Settings - Appearance - Keep Log dark".

Fixed the following bugs:

Using the dark theme on X11, the file picker text is white, a well as the background. This is a known Sun Valley issue. The work-around is to click and drag the pointer over the files and directories displayed, which will turn them blue, and therefore readable.

Other changes:

The name of the .py file has been changed from "Thor_GUI.py" to "thor-gui.py", and the name of the settings file has been changed from "thor_gui_settings.pkl" to "thor-gui-settings.pkl". (BTW, I hope to switch to using JSON instead of Pickle for storing variables)

I plan to have another release ready for next week, so let me know if you have any features you want implemented!
[Android Software Development] ethical_haquer:
New Release:

Thor GUI Alpha v0.4.4 release

Minor release.

Fixed the following bugs:

On Debian 12, clicking the "Connect" button results in "cannot show selection prompt since the current terminal does not support ansi escape sequences". What causes this error is is currently unknown.

(This was a serious issue, yet was fixed with a one-liner: os.environ['TERM'] = 'xterm')

Other changes:

Settings are now saved as JSON instead of Pickle, which means the name of the settings file has changed again, it's now "thor-gui-settings.json". Also, your settings will not be able to be transferred between different versions of Thor GUI; if Thor GUI finds a "thor-gui-settings.json" file that was made by a different version, it overwrites it. I could re-implement transferring settings, but honestly I don't think anyone used it (I didn't), and it made the code more complicated.

The next release should have more changes than this one, but there isn't a set release date.
[Android Software Development] ethical_haquer:
New Release:

Thor GUI Alpha v0.4.5 release

Minor release.

Changes:

The check-buttons in the Settings tab now show as checked if a setting is enabled, instead of just changing their text.

The way you select a "TheAirBlow.Thor.Shell" file to use has changed. Instead of selecting either an "internal" or "external" Thor build, you can now "build your own" command used to start Thor.

First you select what "TheAirBlow.Thor.Shell" file to use, by selecting or pasting a file-path into the first entry. Then you can choose if you want to run Thor with sudo by toggling the "Run Thor with sudo" check-button. The "Command used to start Thor" entry will automatically update to reflect the changes you make. You may also choose to simply paste or type the command you would like to use directly into the "Command used to start Thor" entry.

There is a new class used for creating Toplevel windows. Currently it is used only if the "TheAirBlow.Thor.Shell" file you chose doesn't exist and for the start-up window, but it will eventually be used to create all of the Toplevel windows. The only visible difference this makes is that there are no issues with padding, aka the bottom of the windows won't get cut-off.

BTW, I know it's not Monday. I'm going on vacation for 3 weeks starting next Sunday, and won't be releasing anything during that time, so bye for now! 👋
[Android Software Development] ethical_haquer:
New Release:

Thor GUI Alpha v0.4.5.1 release

A really minor release.

Changes:

Fixed an issue where clicking the Start button resulted in an error due to me putting quotes around the directory used in the flashTar command (e.g. "flashTar '/home/ethical-haquer/Firmware'").

Also, the "Please select at least one file" message-window now uses the new Toplevel class.
[Android Software Development] piero-e:
is it possible to flash something like twrp.img.tar and vbmeta.img.tar ? or only Stock Samsung files ?
[Android Software Development] ethical_haquer:
Yes, it is possible to flash things other than stock. :)
[Android Software Development] ethical_haquer:
New Release:

Thor GUI Alpha v0.4.6 release

Minor release.

Fixed the following bugs:

After using Thor GUI on different devices, I've realized that I need to just specify a padding for text in windows, instead of specifying the exact size in pixels. Currently you may notice that the bottom part of certain message windows gets cut-off, and the text in the About Tab may be slightly too low.

Changes:

Thor GUI now supports translations for other languages! All of the strings (aka text) used in Thor GUI are now stored in the JSON file "en.json" in the "locales" directory. So currently there's only support for English, but anyone who wants to can translate Thor GUI into their own language.

The ToplevelWindow class has been improved, and is used in more places now. Hopefully v0.4.7 will use it exclusively.

There is now a setting to use tk file dialogs, because there is a new alternative: zenipy. This adds a new prerequisite, zenipy. pip install zenipy. If "Use tk file dialogs" is unchecked, zenity file dialogs will be used. There are pros and cons to both; the tk file dialogs have a weird side-scrolling interface, but allow opening to a default directory and specifying a certain file-type; and the zenity file-dialogs look more native, but are missing some features. Other options for file dialogs may be added in the near future, as well. (BTW, on the latest Raspberry Pi OS, my hack for getting the dark theme tk file dialogs working suddenly stopped working after an update)

Also, this release will not contain a "TheAirBlow.Thor.Shell" file. You can still find my self-contained builds of Thor here, or download the latest Thor release from GitHub.

I also realized that my code for flashing Odin archives was very buggy. Not like the actual flashing part, but the partition selection implementation was just unusable. Due to this, I've decided to remove "Flashing Odin archives" from the list of Implemented Thor features. It was disappointing, but I've learned a lot since I wrote that code, and plan to re-write it in the next release.

Full Changelog: v0.4.5.1-alpha...v0.4.6-alpha
[Android Software Development] ethical_haquer:
New Release:

Galaxy Flasher Alpha v0.5.0 release

Last release, I said the partition selection implementation would probably be re-written in this release.

It was re-written, along with the whole app!

That's right, Galaxy Flasher v0.5.0 is a complete re-write of Thor GUI in GTK4.

It started with IverCoder@GitHub opening issue #12, "Porting to LibAdwaita and publishing to Flathub", almost four months ago. At the time, I didn't really see why I should port Thor GUI to GTK4. Then, justaCasualCoder@GitHub started porting Thor GUI to GTK4 on his own. Eventually I started working on it as well. Anyways, you can read through that issue if you'd like, it has over sixty comments. 🤣

In short, Thor GUI was renamed Galaxy Flasher and was completely re-written.

It was renamed because it now supports Thor and Odin4!

Be sure to re-read the readme, as it is in the process of being re-written as well.

Galaxy Flasher needs a logo! If you'd be interested in making one, please open up a new issue.

Let me know what you think!

What's Changed​

Start porting to GTK4 by justaCasualCoder@GitHub in #13

Merge the Gtk branch. by ethical-haquer@GitHub in #14

New Contributors​

justaCasualCoder@GitHub made their first contribution in #13

Full Changelog: v0.4.6-alpha...v0.5.0-alpha
[Android Software Development] rbacher:
First, thanks for your work on this. Second, I keep getting Permission denied. Here is a copy and paste

rbacher@penguin:~/galaxy-flasher-v0.5.0alpha-linux/flatpak$ ./build.sh

-bash: ./build.sh: Permission denied

I got the same result using an earlier, non-GUI version. If you have any ideas how I can fix this, I would appreciate your help. Thanks.
[Android Software Development] rbacher:
Solved it. I had to run chmod +x on the file. Now it says I have to install flatpak-builder
[Android Software Development] rbacher:
On the non-GUI version, I ran chmod +x and got past the Permission Denied problem. But another error. Here is the cut and paste

rbacher@penguin:~/Downloads$ ./TheAirBlow.Thor.Shell

-bash: ./TheAirBlow.Thor.Shell: cannot execute binary file: Exec format error

rbacher@penguin:~/Downloads$

Again, any help is appreciated. I would like to get one of the two versions to work. Thanks.
[Android Software Development] rbacher:
I got into the shell on the non-GUI version. Now it says device not detected. I will work on that but at least I have now gotten one of the two versions to work.
[Android Software Development] ethical_haquer:
👍

👍 Nice job figuring it out. Yes, flatpak-builder is listed as a prerequisite under the Flatpak installation instructions.

That "-bash: ./TheAirBlow.Thor.Shell: cannot execute binary file: Exec format error" is probably caused by trying to use the arm64 binary on x64, or vise-versa.

What step are you at trying to install Galaxy Flasher (the GUI)?

Did you have your phone (in Download Mode) connected to your computer when you ran "connect"?
[Android Software Development] rbacher:
It didn't say "device not detected." Not exactly. It said "Not connected to a device." Refer to cut and paste below.

shell> begin odin

~~~~~~~^

Not connected to a device!

I was trying to run "begin" before I had checked out "connect"

So I tried "connect" and what I got was

shell> connect

~~~~~~~^

Could not find a part of the path '/dev/bus/usb'.

So I followed the instructions

1) create and open /etc/udev/rules.d/51-android.rules in an editor

2) enter SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="YourUserGroupHere"

After ATTR and GROUP I typed exactly what it says (because I don't know who or what the idVendor and/or User group are). The file I added looks like this

rbacher@penguin:/etc/udev/rules.d$ cat 51-android.rules

SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="YourUserGroup"

After that, the result was

shell> connect

~~~~~~~^

Could not find a part of the path '/dev/bus/usb'.

So I continued on to instruction #2 which says

Additionally, you may have to disable the cdc_acm kernel module:

1) To temporarily unload, run "sudo modprobe -r cdc_acm"

That's where I hit a dead end. It says cdc_acm not found

rbacher@penguin:~$ sudo modprobe -r cdc_acm

modprobe: FATAL: Module cdc_acm not found.

In conclusion -- I am a 73 year old man who just enjoys this stuff. I have written the html code for my own webpage. I did some linux code for the amazing, but now out of date, OLPC (XO) computer system. I have done macro coding for spreadsheets in my office. Not bad for an old guy..

But ... there's a limit to how many contortions any rational person can go through to reach the end goal of flashing an old cellphone from a Linux based computer. I would like to get this to work, as a challenge, if nothing else. But I think I may throw in the towel and try it with Odin on Windows. I have two Windows PC's in my office. But I am still willing to give this a try again if anyone reading the boring post can suggest something.

Thanks for your help.
[Android Software Development] rbacher:
I installed flatpak-builder and ran build.sh but when I run galaxy-flasher I get this

rbacher@penguin:~/galaxy-flasher-v0.5.0alpha-linux/flatpak/build/files$ ./galaxy-flasher

Traceback (most recent call last):

File "/home/rbacher/galaxy-flasher-v0.5.0alpha-linux/flatpak/build/files/./galaxy-flasher", line 29, in <module>

import gi

ModuleNotFoundError: No module named 'gi'

Any ideas how to fix this? Thanks.
[Android Software Development] ethical_haquer:
What was the output of ./build.sh?
[Android Software Development] ethical_haquer:
@rbacher

Disregard my previous post. You're trying to run it as "./galaxy-flasher", but although that's where the output from the "./build" goes, that's not the correct way to run it. Try running flatpak run com.ethicalhaquer.galaxyflasher.
[Android Software Development] ethical_haquer:
GROUP should just be your username "rbacher". Here's the corrected rule:

SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="rbacher"

I can see you know way more than most people these days. I really hope you can get my tool working, because the reason I made it was to make it easier to flash Samsung devices from Linux. Let me know if you have any more issues after reading my above post!
[Android Software Development] rbacher:
Yes. That works. I also noticed, after I wrote, that it was added as a Linux App that I just have to click on. I have Chrome OS on my computer at home (long story but I really like it -- so much faster than Windows). Anyway, at the lower left on the task bar there is a Launcher button (kind of like the Windows start button), and when I click on it, Galaxy Flasher (among other apps) shows up. So I can launch it that way or from the command line. Both work.

Now I have to see if it will detect my phone. I suspect this will be the breaking point. I will give it a try.

Thank you for your help.