[xubuntu-users] How to mount a cell phone
Dave Dodge
dododge at dododge.net
Tue Nov 11 21:22:12 UTC 2014
On Mon, Nov 10, 2014 at 08:34:14AM -0300, Bruno Benitez wrote:
> > On 12.04 for an Android phone I use the following script:
> >
> > #!/bin/sh
> > ROOT=$(gvfs-mount -li|grep 'activation_root=mtp://\[usb:'|sed
> > 's/^.*\(mtp.*\)$/\1/')
> > echo $ROOT
> > thunar $ROOT
>
> I have found that installing an ftp/ssh client on the phone and
> eunning an ssh server in my machine saves me hours of head aches
In fact I found that using GVFS/MTP sometimes resulted in data
corruption. This was in 13.10 and may have been fixed since then; I
haven't tried MTP on a newer version.
A while back I attached my phone over MTP, tracked down the
/run/user/... directory where GVFS exposed the mountpoint, and did an
an rsync to copy my photos from the phone to the computer. The rsync
completed successfully. When I tried to view the photos on the
computer, most of them were fine but a few did not display. I tried
the rsync again and it still thought everything had been copied
correctly.
I used the phone to mail myself one of the broken photos. The mailed
copy did display on the computer, and when I compared it to the same
file under MTP I found that mounted version of the file was missing
the last 31 bytes. There was no error when accessing the photo over
the mount point, so the only way you'd know that MTP was giving you
the wrong data was by actually trying to view it.
I installed an rsync app on the phone, an ssh server on the computer,
and set up a special user account on the computer for the app to log
in and push its files. So far I have not had any problems syncing
files to the computer this way.
-Dave Dodge/dododge at dododge.net
More information about the xubuntu-users
mailing list