GNOME Bugzilla – Bug 789575
Unable to open files from MTP-device: : Input/output error
Last modified: 2017-10-28 15:18:22 UTC
Steps to reproduce: 1. Connect MTP-device to laptop 2. Caja file browser opens 3. Navigate to the needed file on MTP-device with Caja 4a. Try to open text file with Pluma from Caja or from terminal: Unexpected error: libmtp error: Unknown error. 4b. Try to open text file with `cat`: $ cat /run/user/1000/gvfs/mtp\:host\=%5Busb%3A003%2C003%5D/SD-card/file.txt cat: '/run/user/1000/gvfs/mtp:host=%5Busb%3A003%2C003%5D/SD-card/file.txt': Input/output error 4c. Try to open video file with `vlc` from Caja or from terminal: $ vlc /run/user/1000/gvfs/mtp\:host\=%5Busb%3A003%2C003%5D/SD-card/video.mkv VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80) [0000000000daa088] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. [00007f00c4000f48] filesystem access error: read error: Input/output error [00007f00c4001408] core stream error: cannot pre fill buffer 4d. Try to open Markdown file with ReText from Caja or from terminal: Retext opens with empty document 4e. Try to open docx-file with LibreOffice from Caja or from terminal: General input/output error while accessing /run/user/1000/gvfs/mtp:host=%5Busb%3A003%2C003%5D/SD-card/document.docx.
Bug discovered on Ubuntu 16.04.3 LTS (!).
What's the device? If it doesn't support the android direct I/O extensions, none of these would be expected to work.
Thank you for reply, Philip. It seems that problem is really on Android side. I reported this bug while using Sony Xperia Tablet Z (Japanese SO-03E). It has Android 4.1.2. With my other device - Sharp SH-01G - I have no errors. It has Android 5.0.2. Where I can read more about "android direct I/O extensions"? What is your recommendation about using MTP on older devices? I already tested simple solution - I'm able to copy file from MTP-device to local disk and open it from here. Which software should I use?
For devices without the extensions, all you can do is copy files with Nautilus (or equivalent file manager). There's no way to edit them in place. Your tablet, with such an old version of Android, will not support them. The extensions are not meaningfully documented, but there's a few words on wikipedia. Otherwise you have to read source-code. https://en.wikipedia.org/wiki/Media_Transfer_Protocol#Android_extensions