Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSession failed: LIBUSB_ERROR_IO #23

Closed
hotice opened this issue Feb 4, 2013 · 26 comments
Closed

OpenSession failed: LIBUSB_ERROR_IO #23

hotice opened this issue Feb 4, 2013 · 26 comments

Comments

@hotice
Copy link

hotice commented Feb 4, 2013

When I mount my Galaxy S2 with Android 4.2.1 (CM 10.1 nightly) using Go-mtpfs, this message is displayed:
OpenSession failed: LIBUSB_ERROR_IO

However, the device seems mounted successfully. Any idea what causes this error?

@hotice
Copy link
Author

hotice commented Feb 4, 2013

Some more info: I'm using Ubuntu 13.04 64bit with libusb-1.0-0 1.0.12

@hanwen
Copy link
Owner

hanwen commented Feb 6, 2013

USB can get a bit wonky when the last connection wasn't closed correctly. I've added some retry logic to the master branch. can you have a go?

@hotice
Copy link
Author

hotice commented Feb 6, 2013

I still get the same error. But I've investigated further and it seems this is actually interfering with Ubuntu 13.04's GVFS which now has MTP support.

That's because when I run "go-mtpfs /media/MyAndroid" I get the above mentioned error, but like I was saying, the device does mount properly, however, /media/MyAndroid is empty. Also, I am able to unmount the phone via Nautilus which wasn't possible with go-mtpfs. And finally, when I try to unmount it I get:

andrei@ubuntu-desktop:~$ fusermount -u /media/MyAndroid
fusermount: entry for /media/MyAndroid not found in /etc/mtab

Any idea how to get Go-mtpfs to ignore GVFS with MTP support? That's because GVFS is very unstable for me.

@hanwen
Copy link
Owner

hanwen commented Feb 7, 2013

AFAIK android devices can only have one open session at a time. You should figure out how to make GVFS/Nautilus leave alone the MTP device.

@hotice
Copy link
Author

hotice commented Feb 7, 2013

After GVFS mounts it I unmount it and basically, GVFS mounts it back when I run go-mtpfs /media/MyAndroid. Weird...

@hanwen hanwen closed this as completed Feb 8, 2013
@hotice
Copy link
Author

hotice commented Feb 13, 2013

I've tested the latest go-mtpfs GIT in Ubuntu 12.10 which doesn't have the new GVFS with MTP support and the behaviour is the same as in Ubuntu 13.04, except mounting the device doesn't work, just like before:

  • the " OpenSession failed: LIBUSB_ERROR_IO" is still displayed in Quantal
  • when I try to mount a device using "go-mtpfs /media/MyAndroid", the /media/MyAndroid folder is empty and instead, two "Android" devices show up in the Nautilus sidebar, just like without using go-mtpfs.

Everything works properly if I use an old Go-mtpfs version (as of 8th of January). So this bug should be reopened...

@hanwen
Copy link
Owner

hanwen commented Feb 16, 2013

can you try again, with current master? I've made a couple of stability fixes so it deals better with broken connections and such.

Whenever I plug in my device, I press ESC for all dialogs about mounting devices from GVFS.

@hanwen
Copy link
Owner

hanwen commented Feb 17, 2013

Also, you say "it mounted correctly", but are you sure? If you run 'mount', it should say something along the lines of

/media/Bla ... DeviceFS(Galaxy S2) ...

somewher

@hotice
Copy link
Author

hotice commented Feb 17, 2013

Now it works and I've tried copying 3 files:

  • a small file - it worked
  • a 4,6 GB file: it displayed an error from the start
  • a 700 MB file: it tried to copy it, but Nautilus started to freeze every few seconds and there was not copy progress dialog displayed.

