Android mounting point

Hi Opensuse,

I’m on opensuse V13.2 64.

How do you find the mounting point of an android phone?

Thank you.

Which desktop environment are you using?

In general MTP is used to communicate with recent Android devices, so the following may be helpful to you

https://wiki.archlinux.org/index.php/MTP

This thread may be relevant too (although discussing openSUSE 13.1)

https://forums.opensuse.org/showthread.php/492704-Cannot-connect-Android-phone-MTP-support-not-working-in-13-1

If the Android device is capable of acting as a USB storage device (some are), then this may also be relevant with respect to default mount point for removable media

http://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/opensuse-13-2-external-media-mount-point-fix-4175540206/

In case your Android device isn’t being detected, it may be necessary to provide a udev rule as explained in this blog (along with other useful tips)

http://linulicious.blogspot.co.nz/2014/11/adding-rules-for-mtp-and-getting-your.html

Thank you for your help.

I’m on KDE.

May I rephrase the question?

I have a script using rsync to copy files, in a rigorous way, onto an SD card. The script uses a target directory such as /run/media/david/3330-6239/

I’m trying to edit the same script to copy files to an android phone, but there’s nothing equivalent to /run/media/david/3330-6239/, hence my original question.

In the Dolphin file manager, on the left side grey column, the phone appears as SAMSUNG_Android, after clicking that name, Dolphin displays the contents of the android, and mtp: > SCH-I545 appears above.

Is the Android mounted in an equivalent directory as /run/media/david/ …, and if so, where ?

I’ve tried a several permutations for the android mount point, but can’t find a suitable name.
When connecting to an Android, what’s the best name for the target directory in rsync?

Hi
It will be using fuse to mount, if you open a terminal and run the command;


mount

You should see it there under a gvfs directory.

I did an su followed by mount

 

---- trimmed above ---

gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)

---- trimmed below ------

 

Dolphin displays the contents of

/run/user/1000/gvfs

as empty

What now?

Some more information.

I did a search for the phone, which Dolphin id’s as SCH-I545.

  1. Using desktop search, I verify no directories are removed from the search
  2. Using Dolphin, I click on Root, then do a filename, everywhere search for SCH-I545

which returns nothing.

For a test example, I insert an SD card, then using YaST Partitioner, I see it listed as /dev/sdc1,
which is mounted at /run/media/david/DCIM/ , as expected/

However using Yast Partitioner, I don’t see anything related to the phone 64Gb microSD card.

Hope that helps.

Thank you.

Hi
Don’t get confused by the different mount methods, when you plug in an sd card, usb device etc this is a block device and therefore is shown under /dev/. When connecting a device like a phone/tablet and it’s seen these days as an mtp device not a block device.

It will use gvfs/fuse to mount so it should, if connected properly (check journalctl output) or I think ‘udevadm monitor’ and plug the device in to see what spits out.

It should then be seen under the gvfs directory as mtp:<something>.

I think you need to tell the phone it is ok to make the connection

From a command window, I did

  1. su
  2. udevadm monitor
  3. then disconnect, reconnect the android phone

which produced



linux-aiwy:/home/david # udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[14994.404907] remove   /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1:1.0 (usb)
KERNEL[14994.405057] remove   /devices/pci0000:00/0000:00:13.2/usb2/2-1 (usb)
UDEV  [14994.407172] remove   /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1:1.0 (usb)
UDEV  [14994.408467] remove   /devices/pci0000:00/0000:00:13.2/usb2/2-1 (usb)
KERNEL[15003.485153] add      /devices/pci0000:00/0000:00:13.2/usb2/2-1 (usb)
KERNEL[15003.486461] add      /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1:1.0 (usb)
KERNEL[15003.487093] add      /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1:1.0/host10 (scsi)
KERNEL[15003.487333] add      /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1:1.0/host10/scsi_host/host10 (scsi_host)
KERNEL[15004.488891] add      /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1:1.0/host10/target10:0:0 (scsi)
KERNEL[15004.489053] add      /devices/pci0000:00/0000:00:13.2/usb2/2-1/2-1:1.0/host10/target10:0:0/10:0:0:0 (scsi)
KERNEL[15004.491550] add      /devices/virtual/bdi/11:1 (bdi)

--------------- trimmed  --------------------------------------------------


Does this contain information to track it down?

From the grey left column in Dolphin, clicking on SAMSUNG_Android causes mtp: > SCH-I545 to appear,
which is the Android OS name of my phone.

More information.

Doing an lsusb produces



