Bug 7638 - Better MTP device support / add jmtpfs in mageia repositories (spec file and udev rules+scripts provided)
Summary: Better MTP device support / add jmtpfs in mageia repositories (spec file and ...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: New RPM package request (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: High major
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard:
Keywords:
: 21095 28027 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-30 17:37 CEST by Y.LE_NY
Modified: 2021-05-03 20:08 CEST (History)
17 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
jmtpfs 0.4 mageia spec file / build with this spec file and install works fine. (880 bytes, application/x-gzip)
2012-09-30 17:40 CEST, Y.LE_NY
Details
files to add automount MTP device support in Mageia via udev / Tested with Mageia 2 and works fine (542 bytes, application/x-gzip)
2012-09-30 17:43 CEST, Y.LE_NY
Details
SRPM file directly for jmtpfs (242.21 KB, application/x-rpm)
2012-11-05 22:08 CET, Y.LE_NY
Details

Description Y.LE_NY 2012-09-30 17:37:41 CEST
Description of problem:
Mageia 2 have a buggy FUSE file-system for MTP support with mtpfs
and the automount for MTP devices doesn't exist in Mageia.

NOTE : And this ticket, I give you all you need to add a full MTP devices support in Mageia.
(I give you : tested mageia spec file, udev rules with scripts for automount.
The only thing that mageia packager need to do is to include the 
udev rules file with scripts files for automount in the mageia spec file.
I don't know how to do it)

And it is the same problem with Fedora :
Mailling list thread "MTP support in Fedora" here :
http://comments.gmane.org/gmane.linux.redhat.fedora.general/420736
and
our mageia users :
https://forums.mageia.org/en/viewtopic.php?f=8&t=2857

There is only one software that works fine with Android devices and that support well the 
MTP protocol (http://en.wikipedia.org/wiki/Media_Transfer_Protocol) 
because 
Google remove USB Mass Storage (http://en.wikipedia.org/wiki/USB_mass-storage_device_class) 
protocol in the latest android OS release.

This software is jmtpfs.
I have tested it and it works fine with my Asus nexus 7 tablet and Mageia2,

Web site : http://research.jacquette.com/jmtpfs-exchanging-files-between-android-devices-and-linux/
Source: http://research.jacquette.com/wp-content/uploads/2012/05/jmtpfs-0.4.tar.gz

Tested with success with :
* Mageia 2 with updates rpm in theb repo
* libmtp 1.1.5
* libusb 1.0.9
* libmagic 5.11
FUSE library version: 2.8.7
fusermount version: 2.8.7
using FUSE kernel interface version 7.12

Version-Release number of selected component (if applicable):
jmtpfs 0.4

+++++

How to use it ?

1) create a folder in your home directory 
$ mkdir ~/android

2) mount your android internal memory storage (/sdcard FS) to the android folder 
$ jmtpfs ~/android/
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note.
Android device detected, assigning default bug flags

3) Copy/Move/Delete the files/folders that you want from/to your android folder (your android device files) in your home directory from/to an other folder on yur computer. You use mc, Dolphin (KDE), Nautilus, command line, etc ... to do these tasks

4) umount your android internal memory storage (/sdcard FS) to the android folder 
$ fusermount -u ~/android
Comment 1 Y.LE_NY 2012-09-30 17:40:50 CEST
Created attachment 2878 [details]
jmtpfs 0.4 mageia spec file / build with this spec file and install works fine.

jmtpfs 0.4 mageia spec file / build with this spec file and install works fine.
Comment 2 Y.LE_NY 2012-09-30 17:43:22 CEST
Created attachment 2879 [details]
files to add automount MTP device support in Mageia via udev / Tested with Mageia 2 and works fine

 files to add automount MTP device support in Mageia via udev / Tested with Mageia 2 and works fine
Y.LE_NY 2012-09-30 18:12:28 CEST

Summary: Mageia 2 have a buggy FUSE file-system that supports MTP devices / add jmtpfs in mageia repositories (spec file and udev rules+scripts provided) => Mageia 2 have a buggy FUSE file-system tool that supports MTP devices and no automount for them / add jmtpfs in mageia repositories (spec file and udev rules+scripts provided)

Comment 3 Y.LE_NY 2012-10-01 09:02:08 CEST
Why Mageia 2 have a buggy FUSE file-system for MTP support because it use mtpfs ?

mtpfs sees only directories, not files, on Verizon Wireless Samsung Galaxy S III with lots of data
https://bugzilla.redhat.com/show_bug.cgi?id=841260
Comment 4 Funda Wang 2012-11-03 11:03:15 CET
To reporter, would you mind providing an SRPM file directly for jmtpfs?

CC: (none) => fundawang

Comment 5 Olivier Blin 2012-11-05 15:36:31 CET
We probably don't want to automount mtp devices that way.
This should be handled by the desktop, and user proper permissions.

CC: (none) => mageia

Comment 6 Y.LE_NY 2012-11-05 22:08:42 CET
Created attachment 3047 [details]
SRPM file directly for jmtpfs

(In reply to comment #4) from Funda Wang
> To reporter, would you mind providing an SRPM file directly for jmtpfs?

OK, in this patch
Comment 7 Y.LE_NY 2012-11-05 22:11:07 CET
(In reply to comment #5)
> We probably don't want to automount mtp devices that way.
> This should be handled by the desktop, and user proper permissions.

@Olivier
No problems, if you have a better solution than me to do the task.
I use the scripts because I don't find other solution.
Comment 8 Damien Lallement 2013-07-30 14:44:50 CEST
cauldron already supports mtp devices with libmtp 1.1.6:
http://svnweb.mageia.org/packages/cauldron/libmtp/current/SPECS/libmtp.spec?revision=407151&view=markup
And under GNOME, since gvfs 1.17:
http://svnweb.mageia.org/packages/cauldron/gvfs/current/SPECS/gvfs.spec?revision=434004&view=markup

CC: (none) => mageia

Comment 9 Y.LE_NY 2013-07-30 17:22:02 CEST
>cauldron already supports mtp devices with libmtp 1.1.6:
OK, I will test it in Mageia 4 Alpha 1.
Comment 10 Damien Lallement 2013-08-27 01:07:48 CEST
So? Ping? :-)
Comment 11 Damien Lallement 2013-09-19 18:15:43 CEST
Ping?
Comment 12 Manuel Hiebel 2013-10-10 21:40:52 CEST
looks to work https://bugs.mageia.org/show_bug.cgi?id=11394

(as I guess nobody will backport it, closing.)

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 13 David Walser 2013-12-07 20:22:22 CET
I have a Samsung Galaxy S4 running Android, and mtpfs does not work (you can view the directory structure, but can't create anything) and kio-mtp is about the same.  I need to do more testing and see if the phone can see the files it transfers, but jmtpfs, linked in Comment 0, appears to at least be able to transfer files.  go-mtpfs looks like it might work as well:
https://github.com/hanwen/go-mtpfs

Resolution: FIXED => (none)
Version: 2 => 3
CC: (none) => luigiwalser
Status: RESOLVED => REOPENED

Comment 14 David Walser 2013-12-08 00:52:42 CET
jmtpfs does indeed work, apparently quite well.
Julien Gouesse 2013-12-09 14:08:22 CET

CC: (none) => gouessej

Comment 15 Marja Van Waes 2015-03-31 16:04:29 CEST
Mageia 3 changed to end-of-life (EOL) status 4 months ago.
http://blog.mageia.org/en/2014/11/26/lets-say-goodbye-to-mageia-3/ 

Mageia 3 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of Mageia
please feel free to click on "Version" change it against that version of Mageia
and reopen this bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

--
The Mageia Bugsquad

Status: REOPENED => RESOLVED
Resolution: (none) => OLD

Comment 16 Julien Gouesse 2015-03-31 17:31:52 CEST
It seems to be fixed in Mageia 4. I succeeded in using MTP with a Samsung S3 4G (i9305) a few days ago.
Comment 17 David Walser 2015-03-31 17:55:45 CEST
mtpfs is still useless with a Samsung Galaxy S4 on Linux.

Even my old jmtpfs build wasn't working anymore on Mageia 4 (just tried it for the first time on Sunday).

I had to update libmtp to 1.1.8 (rebuilt from Cauldron SRPM) and jmtpfs to 0.5 (source tarball found in Debian) and it worked again.
Comment 18 David Walser 2015-03-31 17:56:29 CEST
Reopening, as Debian has packaged jmtpfs, so should we.

Version: 3 => Cauldron
Resolution: OLD => (none)
Status: RESOLVED => REOPENED

David Walser 2015-04-25 11:48:18 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=11394

Florian Hubold 2015-04-26 14:28:34 CEST

CC: (none) => doktor5000

Comment 19 papoteur 2015-07-14 15:12:58 CEST
Hello,
I tried in Mageia 4 today to connect my Android Samsung Core. Dolphin sees the phone, I can open the device, seeing Card and Phone.
But some directories are not accessible to the user. Root can access all directories.

CC: (none) => yves.brungard_mageia

Comment 20 Pierre Jarillon 2015-08-27 15:42:36 CEST
Same than https://bugs.mageia.org/show_bug.cgi?id=10571 ?

CC: (none) => jarillon

Comment 21 Pierre Jarillon 2015-08-27 15:44:19 CEST
It seems to be the same than
https://bugs.mageia.org/show_bug.cgi?id=7638 ?
Comment 22 Florian Hubold 2015-12-19 09:00:32 CET
Cannot reproduce in Mageia 5, but I don't have any Samsung phone to test. My Sony Xperia Z3 Compact works just fine, it's accessed in dolphin via the mtp:// kio slave.

FWIW, I don't have mtpfs installed, maybe this is even conflicting as it seems to error out for others as well with "fuse: missing mountpoint parameter"

@David: Can you still reproduce? Maybe remove mtpfs to try if that helps.
Comment 23 David Walser 2015-12-19 18:26:35 CET
mtpfs is completely broken, in fact now it can't even connect to the device.  I guess I hadn't tested kio-mtp since upgrading to Mageia 5, and it does appear to work now.  Whether or not mtpfs is installed doesn't matter, and there's no reason it would produce any "conflict" as it's just a command-line program.  So, it's nice that kio-mtp seems to work, but that still has limited usefulness, as it doesn't make the device accessible from the command line.  We should still package jmtpfs.
Comment 24 papoteur 2015-12-21 19:05:19 CET
Tried my Samsung Galaxy Core 4G, I can explore any file in Card and Phone from dolphin in Mageia 5. I can also copy a file in Phone.

Thus it works fine.
Comment 25 Morgan Leijström 2016-01-12 17:08:26 CET
On my Minolta Dimage A2 camera i can browse the folder using Dolphin, but as soon as I try to retrieve a file it disconnects.
(AFAIK it failed to work with MSWindowsWXP too)
I have not tried since before mageia where it did not work at all.

mga5-64, kio-mtp is installed, mtpfs is not installed.

It is an old camera, so maybe i could try to change to mtpfs if it possibly speak an old dialect the camera maybe do too.  Or try gmtp.

(i just stumbled on this one and tell my experience, not important for myself)

I connect my "smart"phone using USB mode, and on my camera i quickly move the memory module...

CC: (none) => fri

Comment 26 David Walser 2016-01-12 17:14:30 CET
mtpfs is a waste of time, but you can try jmtpfs, I bet it'd work.
Comment 27 Samuel Verschelde 2016-01-12 17:32:06 CET
Altering subject so that each bugzilla notification will not hurt my eyes anymore :)

Summary: Mageia 2 have a buggy FUSE file-system tool that supports MTP devices and no automount for them / add jmtpfs in mageia repositories (spec file and udev rules+scripts provided) => Better MTP device support / add jmtpfs in mageia repositories (spec file and udev rules+scripts provided)

Comment 28 Morgan Leijström 2016-01-12 22:25:37 CET
I will try jmtpfs when it is packaged for mga5-64 :)
Comment 29 Morgan Leijström 2016-01-12 22:28:10 CET
There is a week old fedora package
http://rpmfind.net/linux/RPM/fedora/devel/rawhide/x86_64/j/jmtpfs-0.4-2.fc24.x86_64.html

(sorry for bombarding your eyes...) ;)
Comment 30 David Walser 2016-01-12 22:29:07 CET
I don't know if it can be added in Mageia 5 (I guess maybe as a backport).  It's not hard to compile by itself though.
Comment 31 Ken Arromdee 2016-07-25 04:47:41 CEST
I also could not get mtpfs to work on a Galaxy J3 phone.  jmtpfs did work.

