Samsung-Loki / Thor

An alternative to Heimdall
Mozilla Public License 2.0
201 stars 22 forks source link

Droid Charge: Failed to bulk read: Connection timed out (110) #10

Open Programmerino opened 1 year ago

Programmerino commented 1 year ago

Description

Flashing images on the Samsung Droid Charge SCH-I510 fails with Failed to bulk read: Connection timed out (110) and "RX_TIMEOUT" in red is displayed on the device. This is likely equivalent to https://github.com/Benjamin-Dobell/Heimdall/issues/14. I'm happy to help with any debugging steps

Reproduction

1) connect, begin odin, flashFile /tmp/postmarketOS-export/samsung-sch-i510.img, select FACTORYFS 2) Above occurs

Photo of the device

image

Full logs of the tool, in debug mode

To enable debug mode, enter debug on before doing connect for collecting as much info as possible. \ To get the "full logs", scroll up to the first message in Thor, select it's start, and drag to the end of the last message and copy it here:

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
[13:26:47 DBG] Number of configurations: 1
[13:26:47 DBG] Number of interfaces: 2
[13:26:47 DBG] ~~~~ Interface index 0 ~~~~
[13:26:47 DBG] Number of endpoints: 1
[13:26:47 DBG] Interface class: 0x02
[13:26:47 DBG] $$ Endpoint index 0 $$
[13:26:47 DBG] !! Class-dependant descriptor, skipping (len = 5 - 2)
[13:26:47 DBG] !! Class-dependant descriptor, skipping (len = 5 - 2)
[13:26:47 DBG] !! Class-dependant descriptor, skipping (len = 4 - 2)
[13:26:47 DBG] !! Class-dependant descriptor, skipping (len = 5 - 2)
[13:26:47 DBG] Endpoint address: 0x83
[13:26:47 DBG] !! USB_ENDPOINT_XFER_BULK fail (value = 03)
[13:26:47 DBG] !! Interface is invalid, continuing
[13:26:47 DBG] ~~~~ Interface index 1 ~~~~
[13:26:47 DBG] Number of endpoints: 2
[13:26:47 DBG] Interface class: 0x0A
[13:26:47 DBG] $$ Endpoint index 0 $$
[13:26:47 DBG] Endpoint address: 0x81
[13:26:47 DBG] $$ Endpoint index 1 $$
[13:26:47 DBG] Endpoint address: 0x02
[13:26:47 DBG] > Interface is valid, exiting
[13:26:47 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
[13:26:51 DBG] Bootloader version integer 0x00000000
[13:26:51 DBG] Unknown1: 0, Unknown2: 0, Version: 0
Successfully began an Odin session!
shell> flashFile /tmp/postmarketOS-export/samsung-sch-i510.img
[13:27:02 DBG] PIT size is 1000 (4096), 9 total blocks
Failed to auto-select partition by filename, proceeding to ask
Are you absolutely sure you want to flash "FACTORYFS"? [y/n] (n): y

Sending flash sequence 1 / 40 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% 0 bytes/s 0.0/1.2 GB --:--:--

[13:27:16 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/davis/Downloads/Thor/TheAirBlow.Thor.Library/Platform/Linux.cs:line 366
   at TheAirBlow.Thor.Library.Platform.Linux.BulkRead(Int32 amount, Int32& read, Int32 timeout) in /home/davis/Downloads/Thor/TheAirBlow.Thor.Library/Platform/Linux.cs:line 228
   at TheAirBlow.Thor.Library.Protocols.Odin.FlashPartition(Stream stream, PitEntry entry, Action`1 progress, Int64 length) in /home/davis/Downloads/Thor/TheAirBlow.Thor.Library/Protocols/Odin.cs:line 356
   at ThorRewrite.Shell.Commands.ProtoOdin.FlashFile.<>c__DisplayClass0_0.<RunCommand>b__1(ProgressContext ctx) in /home/davis/Downloads/Thor/TheAirBlow.Thor.Shell/Commands/ProtoOdin/FlashFile.cs:line 55
   at Spectre.Console.Progress.<>c__DisplayClass25_0.<Start>b__0(ProgressContext ctx) in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 65
   at Spectre.Console.Progress.<>c__DisplayClass27_0.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 98
--- End of stack trace from previous location ---
   at Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 133
--- End of stack trace from previous location ---
   at Spectre.Console.Internal.DefaultExclusivityMode.RunAsync[T](Func`1 func) in /_/src/Spectre.Console/Internal/DefaultExclusivityMode.cs:line 40
   at Spectre.Console.Progress.StartAsync[T](Func`2 action) in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 116
   at Spectre.Console.Progress.StartAsync(Func`2 action) in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 96
   at Spectre.Console.Progress.Start(Action`1 action) in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 69
   at ThorRewrite.Shell.Commands.ProtoOdin.FlashFile.RunCommand(State state, List`1 args) in /home/davis/Downloads/Thor/TheAirBlow.Thor.Shell/Commands/ProtoOdin/FlashFile.cs:line 48
~~~~~~~^
Failed to bulk read: Connection timed out (110)

Hardware and software

TheAirBlow commented 1 year ago

This looks to be a similar, but a different issue (because of my implementation being different) as the issue occurs during confirming a file part send, not confirming end of a file sequence transfer (which comes after all file parts)

However, I do not have the time to work on Thor as I switched my interest to a different project of mine, so do not expect me to continue for a while.

knuxyl commented 12 months ago

I have this same error when using the flashTar command. And using double quotes for paths that have spaces results in Directory in the path does not exist!.

ethical-haquer commented 11 months ago

@Programmerino, are you running Thor with sudo?