david@linux-aiwy:~> lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 002 Device 008: ID 03f0:3307 Hewlett-Packard 
Bus 002 Device 010: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-I9300 Phone [Galaxy S III], GT-P7500 [Galaxy Tab 10.1]
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


Hi
Just an FYI, when using su it’s far better to use su - to ensure your using the root users environment, not your own.

What about the output from the command mount (you don’t have to be root user) after it appears in dolphin.

May not be what you want, but:

Have you tried KDE Connect? Works nicely here in oS 13.2 KDE 4.14.9. It’s available in the repos (for PC) and play store (for phone).

In KDE 4, when I connect a Moto G phone it shows up in Dolphin places. AFAIU you can loose r/w capability to the phone storage if the phone tries to access it, taking ownership, so as a rule of thumb I don’t use the phone while it is connected to the PC by the USB cable.

Wirelessly, I use an app called AndSMB, very stable -you’d need a samba server, obviously. I haven’t found anything to connect to a NFS server at the time.

On Wed 23 Dec 2015 05:26:01 PM CST, brunomcl wrote:

May not be what you want, but:

Have you tried KDE Connect? Works nicely here in oS 13.2 KDE 4.14.9.
It’s available in the repos (for PC) and play store (for phone).

In KDE 4, when I connect a Moto G phone it shows up in Dolphin places.
AFAIU you can loose r/w capability to the phone storage if the phone
tries to access it, taking ownership, so as a rule of thumb I don’t use
the phone while it is connected to the PC by the USB cable.

Wirelessly, I use an app called AndSMB, very stable -you’d need a samba
server, obviously. I haven’t found anything to connect to a NFS server
at the time.

Hi
I use ssh on my android devices, then just use sftp… but I’m only
grabbing files, not writing.


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 | GNOME 3.10.1 | 3.12.51-52.31-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!

Recommend…

First, you should know that a device can be mounted either as a modem or as a storage device and once mounted does not support the other functionality.
This is commonly specified in the udev rules.

It’s been a long time since I’ve seen a phone mounted as a modem by default but it needs to be checked.

Next,
You need an app to access the smartphone.
Android developers commonly use the Android Debugger Bridge (ADB) which is found by downloading the Android SDK (choose your version).
If you install it, you should be able to access your smartphone by command line and do any storage related operations.

In fact, many applications use the ADB to provide functionality for device read/write operations… You can script it, frontend it, etc.

TSU

Output from mount



david@linux-aiwy:~> mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=4043664k,nr_inodes=1010916,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
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,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
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,cpu,cpuacct)
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,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
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)
/dev/mapper/system-root on / type btrfs (rw,relatime,space_cache)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
/dev/mapper/system-root on /.snapshots type btrfs (rw,relatime,space_cache)
/dev/mapper/system-root on /var/tmp type btrfs (rw,relatime,space_cache)
/dev/mapper/system-root on /var/lib/pgsql type btrfs (rw,relatime,space_cache)
/dev/mapper/system-root on /var/lib/named type btrfs (rw,relatime,space_cache)
/dev/mapper/system-root on /var/spool type btrfs (rw,relatime,space_cache)
/dev/mapper/system-root on /var/opt type btrfs (rw,relatime,space_cache)
/dev/mapper/system-root on /var/crash type btrfs (rw,relatime,space_cache)
/dev/mapper/system-root on /var/lib/mailman type btrfs (rw,relatime,space_cache)
/dev/mapper/system-root on /usr/local type btrfs (rw,relatime,space_cache)
/dev/mapper/system-root on /tmp type btrfs (rw,relatime,space_cache)
/dev/mapper/system-root on /srv type btrfs (rw,relatime,space_cache)
/dev/mapper/system-root on /opt type btrfs (rw,relatime,space_cache)
/dev/mapper/system-root on /var/log type btrfs (rw,relatime,space_cache)
/dev/sda1 on /boot type ext4 (rw,relatime,stripe=4,data=ordered)
/dev/mapper/system-home on /home type xfs (rw,relatime,attr2,inode64,noquota)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
gvfsd-fuse on /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)
/dev/sdc1 on /run/media/david/DCIM type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)




Bruno and Malcolm make good suggestions…
If you have a network connection available, it’s easier, less mysterious and reliable than a direct connection over USB, but of course you will be limited by what the server app’s access to the file directory. ADB is the preferred tool by Developers because it grants access to practically the entire system running in RAM.
Just install an FTP or HTTP server app on your phone and use a common client on your openSUSE.

As for your posted “mount” output,
I’d suspect the second to last line is your phone and your last line is a camera.

TSU