CC: (none) => arromdee

Comment 32 Samuel Verschelde 2016-10-11 20:54:28 CEST
Assigning this package request to all packagers collectively. On a voluntary basis, one of them might want to integrate it to the distribution and maintain it for bug and security fixes.

You might also want to join the packager team to maintain this piece of software: see https://wiki.mageia.org/en/Becoming_a_Mageia_Packager

Assignee: bugsquad => pkg-bugs

Comment 33 Marja Van Waes 2016-11-02 09:29:21 CET
Sorry, bugs@ml and pkg-bugs@ml members, for the avalanche.

72 bugs with the "New RPM package request" component, had a severity of "normal" or more, which can lead to losing precious time when searching Bugzilla for bugs that urgently need to get fixed

Now mass-changing that to "enhancement", as it should be for package requests.

https://wiki.mageia.org/en/How_to_report_a_bug_properly#How_to_file_a_package_request

@ the reporter of this package request

Please check in http://madb.mageia.org/ whether this software did already get packaged, and close this bug report if it did.
Please do also close it if you find a package with the same purpose, that meets your needs.

Severity: major => enhancement

Comment 34 Morgan Leijström 2020-11-30 09:56:34 CET
We have some similar bugs on connection problem between phone and Mageia, especially(?) Plasma.

I post here links between the bugs so you with similar problem can browse around. Maybe some can be duplicate, some resolved old, some get updated with more input.