Here's the output:
andrei@andrei-desktop:~/Downloads$ go-mtpfs /media/MyAndroid
2013/02/17 14:55:58 starting FUSE unknown
2013/02/17 14:57:02 AndroidBeginEditObject failed: InvalidObjectHandle
2013/02/17 14:57:11 SendObjectInfo failed GeneralError
2013/02/17 14:57:21 SendObjectInfo failed GeneralError
2013/02/17 14:57:33 AndroidGetPartialObject64 failed: got type 0 in response
2013/02/17 14:57:35 AndroidSendPartialObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:37 AndroidSendPartialObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:39 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:41 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:43 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:45 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:47 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:50 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:52 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:54 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:56 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:58 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:00 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:02 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:04 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:04 Unimplemented opcode INTERRUPT
2013/02/17 14:58:06 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:08 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:08 Unimplemented opcode POLL
2013/02/17 14:58:10 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:12 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:14 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:16 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:18 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:34 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:36 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:43 GetStorageInfo 20001: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:45 GetStorageInfo 10001: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:52 GetStorageInfo 20001: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:54 GetStorageInfo 10001: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:56 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:58 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:00 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:02 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:04 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:06 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:08 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:10 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:12 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:14 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:16 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:18 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:20 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:22 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:20 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:22 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:24 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:26 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:28 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:30 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:32 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:34 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:36 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:38 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:40 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:42 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:44 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:46 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:48 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:50 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:52 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:54 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:56 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT

@hanwen
Copy link
Owner

hanwen commented Feb 17, 2013

Curious. Does it work if you run -android=false ?

On Sun, Feb 17, 2013 at 2:01 PM, Andrew notifications@github.com wrote:

Now it works and I've tried copying 3 files:

  • a small file - it worked
  • a 4,6 GB file: it displayed an error from the start
  • a 700 MB file: it tried to copy it, but Nautilus started to freeze
    every few seconds and there was not copy progress dialog displayed.

Here's the output:
andrei@andrei-desktop:~/Downloads$ go-mtpfs /media/MyAndroid
2013/02/17 14:55:58 starting FUSE unknown
2013/02/17 14:57:02 AndroidBeginEditObject failed: InvalidObjectHandle
2013/02/17 14:57:11 SendObjectInfo failed GeneralError
2013/02/17 14:57:21 SendObjectInfo failed GeneralError
2013/02/17 14:57:33 AndroidGetPartialObject64 failed: got type 0 in
response
2013/02/17 14:57:35 AndroidSendPartialObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:37 AndroidSendPartialObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:39 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:41 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:43 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:45 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:47 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:50 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:52 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:54 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:56 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:57:58 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:00 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:02 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:04 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:04 Unimplemented opcode INTERRUPT
2013/02/17 14:58:06 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:08 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:08 Unimplemented opcode POLL
2013/02/17 14:58:10 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:12 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:14 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:16 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:18 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:34 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:36 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:43 GetStorageInfo 20001: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:45 GetStorageInfo 10001: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:52 GetStorageInfo 20001: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:54 GetStorageInfo 10001: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:56 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:58:58 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:00 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:02 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:04 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:06 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:08 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:10 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:12 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:14 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:16 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:18 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:20 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 14:59:22 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:20 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:22 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:24 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:26 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:28 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:30 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:32 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:34 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:36 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:38 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:40 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:42 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:44 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:46 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:48 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:50 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:52 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:54 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 15:00:56 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT


Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-13685500.

Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen

@hanwen
Copy link
Owner

hanwen commented Feb 17, 2013

also, can you run

cd fs ; go test -v
cd mtp ; go test -v

and send me the console output?

If both say "PASS" in the end, can you do the following? Run

go-mtpfs -debug=fuse,mtp,usb mountpoint >& logfile

duplicate the problem, and attach the resulting logfile.

thanks!

@hotice
Copy link
Author

hotice commented Feb 17, 2013

I ran it with -android=false:

Copying a ~700 mb video to the Android device (internal storage) worked until the end when it gave a input/output error. I couldn't copy the same file to the SD card. Also, deleting files from the SD card or internal storage displayed the same input/output error: "Error removing file: Input/output error".

