2

I would like to rsync my music with my Android phone (Galaxy Nexus), I'm trying to work out the mount path to use from the shell. The mount command doesn't show up on the phone. In Nautilus the location of a music file is shown as:

gphoto2://[usb:001,009]/Music/foo.mp3

How would I mount this location from the shell?

(I know about Banshee and other music players. I just want to use the easy, reliable, crashless rsync.)

% cat /etc/issue
Ubuntu 12.04.1 LTS \n \l

% uname -a
Linux guava 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
tgies
  • 509

3 Answers3

2

gphoto is automounting your Android device. To find out where the actual mountpoint lies, use gvfs-mount -l. I believe the actual mountpoints all end up in ~/.gvfs.

tgies
  • 509
1

I have a Samsung Galaxy Tab 2 7.0 tablet, and it seems to act the same as yours. It does not get mounted automatically very well at all, and not in any usual way. I have sometimes gotten it to mount correctly, although often none of the folder contents are visible.

So, I started looking into it just today, and discovered a method that works very well, using this site: http://blog.itsbilal.com/index.php/2012/12/connect-an-android-4-0-phonetablet-to-ubuntu-the-reliable-way/

He mounts it in a subdirectory of your home directory; for my setup, it creates two folders, "Card" and "Tablet".

The storage is not in any of the usual places, but that doesn't really matter. I haven't actually figured out how to make it automatically mount using fstab, but I did create two shortcuts to mount and unmount on demand. If you want Unity quicklists, there was an article here that might help, although I didn't use this one.

PS... I believe that the phone needs to be unlocked in order to mount successfully.

Marty Fried
  • 18,466
  • That link seems to be broken. Perhaps you can post the key elements? – will Mar 03 '17 at 21:52
  • I don't remember anything about this now, but I did a google search on "connect an android 4.0 phone or tablet to ubuntu the reliable way", and found hits, such as: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjImcXM4rvSAhUBUWMKHamvAZUQFggaMAA&url=http%3A%2F%2Fpetescan321.tumblr.com%2Fpost%2F55039283616%2Fconnect-an-android-40-phonetablet-to-ubuntu&usg=AFQjCNHj3Xsan5TZgEzRWkkcrQiCKMCAig&sig2=oEAYpaij2OExgsOgz2UGew, and other hits. – Marty Fried Mar 04 '17 at 02:12
1

I rsync to my android like this (bash script):

if [ -n "`lsusb | grep -i Samsung`" ]
then
    phone=`mktemp --directory`
    go-mtpfs $phone &
    sleep 3s
    # Setting -T /tmp even though this is a security risk (/tmp race).
    # Without that rsync fails on renaming .foo to foo for some reason.
    opts="--archive --delete --update --progress -T /tmp"
    rsync $opts ~/from/my/stuff $phone/Card/stuff
    fusermount -u $phone
fi
Robert
  • 390
  • 6
  • 12