ethical-haquer / Galaxy-Flasher

A GUI for Samsung Flash Tools
GNU General Public License v3.0
49 stars 3 forks source link

[Bug]: Unable to start thor #11

Closed Yuzzay closed 9 months ago

Yuzzay commented 9 months ago

What happened?

When I click on "start Thor" flash utility (1.0.4) nothing happens. I checked the the terminal and saw this error:

An Exception occurred in start_thor: The command was not found or was not executable: /home/yusufjibrahim08/Thor/linux-x64/TheAirBlow.Thor.Shell.

What could be the cause of this issue and how can I solve it. Im a total noob at this. I just want to flash a firmware on my SM-N960F

Also I noticed that "Thor GUI version" isnt showing up at the top of the interface, like it does in your screenshots and usage tutorial video. Could this perhaps be the issue? How can I solve it. Im using a chromebook with Linux tools

Screenshot 2024-01-11 20 18 28

Thor GUI version

Alpha v0.4.4

Thor Flash Utility version

1.0.4

Thor GUI's log output

No response

Thor Flash Utility's log output

No response

Yuzzay commented 9 months ago

Im convinced that I messed up somewhere in the installation process. It would mean the world to me if you could help me get this fixed so I can flash a firmware on my bricked phone.

justaCasualCoder commented 9 months ago

Hey @Yuzzay! I was having a similar error a while back. For me the issue was I did not have DotNet 7 Runtime. Try using wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh to download the linux installer. Then bash dotnet-install.sh to run it.

Yuzzay commented 9 months ago

Hey @justaCasualCoder how do I do that? Im pretty new to this code/terminal stuff. Could you please type down a noob-friendly step by step guide on how I can solve this issue. I would really appreaciate it!! Many thanks in advance!!

justaCasualCoder commented 9 months ago

Try this (Run all of this in the same terminal that you ran python3 thor-gui.py in):

Yuzzay commented 9 months ago

@justaCasualCoder All the steps worked fine except for step 3 "Test DOTNET". When I type the command "dotnet --info" it says "-bash: dotnet: command not found". I tried running Thor GUI anyways but it seems that the problem still presists.

heres a screenshoot of how it looks:

Screenshot 2024-01-12 15 35 31

Yuzzay commented 9 months ago

@justaCasualCoder Am I doing something wrong?

Yuzzay commented 9 months ago

Hey @justaCasualCoder I made some progress. The error code went from showing up in the terminal only to now directly showing up in Thor GUI. Is this a good sign? lol Screenshot 2024-01-12 15 59 56

justaCasualCoder commented 9 months ago

I don't know much about chrome book's linux tools, but could you post the output of this? (This will get your Linux OS version and save the DOTNET installer output to a log)

cat /etc/os-release
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
bash dotnet-install.sh --channel 7.0 | tee dotnet_install_log.txt

Then upload dotnet_install_log.txt. You could also try restarting...

Yuzzay commented 9 months ago

@justaCasualCoder heres what I got:

cat /etc/os-release wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh bash dotnet-install.sh --channel 7.0 | tee dotnet_install_log.txt

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" --2024-01-12 16:49:04-- https://dot.net/v1/dotnet-install.sh Resolving dot.net (dot.net)... 20.236.44.162, 20.231.239.246, 20.112.250.133, ... Connecting to dot.net (dot.net)|20.236.44.162|:443... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh [following] --2024-01-12 16:49:06-- https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh Resolving dotnet.microsoft.com (dotnet.microsoft.com)... 2620:1ec:bdf::53, 2620:1ec:46::53, 13.107.213.53, ... Connecting to dotnet.microsoft.com (dotnet.microsoft.com)|2620:1ec:bdf::53|:443... connected. HTTP request sent, awaiting response... 200 OK Cookie coming from dotnet.microsoft.com attempted to set domain to dotnetwebsite.azurewebsites.net Cookie coming from dotnet.microsoft.com attempted to set domain to dotnetwebsite.azurewebsites.net Length: 61896 (60K) [application/x-sh] Saving to: ‘dotnet-install.sh’