andrei@andrei-desktop:~/Downloads$ go-mtpfs -android=false /media/MyAndroid
2013/02/17 17:28:14 starting FUSE unknown
2013/02/17 17:28:31 fetched "device.nng", 264 bytes in 16 ms. 0.0 MB/s
2013/02/17 17:28:31 Unimplemented opcode POLL
2013/02/17 17:28:48 fetched ".profig.os", 36 bytes in 16 ms. 0.0 MB/s
2013/02/17 17:28:49 fetched "rds-01-2013.pdf", 72190 bytes in 7 ms. 9.2 MB/s
2013/02/17 17:29:28 sending file "video.mkv" to device: 30965760 bytes.
2013/02/17 17:29:31 sent 30965760 bytes in 3414 ms. 9.1 MB/s
2013/02/17 17:29:31 sending file "video.mkv" to device: 71581696 bytes.
2013/02/17 17:29:33 can't convert error type: LIBUSB_ERROR_TIMEOUT
2013/02/17 17:29:34 sending file "video.mkv" to device: 75034624 bytes.
2013/02/17 17:29:34 can't convert error type: transaction ID mismatch got 140 want 141
2013/02/17 17:29:34 sending file "video.mkv" to device: 85094400 bytes.
2013/02/17 17:29:34 can't convert error type: InvalidObjectHandle
2013/02/17 17:29:53 sending file "video.mkv" to device: 724401081 bytes.
2013/02/17 17:29:53 can't convert error type: InvalidObjectHandle
2013/02/17 17:29:54 sending file "video.mkv" to device: 724401081 bytes.
2013/02/17 17:29:54 can't convert error type: InvalidObjectHandle

As for "cd fs ; go test -v" and "cd mtp ; go test -v", where are those "fs" and "mtp" folders? If you those are the folders in the go-mtpfs source, I get this:

andrei@andrei-desktop:~/Downloads/go-mtpfs-0.1/source/go/src/github.com/hanwen/go-mtpfs$ cd fs ; go test -v
android.go:12:2: import "github.com/hanwen/go-fuse/fuse": cannot find package
classic.go:12:2: import "github.com/hanwen/go-mtpfs/mtp": cannot find package

It's the same for the mtp folder too.

I've used this to build it (in the rules file, I'm using debian packaging):
GOPATH=$(CURDIR)/source/go go build -work -x github.com/hanwen/go-mtpfs

@hanwen
Copy link
Owner

hanwen commented Feb 17, 2013

On Sun, Feb 17, 2013 at 4:41 PM, Andrew notifications@github.com wrote:

I ran it with -android=false:

Copying a ~700 mb video to the Android device (internal storage) worked
until the end when it gave a input/output error. I couldn't copy the same
file to the SD card. Also, deleting files from the SD card or internal
storage displayed the same input/output error: "Error removing file:
Input/output error".

andrei@andrei-desktop:~/Downloads$ go-mtpfs -android=false
/media/MyAndroid
2013/02/17 17:28:14 starting FUSE unknown
2013/02/17 17:28:31 fetched "device.nng", 264 bytes in 16 ms. 0.0 MB/s
2013/02/17 17:28:31 Unimplemented opcode POLL
2013/02/17 17:28:48 fetched ".profig.os", 36 bytes in 16 ms. 0.0 MB/s
2013/02/17 17:28:49 fetched "rds-01-2013.pdf", 72190 bytes in 7 ms. 9.2
MB/s
2013/02/17 17:29:28 sending file "video.mkv" to device: 30965760 bytes.
2013/02/17 17:29:31 sent 30965760 bytes in 3414 ms. 9.1 MB/s
2013/02/17 17:29:31 sending file "video.mkv" to device: 71581696 bytes.
2013/02/17 17:29:33 can't convert error type: LIBUSB_ERROR_TIMEOUT

hmm - can you try upping the timeout value? it's the -usb-timeout value;
default is 2000 (2 seconds).

I'll have a look into making USB errors fatal. After the first usb error,
it should close the connection.

