How do I copy files *to* my Android using MTP [with Dolphin]

Folks,

It’s really cool that I can now pull files off my galaxy S3 using Dolphin. However, I can’t copy files to the phone. I have set up the following udev rules in 99-android.rules (which may be completely the wrong thing to do):

SUBSYSTEM==“usb”, ATTR{idVendor}==“04e8”, ATTR{idProduct}==“6860”, MODE=“0666”

Does anyone know how to give me permissions to copy data on to the phone please?

Thanks!

Hi
Check with the mount command, I suspect that it’s mounting ro (as in read-only)

Modify your rule to;


SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", SYMLINK+="libmtp-%k", MODE="0666", GROUP="users"

Or,
Try removing any UDEV rules you manually created.

On my system, openSUSE automatically recognized and mounted my Android devices automatically(appear in the left “places” pane) an can read/write without a problem.

If you’re using KDE/Dolphin, things should work automatically.
Should. :slight_smile:

TSU

I put the udev rules because it wasn’t working, so that’s not the issue. :slight_smile:

Maclom, when you say look at the mount command, what do you mean? I’m not manually mounting it, the OS is doing that, so how can I see what it has done? (If that’s what you’re getting at.) Modding the udev rules made no difference. :frowning:

Dolphin sees two things:

camera:/USB PTP Class Camera@usb:/store_00010001/
camera:/USB PTP Class Camera@usb:/store_00020002/

Both as subdirectories of:

camera:/USB PTP Class Camera@usb:/

And it also sees this:

camera:/Samsung GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note@usb:002,008/

The former I am able to explore, but not copy to. the latter just continually tells me it’s loading the folder, but never does.

The Android mount option is as MTP, not PTP. I’m now wondering whether Dolphin labels it wrong, or it isn’t really mounting as MTP at all.

On Tue 20 Aug 2013 05:46:02 PM CDT, DiBosco wrote:

Malcolm, when you say look at the mount command, what do you mean? I’m
not manually mounting it, the OS is doing that, so how can I see what it
has done? (If that’s what you’re getting at.) Modding the udev rules
made no difference. :frowning:

Hi
Open a terminal (konsole?) and run the command;


mount

You will get a list of file systems mounted, the device should be in
that list, look between the ()'s.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.3 (x86_64) Kernel 3.7.10-1.16-desktop
up 1:35, 3 users, load average: 0.25, 0.20, 0.20
CPU AMD E2-1800@1.70GHz | GPU Radeon HD 7340

Hello Malcolm et al,

I too am suffering this read-only problem (but with a Tesco Hudl aka Archos).
This thread looked very promising but it seems to have petered out.
Maybe I can continue it?

I think that the last request for information involved the mount command. Here’s mine:

~ # mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=1784748k,nr_inodes=446187,mode=755)
tmpfs on /dev/shm type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sda2 on / type ext4 (rw,noatime,discard,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,size=1048576k)
tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,relatime,mode=755)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /var/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sdb1 on /home type ext4 (rw,noatime,discard,data=ordered)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
myRouter.homeip.net:/nfs on /nfs type nfs4 (rw,relatime,vers=4.0,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.0.235,local_lock=none,addr=192.168.0.10)
none on /var/lib/ntp/proc type proc (ro,nosuid,nodev,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
gvfsd-fuse on /var/run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
:~ # 

Which set of brackets should I be examining?

Best regards, Martin

I should have mentioned that the mount command was issued after my device had been plugged in. The device notifier had popped up and I had selected the (only) option “Open with File Manager”.

Dolphin had opened and was displaying the files on my device.

Sorry to pepper the thread with subsequent posts, but …

A bit more (I hope relevant) information.

I have rounded-up four MTP players and connected then as comparisons. This, I think is strange:

Display the MTP devices on USB bus 1.


gzunder:~ # lsusb -s 1:
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 020: ID 10d6:1100 Actions Semiconductor Co., Ltd MPMan MP-Ki 128 MP3 Player/Recorder
Bus 001 Device 018: ID 0471:204e Philips (or NXP) GoGear RaGa (SA1942/02)
Bus 001 Device 012: ID 04e8:5125 Samsung Electronics Co., Ltd 
Bus 001 Device 023: ID 0e79:5008 Archos, Inc. 

The errant device is the Archos - VID/PID 0e79:5008

Now look at the permisions:


gzunder:~ # ls -l /dev/bus/usb/001/*
crw-rw-r--  1 root root 189,  0 Oct 21 10:52 /dev/bus/usb/001/001
crw-rw-r--  1 root root 189,  1 Oct 21 09:04 /dev/bus/usb/001/002
crw-rw-r--+ 1 root root 189, 11 Oct 21 10:11 /dev/bus/usb/001/012
crw-rw-r--+ 1 root root 189, 17 Oct 21 10:51 /dev/bus/usb/001/018
crw-rw-r--+ 1 root root 189, 19 Oct 21 11:02 /dev/bus/usb/001/020
c---rw-rw-+ 1 root root 189, 22 Oct 21 11:04 /dev/bus/usb/001/023
gzunder:~ # 

Isn’t there something wrong with the permisions of device 23? The “rw”'s right shifted? No permissions for Owner?

Regards, Martin

Hi
So is a udev rule added for this device?

My first reaction is “No”. But I thought that I better make sure…
I now know that I have (at least) two udev rules locations? /etc/udev/rules.d AND /usr/lib/udev/rules.d ?
And the latter had a 69-libmtp.rules in it, and that had a MODE=“066”! How did that get there? No matter, I guess that I’ll never find that out.

Anyway, either by just correcting to MODE=“0664” or rem’ing that entry (0e79:5008) it out completely, the permissions to the /dev/bus/usb// are now what I would expect:


gzunder:~ #ls -l /dev/bus/usb/001/020
 crw-rw-r--+ 1 root root 189, 19 Oct 22 10:02 /dev/bus/usb/001/020 
gzunder:~ #

But… Although, the permissions reported in Dolphin imply that I have write permission, as soon as I try to write (right click | New | Folder) to the player, I get a red pop-up under the path field that says:
The process for the mtp protocol died unexpectedly.” and I have to unplug/plug in again to see the device again?
Any suggestions will be very welcome…

Regards, Martin

PS - I understand that the “+” in the ls output informs me that this file is subject to an “access control list”. How do I investigate this?
PPS - Apart from the two udev rule locations noted above, are there others?

On Tue 22 Oct 2013 09:36:02 AM CDT, martinprowe wrote:

malcolmlewis;2592563 Wrote:
> So is a udev rule added for this device?

My first reaction is “No”. But I thought that I better make sure…
I now know that I have (at least) two udev rules locations?
/etc/udev/rules.d AND /usr/lib/udev/rules.d ?
And the latter had a 69-libmtp.rules in it, and that had a MODE=“066”!
How did that get there? No matter, I guess that I’ll never find that
out.

Anyway, either by just correcting to MODE=“0664” or rem’ing that entry
(0e79:5008) it out completely, the permissions to the /dev/bus/usb//
are now what I would expect:

Code:

gzunder:~ #ls -l /dev/bus/usb/001/020
crw-rw-r–+ 1 root root 189, 19 Oct 22 10:02 /dev/bus/usb/001/020
gzunder:~ #


But… Although, the permissions reported in Dolphin imply that I have
write permission, as soon as I try to write (right click | New | Folder)
to the player, I get a red pop-up under the path field that says:
“-The process for the mtp protocol died unexpectedly.-” and I have to
unplug/plug in again to see the device again?
Any suggestions will be very welcome…

Regards, Martin

PS - I understand that the “+” in the ls output informs me that this
file is subject to an “access control list”. How do I investigate this?
PPS - Apart from the two udev rule locations noted above, are there
others?

Hi
So the device is set to usb debug mode? I’m not a KDE user so don’t
have any idea how Dolphin handles things :frowning: Have you tried my jmptfs
package?


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLED 11 SP3 (x86_64) GNOME 2.28.0 Kernel 3.0.93-0.8-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

You could use the following to determine which package installed the file (guessing libmtp or similar).

rpm -qf <path to the file>

gzunder:~ #ls -l /dev/bus/usb/001/020
crw-rw-r–+ 1 root root 189, 19 Oct 22 10:02 /dev/bus/usb/001/020
gzunder:~ #

PS - I understand that the “+” in the ls output informs me that this file is subject to an “access control list”. How do I investigate this?
PPS - Apart from the two udev rule locations noted above, are there others?

You can use getfacl to find this ACL info…

getfacl /dev/bus/usb/001/020

This might be helpful

openSUSE 12.3: Chapter 9. Access Control Lists in Linux