Bug 21095 - Accessing my android's files through MTP in Dolphin fails

Bug 18454 - Drag and drop between dolphin windows on Mageia and (USB mounted) Android file-systems fails
Comment 35 David Walser 2021-01-06 23:42:28 CET
*** Bug 21095 has been marked as a duplicate of this bug. ***

CC: (none) => stormi-mageia

Comment 36 David Walser 2021-01-06 23:42:48 CET
*** Bug 28027 has been marked as a duplicate of this bug. ***

CC: (none) => juergen.harms

Comment 37 Juergen Harms 2021-01-07 07:34:08 CET
These comments do not account for the fact that, in Mageia-7, mtp for (some - all?) android devices indeed worked, and that some time between 2012 and 2021 the original problem has been fixed without leaving trace in the comments made to bugzilla 7638.
Comment 38 David Walser 2021-01-09 05:01:25 CET
No, nothing has changed.  mtpfs still does not work for Samsung Galaxy phones, jmtpfs does.
Juergen Harms 2021-01-11 09:03:40 CET

CC: juergen.harms => (none)

Comment 40 Aurelien Oudelet 2021-01-25 10:17:41 CET
Xiaomi Mi 9T pro not affected.

Note that user must set USB connection as a File sharing connection instead of "Charge-only".
Some Android devices set by default USB connection as Charge Battery-only.