2013/02/17 17:29:34 sending file "video.mkv" to device: 75034624 bytes.
2013/02/17 17:29:34 can't convert error type: transaction ID mismatch got
140 want 141
2013/02/17 17:29:34 sending file "video.mkv" to device: 85094400 bytes.
2013/02/17 17:29:34 can't convert error type: InvalidObjectHandle
2013/02/17 17:29:53 sending file "video.mkv" to device: 724401081 bytes.
2013/02/17 17:29:53 can't convert error type: InvalidObjectHandle
2013/02/17 17:29:54 sending file "video.mkv" to device: 724401081 bytes.
2013/02/17 17:29:54 can't convert error type: InvalidObjectHandle

As for "cd fs ; go test -v" and "cd mtp ; go test -v", where are those
"fs" and "mtp" folders? If you those are the folders in the go-mtpfs
source, I get this:

andrei@andrei-desktop:~/Downloads/go-mtpfs-0.1/source/go/src/
github.com/hanwen/go-mtpfs$ cd fs ; go test -v
android.go:12:2: import "github.com/hanwen/go-fuse/fuse": cannot find
package
classic.go:12:2: import "github.com/hanwen/go-mtpfs/mtp": cannot find
package

It's the same for the mtp folder too.

you have to set the GOPATH variable as below too, eg.

export GOPATH=$(CURDIR)/source/go

I've used this to build it (in the rules file, I'm using debian packaging):

GOPATH=$(CURDIR)/source/go go build -work -x github.com/hanwen/go-mtpfs


Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-13687672.

Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen

@hotice
Copy link
Author

hotice commented Feb 17, 2013

I've tried "-usb-timeout=8000" and it just displays the error later, but it still can't copy the 700mb file: the file manager freezes and later it displays the error:

andrei@andrei-desktop:~$ /tmp/go/bin/go-mtpfs -usb-timeout=8000 /media/MyAndroid/
2013/02/17 18:05:46 starting FUSE unknown
2013/02/17 18:06:07 AndroidGetPartialObject64 failed: got type 0 in response
2013/02/17 18:06:15 AndroidSendPartialObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 18:06:23 AndroidSendPartialObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 18:06:31 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 18:06:39 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 18:06:47 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 18:06:55 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 18:07:03 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 18:07:12 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 18:07:20 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 18:07:28 AndroidEndEditObject failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 18:07:34 Unimplemented opcode INTERRUPT
2013/02/17 18:07:36 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 18:07:44 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT
2013/02/17 18:07:44 Unimplemented opcode POLL
2013/02/17 18:07:52 AndroidGetPartialObject64 failed: LIBUSB_ERROR_TIMEOUT

And here's the ouput for go test -v (I've just compiled go-mtpfs using the official instructions):

andrei@andrei-desktop:/tmp/go/src/github.com/hanwen/go-mtpfs$ cd fs ; go test -v
=== RUN TestAndroid
2013/02/17 18:14:40 OpenSession failed: LIBUSB_ERROR_IO; attempting reset
--- FAIL: TestAndroid (1.17 seconds)
device_test.go:34: Configure failed: opening after reset: LIBUSB_ERROR_NO_DEVICE
=== RUN TestNormal
2013/02/17 18:14:41 OpenSession failed: LIBUSB_ERROR_IO; attempting reset
--- FAIL: TestNormal (1.17 seconds)
device_test.go:34: Configure failed: opening after reset: LIBUSB_ERROR_NO_DEVICE
FAIL
exit status 1
FAIL github.com/hanwen/go-mtpfs/fs 2.360s

andrei@andrei-desktop:/tmp/go/src/github.com/hanwen/go-mtpfs/fs$ cd ..

