Samsung-Loki / Thor

An alternative to Heimdall
Mozilla Public License 2.0
227 stars 26 forks source link

Odin communications/flash doesn't work with Galaxy S7 / SM-G930F #13

Open jmbreuer opened 1 year ago

jmbreuer commented 1 year ago

Description

Practically all Odin mode commands fail against my phone. This example is with flashTar; dumpPit fails in the same way.

Reproduction

1) connect 2) begin odin 3) flashTar /path/to/firmware/directory 4) result: Failed to bulk read: Connection timed out (110) (before even getting to select which partitions to flash)

Full logs of the tool, in debug mode

Welcome to Thor Shell v1.0.4!
Successfully loaded "usb.ids" from cache.
Type "help" for list of commands.
To start off, type "connect" to initiate a connection.
~~~~~~~~ Platform specific notes ~~~~~~~~
You have to run Thor as root or edit udev rules as follows:
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"
Additionally, you may have to disable the cdc_acm kernel module:
1) To temporarily unload, run "sudo modprobe -r cdc_acm"
2) To disable it, run "echo 'blacklist cdc_acm' | sudo tee -a /etc/modprobe.d/cdc_acm-blacklist.conf"
shell> debug on
Enabled debug logging
shell> connect
[10:48:14 DBG] Number of configurations: 1
[10:48:14 DBG] Number of interfaces: 2
[10:48:14 DBG] ~~~~ Interface index 0 ~~~~
[10:48:14 DBG] Number of endpoints: 1
[10:48:14 DBG] Interface class: 0x02
[10:48:14 DBG] $$ Endpoint index 0 $$
[10:48:14 DBG] !! Class-dependant descriptor, skipping (len = 5 - 2)
[10:48:14 DBG] !! Class-dependant descriptor, skipping (len = 5 - 2)
[10:48:14 DBG] !! Class-dependant descriptor, skipping (len = 4 - 2)
[10:48:14 DBG] !! Class-dependant descriptor, skipping (len = 5 - 2)
[10:48:14 DBG] Endpoint address: 0x83
[10:48:14 DBG] !! USB_ENDPOINT_XFER_BULK fail (value = 03)
[10:48:14 DBG] !! Interface is invalid, continuing
[10:48:14 DBG] ~~~~ Interface index 1 ~~~~
[10:48:14 DBG] Number of endpoints: 2
[10:48:14 DBG] Interface class: 0x0A
[10:48:14 DBG] $$ Endpoint index 0 $$
[10:48:14 DBG] Endpoint address: 0x81
[10:48:14 DBG] $$ Endpoint index 1 $$
[10:48:14 DBG] Endpoint address: 0x02
[10:48:14 DBG] > Interface is valid, exiting
[10:48:14 DBG] Interface: 0x01, Alternate: 0x00, Read Endpoint: 0x81, Write Endpoint: 0x02
Successfully connected to the device!
Now run "begin" with the protocol you need.
shell> begin odin
[10:48:18 DBG] Bootloader version integer 0x00030000
[10:48:18 DBG] Unknown1: 0, Unknown2: 0, Version: 3
[10:48:18 DBG] Sending file part size of 1048576
Successfully began an Odin session!
shell> flashTar /tmp/s7stock
[10:48:36 DBG] Full exception: System.ApplicationException: Failed to bulk read: Connection timed out (110)
   at TheAirBlow.Thor.Library.Platform.Linux.Interop.HandleError(String message) in /home/theairblow/RiderProjects/Thor/TheAirBlow.Thor.Library/Platform/Linux.cs:line 366
   at TheAirBlow.Thor.Library.Platform.Linux.BulkRead(Int32 amount, Int32& read, Int32 timeout) in /home/theairblow/RiderProjects/Thor/TheAirBlow.Thor.Library/Platform/Linux.cs:line 228
   at TheAirBlow.Thor.Library.Protocols.Odin.DumpPIT() in /home/theairblow/RiderProjects/Thor/TheAirBlow.Thor.Library/Protocols/Odin.cs:line 205
   at ThorRewrite.Shell.Commands.ProtoOdin.FlashTar.RunCommand(State state, List`1 args) in /home/theairblow/RiderProjects/Thor/TheAirBlow.Thor.Shell/Commands/ProtoOdin/FlashTar.cs:line 22
~~~~~~~^
Failed to bulk read: Connection timed out (110)

Hardware and software

Additional context

At the connect step, the SM-G930F is mis-identified as a GT-I9100 Phone [Galaxy S II] (Download mode) (ID 001:110)

I'm running Thor as root, and added the blacklist cdc_acm module configuration. I verified that cdc_acm is no longer being loaded (it was at first).

icebarf commented 12 months ago

Facing the same issue with my Samsung S21 FE (SM-G990E). I thought to extract the odin package and flash each file manuall with flashFile, but it doesn't properly work as well.

shell> flashFile /home/ice/Android/SlimSang/dpm.img             
Is "DPM" the right partition? [y/n] (n): y
Are you absolutely sure you want to flash "DPM"? [y/n] (n): y
~~~~~~~^
Could not find file '/home/ice/Android/SlimSang/dpm.img'.
TheAirBlow commented 10 months ago

Facing the same issue with my Samsung S21 FE (SM-G990E). I thought to extract the odin package and flash each file manuall with flashFile, but it doesn't properly work as well.

shell> flashFile /home/ice/Android/SlimSang/dpm.img             
Is "DPM" the right partition? [y/n] (n): y
Are you absolutely sure you want to flash "DPM"? [y/n] (n): y
~~~~~~~^
Could not find file '/home/ice/Android/SlimSang/dpm.img'.

that's not related at all, you've obviously made a mistake in the path.

icebarf commented 10 months ago

that's not related at all, you've obviously made a mistake in the path.

No, it isn't. I copy pasted the path multiple times back when I was using this.

TheAirBlow commented 10 months ago

If it says it doesn't exist, it doesn't exist. I didn't do anything to the path.

Try cat path_here as a sanity check. Also, linux' filesystem is case-sensitive.

вс, 24 дек. 2023 г., 19:48 Amrit Handa @.***>:

that's not related at all, you've obviously made a mistake in the path.

No, it isn't. I copy pasted the path multiple times back when I was using this.

— Reply to this email directly, view it on GitHub https://github.com/Samsung-Loki/Thor/issues/13#issuecomment-1868533578, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQKLYMTTKGL7FSTMHND4NEDYLA6FVAVCNFSM6AAAAAA5YOP3ZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGUZTGNJXHA . You are receiving this because you commented.Message ID: @.***>