dotnet-install.sh 100%[==============================>] 60.45K --.-KB/s in 0.1s

2024-01-12 16:49:08 (605 KB/s) - ‘dotnet-install.sh’ saved [61896/61896]

dotnet-install: .NET Core SDK with version '7.0.405' is already installed.

justaCasualCoder commented 9 months ago

Try Restarting...

Yuzzay commented 9 months ago

Roger that. Ill restart my whole pc and try again

Yuzzay commented 9 months ago

@justaCasualCoder I can start thor now but its missing the TheAirBlow.Thor.Shell command. its basically the same problem as in the last screenshot I sent. The only thing I can do is force stop thor....

Yuzzay commented 9 months ago

Screenshot 2024-01-12 17 19 30

ethical-haquer commented 9 months ago

Alright, let me see what the issue is. :smile:

Yuzzay commented 9 months ago

@ethical-haquer Dude, you're the real MVP if you help me get this fixed. Ive been struggling with it for the past 2 days haha. I was almost about to give up but seeing your comment made me feel hopeful again!!

ethical-haquer commented 9 months ago

First of all, that exception simply means that Thor GUI didn't find the internal Thor builds, possibly because you downloaded just the source code instead of the "thor-gui-os-version.zip" file, which includes binary builds of Thor, with dotnet included, for Linux x64 and arm64. If you are able to use those builds, you won't even need to install dotnet. If for whatever reason you can't use those builds, you can toggle "Use an external Thor build" in Settings. The first thing to try is the internal Thor builds, did you download the full release?

Yuzzay commented 9 months ago

@ethical-haquer What I did was follow the instructions you released. I do have a file named "thor-gui-linux-v0.4.4-alpha.zip" which I extracted. Im not a linux guru so I could have messed up somewhere along the installation process. I was even struggling getting the GUI to lauch for a whole day before finally suceeding in launching it up (like in the screenshot I sent here). Could you perhaps walk me through a step by step guide on what exactly I need to do. I can even uninstall thor and reinstall it with your guidance.

ethical-haquer commented 9 months ago

@ethical-haquer What I did was follow the instructions you released. I do have a file named "thor-gui-linux-v0.4.4-alpha.zip" which I extracted. Im not a linux guru so I could have messed up somewhere along the installation process. I was even struggling getting the GUI to lauch for a whole day before finally suceeding in launching it up (like in the screenshot I sent here). Could you perhaps walk me through a step by step guide on what exactly I need to do. I can even uninstall thor and reinstall it with your guidance.

Absolutely! Could you give me a screenshot of the directory where you have the .py file located?

ethical-haquer commented 9 months ago

Or, if you have it in your home directory, I can just guide you through the installation process. Just let me know what you want.

Yuzzay commented 9 months ago

@ethical-haquer I use a chromebook with Linux development enviroment enabled so the .py file is located under "Linux files" which I guess would be the equivalant of "home"..... but im not 100% sure if thats home or not haha

ethical-haquer commented 9 months ago

@ethical-haquer I use a chromebook with Linux development enviroment enabled so the .py file is located under "Linux files" which I guess would be the equivalant of "home"..... but im not 100% sure if thats home or not haha

That terminal is only for Linux, correct? If you open up a terminal, and then run "ls", what is the output?

Yuzzay commented 9 months ago

Im a total noob at this. I came from Windows pc and used to use odin for a long time. Thats actually how I discovered you and the Thor GUI. I read your instructions on how to use odin on linux with VM but I thought that was too much work so decided to give Thor a shot. lol

Yuzzay commented 9 months ago

Yes the terminal is 100% only Linux. heres the output of "ls"

AP BL CP CSC dotnet_install_log.txt dotnet-install.sh Downloads Heimdall-master Heimdall-master.zip help magisk_patched-26400_EfWI9.img N960FXXSAFWB3_N960FOBEAFWB1_BTE note9.pit Odin4-Linux.zip Oracle_VM_VirtualBox_Extension_Pack-7.0.12.vbox-extpack Python-3.12.1.tar.xz SAMFW.COM_SM-N960F_XEU_N960FXXS4CSK2_fac Thor_GUI-0.3.1-alpha.tar.gz Thor_GUI-0.3.1-alpha.zip Thor_GUI-0.4.3-alpha.zip Thor_GUI-0.4.4-alpha Thor_GUI-0.4.4-alpha.tar.gz Thor_GUI-0.4.4-alpha.zip thor-gui-linux-0.4.3-alpha.zip 'thor-gui-linux-v0.4 (1).4-alpha' thor-gui-linux-v0.4.4-alpha thor-gui-linux-v0.4.4-alpha.zip thor-gui.py thor-gui-settings.json Thor-main virtualbox-7.0_7.0.12-159484~Debian~bullseye_amd64.deb

Yuzzay commented 9 months ago

Dont judge my files!!! lol

ethical-haquer commented 9 months ago

Dont judge my files!!! lol

Ha! Can you run "cd thor-gui-linux-v0.4.4-alpha", and then give me the output of "ls" from there?

Yuzzay commented 9 months ago

well, nothings happens after I type "ls" Screenshot 2024-01-12 18 20 19

Yuzzay commented 9 months ago

Does that mean the file is empty or?

ethical-haquer commented 9 months ago

Does that mean the file is empty or?

Yeah, that would mean the directory (aka folder) is empty. In a graphical file manager can you delete that folder, and then extract the "thor-gui-linux-v0.4.4-alpha.zip" file again?

Yuzzay commented 9 months ago

Done! this time it wasnt empty Screenshot 2024-01-12 18 33 27

Yuzzay commented 9 months ago

Whats the next step. (btw I wanna thank you for doing this, You have no idea how much it means to me. Ive been struggling with this for almost 3 days now)

ethical-haquer commented 9 months ago

Whats the next step.

The next thing to do is run "python3 thor-gui.py", assuming you still have that terminal open. Otherwise just cd into that directory again and then run it.

(btw I wanna thank you for doing this, You have no idea how much it means to me. Ive been struggling with this for almost 3 days now)

Don't worry about it, I know what you're talking about. That's why I made that Odin on Linux guide, and now Thor GUI. Congrats on your first GitHub issue! (I really do need to have Thor GUI tell the user when that exception occurs :rofl:)

I really hope this works out for you, but if not I'll be here to help. I won't be on here again till later today in the afternoon, see you!

Yuzzay commented 9 months ago

Okay so it seems like im back to square one lol....

im getting this error code when I try to start thor from within the directory.

"An Exception occurred in start_thor: The command was not found or was not executable: /home/yusufjibrahim08/thor-gui-linux-v0.4.4-alpha/Thor/linux-x64/TheAirBlow.Thor.Shell." Screenshot 2024-01-12 19 29 06

Yuzzay commented 9 months ago

Man this is driving me crazy!!

justaCasualCoder commented 9 months ago