andrei@andrei-desktop:/tmp/go/src/github.com/hanwen/go-mtpfs$ cd mtp ; go test -v
=== RUN TestAndroid
--- FAIL: TestAndroid (0.00 seconds)
device_test.go:33: GetDeviceInfo failed: LIBUSB_ERROR_IO
=== RUN TestDeviceProperties
2013/02/17 18:14:52 MTP request OpenSession [1957131963]
send: 0x10 bytes with ep 0x4:
0000: 1000 0000 0100 0210 0000 0000 bb76 a774 .............v.t
2013/02/17 18:14:52 MTP sendreq failed: LIBUSB_ERROR_IO
2013/02/17 18:14:52 OpenSession failed: LIBUSB_ERROR_IO; attempting reset
2013/02/17 18:14:52 USB: Close, err:
2013/02/17 18:14:53 USB: Open, err: LIBUSB_ERROR_NO_DEVICE
--- FAIL: TestDeviceProperties (1.17 seconds)
device_test.go:190: Configure failed: opening after reset: LIBUSB_ERROR_NO_DEVICE
=== RUN TestDeviceInfo
--- FAIL: TestDeviceInfo (0.01 seconds)
device_test.go:277: device: Android Android 0123456789ABCDEF
device_test.go:281: GetDeviceInfo failed: LIBUSB_ERROR_IO
=== RUN TestDeviceStorage
2013/02/17 18:14:53 OpenSession failed: LIBUSB_ERROR_IO; attempting reset
--- FAIL: TestDeviceStorage (1.17 seconds)
device_test.go:295: device: Android Android 0123456789ABCDEF
device_test.go:300: GetDeviceInfo failed: LIBUSB_ERROR_IO
device_test.go:307: Configure failed: opening after reset: LIBUSB_ERROR_NO_DEVICE
=== RUN TestDecode
--- PASS: TestDecode (0.00 seconds)
=== RUN TestDecodeObjInfo
--- PASS: TestDecodeObjInfo (0.00 seconds)
=== RUN TestEncodeStrEmpty
--- PASS: TestEncodeStrEmpty (0.00 seconds)
=== RUN TestDecodeTime
--- PASS: TestDecodeTime (0.00 seconds)
FAIL
exit status 1
FAIL github.com/hanwen/go-mtpfs/mtp 2.369s

@hanwen
Copy link
Owner

hanwen commented Feb 17, 2013

thanks, I've tracked this down.

It was a bug in the fuse library, hanwen/go-fuse@2db031a

Can you update and try again?

@hotice
Copy link
Author

hotice commented Feb 17, 2013

Same behaviour...

Here's the output:

andrei@andrei-desktop:~$ /tmp/go/bin/go-mtpfs /media/MyAndroid/
2013/02/17 19:23:59 starting FUSE unknown
c2013/02/17 19:25:00 fatal error got type 0 (CONTAINER_UNDEFINED) in response, want CONTAINER_RESPONSE.; closing connection.
2013/02/17 19:25:00 AndroidGetPartialObject64 failed: got type 0 (CONTAINER_UNDEFINED) in response, want CONTAINER_RESPONSE.
2013/02/17 19:25:00 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:00 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:00 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:00 Unimplemented opcode POLL
2013/02/17 19:25:00 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:00 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:14 GetStorageInfo 20001: mtp: cannot run operation GetStorageInfo, device is not open
2013/02/17 19:25:14 GetStorageInfo 10001: mtp: cannot run operation GetStorageInfo, device is not open
2013/02/17 19:25:15 GetStorageInfo 20001: mtp: cannot run operation GetStorageInfo, device is not open
2013/02/17 19:25:15 GetStorageInfo 10001: mtp: cannot run operation GetStorageInfo, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:18 DeleteObject failed: mtp: cannot run operation DeleteObject, device is not open
2013/02/17 19:25:41 GetStorageInfo 20001: mtp: cannot run operation GetStorageInfo, device is not open
2013/02/17 19:25:41 GetStorageInfo 10001: mtp: cannot run operation GetStorageInfo, device is not open
2013/02/17 19:25:41 SendObjectInfo failed mtp: cannot run operation SendObjectInfo, device is not open