CC: (none) => ouaurelien

Comment 41 Juergen Harms 2021-01-25 11:50:34 CET
This topic has now become an issue in the dev ML (I do not have write access there - trying to establish the reference to this bug by posting here)

In the meantime, I have created OS partitions with Fedora and Debian - mtp with my Samsung S9 works like a charm there also (as it does on Mageia-7): should not be an unsurmountable problem with Mageia. This bug has now the proud age of more than 8 years, for me it is turning into a show-stopper.

CC: (none) => juergen.harms

Morgan Leijström 2021-01-25 13:25:25 CET

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=28216

Comment 42 Aurelien Oudelet 2021-01-30 18:01:21 CET
*** Bug 28216 has been marked as a duplicate of this bug. ***

CC: (none) => rfox

Comment 43 Aurelien Oudelet 2021-01-30 18:16:31 CET
I don think there is a missing package in Mageia that can permit us to connect to some Android devices.

Note that, on my side, Android 9 and onwards (Android 10, Android 11) devices can be connected with default provided MTP connection.
Note that on theses devices, it is sometimes required to "trust" the computer or to correctly set the USB connection as MTP connection instead of "USB Charge-only".

Also, some Android's manufacturers does not provide such connection or they deactivate it. Sometimes, you must activate USB debugging somewhere in your phone settings to have datas on USB.

We, at Mageia, can't handle every particular situation/device with our distribution, but it seems we can have a package here:

(In reply to David Walser from comment #39)
> Fedora has packaged jmtpfs:
> https://lists.fedoraproject.org/archives/list/package-announce@lists.
> fedoraproject.org/thread/NKN2726Q5BY7Z2OUWUWRNBZP3QCVM2W2/

So. Raising this bug.
CC'd some great packagers who have handled FUSE recently.

CC: (none) => geiger.david68210, jani.valimaa
Status: REOPENED => NEW
Priority: Normal => High
Severity: enhancement => major

Comment 44 David Walser 2021-01-30 18:26:15 CET
There is, it's jmtpfs, it's long known.  For whatever reason, libmtp/mtpfs does not work with many Android devices (Samsung ones seem to be commonly affected).
Comment 45 Oleg Bosis 2021-03-12 20:10:26 CET
You(In reply to Aurelien Oudelet from comment #42)
> *** Bug 28216 has been marked as a duplicate of this bug. ***

You are wrong marking that bug as duplicate of this one.

Bug 28216 is caused by a bug in libusb with a fix available here:

https://github.com/libusb/libusb/commit/f6d2cb561402c3b6d3627c0eb89e009b503d9067

I've tested this patch on my MGA8 system and my Samsung phone with Android 11 is now accessible again using MTP protocol from within dolphin.

CC: (none) => olelukoie

Comment 46 Ken Arromdee 2021-05-03 20:08:25 CEST
Still having the same problem I described before, Mageia 8.0 now.  mtpfs did not work, jmtpfs did work.

Both jmtpfs and mtfs leave something to be desired, in fact.

1) try to mount.
2) the phone now asks you to allow the transfer.
3) mtpfs or jmtpfs immediately exits because the mount failed, *without waiting for you to allow the transfer first*, which is the problem.
4) Allow the transfer, but it's too late since the mount already failed.
5) For mtpfs, there is no way to get it to work.  For jmtpfs, you can umount and then mount the phone a second time without disconnecting the USB cable, and it will work.

jmtpfs is better because at least there's a workaround of umount and mount, but neither program is really behaving sensibly.  Note that this problem happens when directly using mount and umount, not having another program automatically mount, which may behave differently with respect to not waiting.

Note You need to log in before you can comment on or make changes to this bug.