What is the output of ls -la /home/yusufjibrahim08/thor-gui-linux-v0.4.4-alpha/Thor/*? Maybe executable permissions are not set? Also you can just wait for @ethical-haquer to come back. Just thought I would try to help...

Yuzzay commented 9 months ago

@justaCasualCoder I appreciate you coming back to help. At this point ill take any help I can get. Heres the output:

rw-r--r-- 1 yusufjibrahim08 yusufjibrahim08 16725 Jan 12 18:30 /home/yusufjibrahim08/thor-gui-linux-v0.4.4-alpha/Thor/LICENSE -rw-r--r-- 1 yusufjibrahim08 yusufjibrahim08 4372 Jan 12 18:30 /home/yusufjibrahim08/thor-gui-linux-v0.4.4-alpha/Thor/README.md

/home/yusufjibrahim08/thor-gui-linux-v0.4.4-alpha/Thor/linux-arm64: total 73756 drwxr-x--x 1 yusufjibrahim08 chronos-access 42 Jan 12 18:30 . drwxr-x--x 1 yusufjibrahim08 chronos-access 72 Jan 12 18:30 .. -rw-r--r-- 1 yusufjibrahim08 yusufjibrahim08 75525665 Jan 12 18:30 TheAirBlow.Thor.Shell

/home/yusufjibrahim08/thor-gui-linux-v0.4.4-alpha/Thor/linux-x64: total 67004 drwxr-x--x 1 yusufjibrahim08 chronos-access 42 Jan 12 18:30 .

Yuzzay commented 9 months ago

If the case is that executable permissions are not set, which im unsure of, how can I check if it is or not? And how can I set it up?

justaCasualCoder commented 9 months ago

If the case is that executable permissions are not set, which im unsure of, how can I check if it is or not? And how can I set it up?

It would be marked rwxr-x--x where the x in it stands for executable.

Strange... It seems TheAirBlow.Thor.Shell file is not there for x86_64... try cd /home/yusufjibrahim08/thor-gui-linux-v0.4.4-alpha/Thor/linux-x64 && ls -la

Yuzzay commented 9 months ago

Hey you know what, you might just have cracked the issue. As far as my noob mind goes, I think youve successfully diagnosed the issue. So the SHELL file is there but not executable. Is this correct?

Yuzzay commented 9 months ago

Heres the output:

total 67004 drwxr-x--x 1 yusufjibrahim08 chronos-access 42 Jan 12 18:30 . drwxr-x--x 1 yusufjibrahim08 chronos-access 72 Jan 12 18:30 .. -rw-r--r-- 1 yusufjibrahim08 yusufjibrahim08 68608022 Jan 12 18:30 TheAirBlow.Thor.Shell

justaCasualCoder commented 9 months ago

Yep! Try running chmod -v +x /home/yusufjibrahim08/thor-gui-linux-v0.4.4-alpha/Thor/linux-x64/TheAirBlow.Thor.Shell

Yuzzay commented 9 months ago

Dude.... youre a fucking GOD!!!!!!!! Screenshot 2024-01-12 21 15 24

Yuzzay commented 9 months ago

I can FINALLY use Thor GUI!!!!!!!!!! Screenshot 2024-01-12 21 19 03

justaCasualCoder commented 9 months ago

I am glad it is working for you!

Yuzzay commented 9 months ago

I can not thank you enough! Ive had a headache for 3 days trying to slove this!!!

justaCasualCoder commented 9 months ago

@ethical-haquer The issue is Fixed!

Yuzzay commented 9 months ago

Hey again @justaCasualCoder , Just a quick question. Why does it say "Too many arguments!" when I try to flash a firmware onto my bricked phone? This is what it says:

flashTar /home/yusufjibrahim08/SAMFW (1).COM_SM-N960F_XEU_N960FXXS4CSK2_fac


Too many arguments!
shell>
Yuzzay commented 9 months ago

Heres how it looks: Screenshot 2024-01-12 22 11 12

Yuzzay commented 9 months ago

Any idea on whats happening?

justaCasualCoder commented 9 months ago

@Yuzzay This may be another bug, but I am almost certain you just need to put " on each side of the path to the file. Like "/home/yusufjibrahim08/SAMFW (1).COM_SM-N960F_XEU_N960FXXS4CSK2_fac". It is like this because the way Linux handles files with spaces in them. Example: ls -l SAMFW (1).COM_SM-N960F_XEU_N960FXXS4CSK2_fac will give syntax error near unexpected token (.

@ethical-haquer
A fix in the code to prevent this from happening would be to change line 673 from send_command(f'flashTar {common_directory}') to send_command(f"flashTar '{common_directory}'") to add quotes around the filename.

Yuzzay commented 9 months ago

@justaCasualCoder Okay so heres what I did. I deleted the firmware files that I was initially trying to flash onto my device and downloaded a new file from sammobile. I extracted it and tried flashing it. I ended up getting a new error code that says "failed to bulk read: connection timed out (110)

flashTar /home/yusufjibrahim08/N960FXXSAFWB3_N960FOBEAFWB1_EVR


Failed to bulk read: Connection timed out (110)
shell>