And:
andrei@andrei-desktop:/tmp/go/src/github.com/hanwen/go-mtpfs$ cd fs ; go test -v
android.go:12:2: import "github.com/hanwen/go-fuse/fuse": cannot find package
classic.go:12:2: import "github.com/hanwen/go-mtpfs/mtp": cannot find package
andrei@andrei-desktop:/tmp/go/src/github.com/hanwen/go-mtpfs/fs$ cd ..
andrei@andrei-desktop:/tmp/go/src/github.com/hanwen/go-mtpfs$ cd mtp ; go test -v
mtp.go:13:2: import "github.com/hanwen/go-mtpfs/usb": cannot find package

@hanwen
Copy link
Owner

hanwen commented Feb 17, 2013

can you verify that you have updated the go-fuse library too? At which
version did you compile it?

if in doubt, rm -rf /tmp/go and try again.

On Sun, Feb 17, 2013 at 6:26 PM, Andrew notifications@github.com wrote:

Same behaviour...

Here's the output:

andrei@andrei-desktop:~$ /tmp/go/bin/go-mtpfs /media/MyAndroid/
2013/02/17 19:23:59 starting FUSE unknown
c2013/02/17 19:25:00 fatal error got type 0 (CONTAINER_UNDEFINED) in
response, want CONTAINER_RESPONSE.; closing connection.
2013/02/17 19:25:00 AndroidGetPartialObject64 failed: got type 0
(CONTAINER_UNDEFINED) in response, want CONTAINER_RESPONSE.
2013/02/17 19:25:00 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:00 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:00 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:00 Unimplemented opcode POLL
2013/02/17 19:25:00 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:00 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:14 GetStorageInfo 20001: mtp: cannot run operation
GetStorageInfo, device is not open
2013/02/17 19:25:14 GetStorageInfo 10001: mtp: cannot run operation
GetStorageInfo, device is not open
2013/02/17 19:25:15 GetStorageInfo 20001: mtp: cannot run operation
GetStorageInfo, device is not open
2013/02/17 19:25:15 GetStorageInfo 10001: mtp: cannot run operation
GetStorageInfo, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:15 AndroidGetPartialObject64 failed: mtp: cannot run
operation ANDROID_GET_PARTIAL_OBJECT64, device is not open
2013/02/17 19:25:18 DeleteObject failed: mtp: cannot run operation
DeleteObject, device is not open
2013/02/17 19:25:41 GetStorageInfo 20001: mtp: cannot run operation
GetStorageInfo, device is not open
2013/02/17 19:25:41 GetStorageInfo 10001: mtp: cannot run operation
GetStorageInfo, device is not open
2013/02/17 19:25:41 SendObjectInfo failed mtp: cannot run operation
SendObjectInfo, device is not open

And:

andrei@andrei-desktop:/tmp/go/src/github.com/hanwen/go-mtpfs$ cd fs ; go
test -v
android.go:12:2: import "github.com/hanwen/go-fuse/fuse": cannot find
package
classic.go:12:2: import "github.com/hanwen/go-mtpfs/mtp": cannot find
package
andrei@andrei-desktop:/tmp/go/src/github.com/hanwen/go-mtpfs/fs$ cd ..
andrei@andrei-desktop:/tmp/go/src/github.com/hanwen/go-mtpfs$ cd mtp ; go
test -v
mtp.go:13:2: import "github.com/hanwen/go-mtpfs/usb": cannot find package


Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-13689441.

Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen

@hotice
Copy link
Author

hotice commented Feb 17, 2013

