Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Note: The following is likely to not work and you might have to resort to gphoto2 or a file manager with gvfs support like PCManFM.
First edit your /etc/fuse.conf and uncomment the following line:
user_allow_other
Mount your device on ~/mnt:
$ mtpfs -o allow_other ~/mnt
but this time I just can't mount it:
Code:
# mtpfs /home/nr/mtp
Listing raw device(s)
Device 0 (VID=0fce and PID=01ba) is a SONY Xperia Z3 MTP.
Found 1 device(s):
SONY: Xperia Z3 MTP (0fce:01ba) @ bus 1, dev 17
Attempting to connect device
Android device detected, assigning default bug flags
Listing File Information on Device with name: Xperia™ Z3 Dual
fuse: bad mount point `/home/nr/mtp': Transport endpoint is not connected
Yes, I've allowed my phone to connect computer and chosen MTP
same with jmtpfs. phone displays menu to select how to use usb but jmtpfs is has exited already "Transport endpoint is not connected". Can't remember how did I made it work last time.
mtpfs now gives me this:
Quote:
# mtpfs /home/nr/mtp/
Listing raw device(s)
Device 0 (VID=0fce and PID=01ba) is a SONY Xperia Z3 MTP.
Found 1 device(s):
SONY: Xperia Z3 MTP (0fce:01ba) @ bus 1, dev 37
Attempting to connect device
Android device detected, assigning default bug flags
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Listing File Information on Device with name: Xperia™ Z3 Dual
fuse: bad mount point `/home/nr/mtp/': Transport endpoint is not connecte
"Found a bad handle"... ofc phone is unlocked when I try to connect it
Last edited by Bad Blue Bull; 01-23-2018 at 06:21 AM.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
Rep:
Hi Bad_Blue_Bull,
Do you absolutely need to use MTP as a protocol or would simple file-based access be sufficient ?
MTP (media transfer protocol) treats the device as a "multimedia" device, essentially for purposes of "syncing" media libraries .. I personally never use this approach, preferring to manually copy media files and organize them the way I choose. For this type of usage, accessing the appliance as a simple removable storage device (similar to the way one would use a USB drive, for example) is all that's required.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
Rep:
OK ... I had immediate success with MTP after all ... sorry for the confusion. I didn't even need jmtpfs. I just connected the phone (made sure it was unlocked first, which you have confirmed you've also done ...) and got a dialog on it asking me to allow access. Answered OK and it was available via my File Manager (I use PCManFM on Arch). Note that my system has libmtp, gvfs and gvfs-mtp installed.
An annoyance is that access disconnects when the phone automatically goes to its lock screen ... Since it's my office phone, I'm not sure I can modify that ...
So now ... questions:
What file manager are you using ? Do you know if it is is gvfs-capable ? It it is, and you have the appropriate packages installed on your system, it should auto-mount the phone.
Rereading the output you provided, mtpfs and jmtpfs seem to be objecting to your mount point (/home/nr/mtp) ... I imagine you are certain this directory actually still exists ? Are the permissions on the directory sufficiently ... permissive .. ?
Also, although I realize you were advised that root access may be required, have you tried any of this while logged on as your regular user ? That is how it is working in my particular case ...
Lastly, what version of Android are you running on your phone ?
1. Dolphin automounts phone, I can browse its memory but I can't open any file.
2. well, well, well, I've managed to access it somehow. Changed mode of the mtp dir to drwxrwxrwx and now it works, but only when I run mtpfs as root. As I said before I could access it few days ago, so not sure if it lasts.
still can't access it as a regular user.
so back to the first msg of topic:
Quote:
Note that you may need to be root to do all this if permissions on the
MTP device are not correct
dddammmnne, unmounted it, mounted it again successfully but can't mount again neither with mtpfs nor with jmtpfs
Quote:
# jmtpfs mtp <<<<<<<<<<<<<< success
Device 0 (VID=0fce and PID=01ba) is a SONY Xperia Z3 MTP.
Android device detected, assigning default bug flags
# ls mtp
SD-карта Внутренний накопитель
# umount mtp
# mtpfs mtp <<<<<<<<<<<<<<< fail
Listing raw device(s)
Device 0 (VID=0fce and PID=01ba) is a SONY Xperia Z3 MTP.
Found 1 device(s):
SONY: Xperia Z3 MTP (0fce:01ba) @ bus 1, dev 24
Attempting to connect device
Android device detected, assigning default bug flags
Error 1: Get Storage information failed.
Error 2: PTP Layer error 02fe: get_handles_recursively(): could not get object handles.
Error 2: Error 02fe: PTP: Protocol error, data expected
Listing File Information on Device with name: Xperia™ Z3 Dual
LIBMTP_Get_Storage() failed:-1
# mtpfs mtp <<<<<<<<<<<<<<<<<<<<<<<< fail again
Listing raw device(s)
Device 0 (VID=0fce and PID=01ba) is a SONY Xperia Z3 MTP.
Found 1 device(s):
SONY: Xperia Z3 MTP (0fce:01ba) @ bus 1, dev 26
Attempting to connect device
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
Android device detected, assigning default bug flags
Error 1: Get Storage information failed.
Error 2: PTP Layer error 02fe: get_handles_recursively(): could not get object handles.
Error 2: Error 02fe: PTP: Protocol error, data expected
Listing File Information on Device with name: Xperia™ Z3 Dual
LIBMTP_Get_Storage() failed:-1
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
Rep:
While in the directory containing those images, could you run the following command and post the output ? It's beginning to sound more like a permissions issue now ...
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
Rep:
... Sorry ... just read your 2 previous posts ... It is also sounding unreliable. This is one of the reasons I shy away from MTP when there is another alternative ... It is known to be finicky. Alot depends on the version of Android and how the device manufacturer has configured it.
Unfortunately, Android basically removed UMS mode a couple of versions back, so we are mostly stuck with MTP. On my Samsung Galaxy S7 running Android 7.0 - it seems to work well. Obviously, your experience is not the same.
There are other solutions out there : Airdroid, SCP over SSH, among others. I have no experience with them to share with you, unfortunately. I tend to store anything I'm likely to need on the SD card in the phone and just pop it out and into the computer when I want to transfer or access files. I rarely hook the phone up to the computer for data access.
Perhaps other members can chime in here with more experience ? Sadly ... I am running out of ideas ...
While in the directory containing those images, could you run the following command and post the output ? It's beginning to sound more like a permissions issue now ...
mounted it again successfully (as root)
-rw-r--r-- 1 root root 2311802 Jan 21 21:44 DSC_0095.JPG
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.