I did remove the /tmp/go folder (I have to reboot to Ubuntu 12.10 each time I test it because I'm currently using 13.04 as my main OS)...

@hanwen
Copy link
Owner

hanwen commented Feb 17, 2013

On Sun, Feb 17, 2013 at 7:04 PM, Andrew notifications@github.com wrote:

I did remove the /tmp/go folder (I have to reboot to Ubuntu 12.10 each
time I test it because I'm currently using 13.04 as my main OS)...

That's odd, I'd expect it to work with 13.04 too.

Can you run it as

go-mtpfs -debug=fs,mtp,usb >& logfile

try to reproduce the problem and send the logfile?

Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen

@hotice
Copy link
Author

hotice commented Feb 18, 2013

Sorry for the delay!

Ubuntu 13.04 has MTP with GVFS support, that's why I'm not testing it in 13.04 (the device is mounted through MTP even if Go-mtpfs fails like I wrote in the initial bug report.

Here is the log for the "/tmp/go/bin/go-mtpfs -debug=fs,mtp,usb /media/MyAndroid >& logfile" command: https://dl.dropbox.com/u/1113424/logfile

I've tried copying a large (700mb) file and also I've tried deleting a file, both failing with input/output error.

@hanwen
Copy link
Owner

hanwen commented Feb 19, 2013

On Mon, Feb 18, 2013 at 10:00 PM, Andrew notifications@github.com wrote:

Sorry for the delay!

Ubuntu 13.04 has MTP with GVFS support, that's why I'm not testing it in
13.04 (the device is mounted through MTP even if Go-mtpfs fails like I
wrote in the initial bug report.

Here is the log for the "/tmp/go/bin/go-mtpfs -debug=fs,mtp,usb
/media/MyAndroid >& logfile" command:
https://dl.dropbox.com/u/1113424/logfile

curious. It's trying to fetch video.mkv

2013/02/18 22:57:05 MTP request GetObjectInfo [59275]
2013/02/18 22:57:05 MTP data 0x78 bytes
2013/02/18 22:57:05 MTP response OK []
2013/02/18 22:57:05 MTP decoded &mtp.ObjectInfo{StorageID:0x10001,
ObjectFormat:0x3000, ProtectionStatus:0x0, CompressedSize:0x44c000,
ThumbFormat:0x0, ThumbCompressedSize:0x0, ThumbPixWidth:0x0,
ThumbPixHeight:0x0, ImagePixWidth:0x0, ImagePixHeight:0x0,
ImageBitDepth:0x0, ParentObject:0x0, AssociationType:0x0,
AssociationDesc:0x0, SequenceNumber:0x0, Filename:"video.mkv",
CaptureDate:time.Time{sec:0, nsec:0, loc:(_time.Location)(nil)},
ModificationDate:time.Time{sec:63496721167, nsec:0,
loc:(_time.Location)(0x696540)}, Keywords:""}
..

which is lenght 0x44c000 = 4505600, but reading it does:

013/02/18 22:57:09 MTP request ANDROID_GET_PARTIAL_OBJECT64 [59275 0 0
16384]
2013/02/18 22:57:09 MTP data 0x400c bytes
2013/02/18 22:57:09 MTP response OK [16384]
2013/02/18 22:57:09 MTP request ANDROID_GET_PARTIAL_OBJECT64 [59275 16384 0
32768]
2013/02/18 22:57:09 MTP data 0x800c bytes
2013/02/18 22:57:09 MTP response OK [32768]
2013/02/18 22:57:09 MTP request ANDROID_GET_PARTIAL_OBJECT64 [59275
724373504 0 4096]

it's reading 4k at the end of the file, (724,373,504), which isn't there
since the file is only 4.5mb long.

then it sends us a bogus reply, trying to send us 0xd517b00c = 300 mb of
data, but it's corrupted:

2013/02/18 22:57:09 MTP data 0xd517b00c bytes
2013/02/18 22:57:09 MTP response 0x0 []
2013/02/18 22:57:09 fatal error got type 0 (CONTAINER_UNDEFINED) in
response, want CONTAINER_RESPONSE.; closing connection.

at which go-mtpfs gives up. Are you using nautilus, is it trying to do some
preview of the corrupted video file?

what happens if you use the command line?

I think you are seeing a bug in the Android code (ie. reading beyond EOF is
not handled well). I'll double check with the android guys.

I think you'll have to use -android=false and a large timeout (libmtp uses
60 seconds by default). Can you report back on what happens then?

I've tried copying a large (700mb) file and also I've tried deleting a
file, both failing with input/output error.


Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-13742896.

Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen

@hanwen
Copy link
Owner

hanwen commented Feb 19, 2013

scratch that; I fixed the beyond EOF isssue in go-mtpfs. See cc1f1f2

let me know how you fare.

@kynan
Copy link

kynan commented Jan 15, 2015

FWIW I saw the same error whenever the device's storage was auto-mounted via gvfs (Nexus 5).

@Eimert
Copy link

Eimert commented Mar 17, 2018

Not sure why the issue is closed, and what the solution is. I'm facing the same LIBUSB_ERROR_IO error.
Version: go-mtpfs 0.0~git20150802.0.3ef47f9-2 amd64

eimert@EIM ~ $ go-mtpfs -debug usb,mtp,fuse,data /media/eimert/galaxy-a3/
2017/06/05 22:25:21 MTP request OpenSession [695371673]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0210 0000 0000 9987 7229  ..............r)
2017/06/05 22:25:21 MTP sendreq failed: LIBUSB_ERROR_IO
2017/06/05 22:25:21 OpenSession failed: LIBUSB_ERROR_IO; attempting reset
2017/06/05 22:25:21 USB: Close, err: <nil>
2017/06/05 22:25:22 USB: Open, err: <nil>
2017/06/05 22:25:22 USB: ClaimInterface 0x0, err: <nil>
2017/06/05 22:25:22 MTP request OpenSession [1004061409]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0210 0000 0000 e1c2 d83b  ...............;
recv: 0xc bytes with ep 0x81:
0000: 0c00 0000 0300 0120 0000 0000            ....... ....
2017/06/05 22:25:22 MTP response OK []
2017/06/05 22:25:22 MTP request GetStorageIDs []
send: 0xc bytes with ep 0x1:
0000: 0c00 0000 0100 0410 0100 0000            ............
recv: 0xc bytes with ep 0x81:
0000: 0c00 0000 0300 0120 0100 0000            ....... ....
2017/06/05 22:25:22 MTP response OK []
2017/06/05 22:25:22 selectStorages failed: EOF
eimert@EIM ~ $

eimert@EIM ~ $ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 26, If 0, Class=Imaging, Driver=usbfs, 480M

eimert@EX58-UD3R ~ $ lsusb -t
/:  Bus 08.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
    |__ Port 2: Dev 2, If 0, Class=Imaging, Driver=usbfs, 480M

eimert@EX58-UD3R ~ $ go-mtpfs -debug usb,mtp,fuse,data /media/eimert/galaxy-a3/
2017/06/05 22:38:55 MTP request OpenSession [1321532645]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0210 0000 0000 e5fc c44e  ...............N
2017/06/05 22:38:55 MTP sendreq failed: LIBUSB_ERROR_IO
2017/06/05 22:38:55 OpenSession failed: LIBUSB_ERROR_IO; attempting reset
2017/06/05 22:38:56 USB: Close, err: <nil>
2017/06/05 22:38:57 USB: Open, err: <nil>
2017/06/05 22:38:57 USB: ClaimInterface 0x0, err: LIBUSB_ERROR_BUSY
2017/06/05 22:38:57 MTP request OpenSession [1308565277]
send: 0x10 bytes with ep 0x1:
0000: 1000 0000 0100 0210 0000 0000 1d1f ff4d  ...............M
2017/06/05 22:38:57 MTP sendreq failed: LIBUSB_ERROR_IO
2017/06/05 22:38:57 Configure failed: OpenSession after reset: LIBUSB_ERROR_IO

@Minabsapi
Copy link

Same problem
go-mtpfs version: 0.0~git20180209.d6f8f3c-1

@daryltucker
Copy link

daryltucker commented Mar 22, 2021

I was able to resolve this issue by using go-mtpfs with these two flags:

go-mtpfs -android=false -usb-timeout=8000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants