Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Recently I bought a new smartphone (with Android). When I connect it to my laptop, the (gui)file manager (PCManFM) recognize it and show me the filesystem at route gphoto2://[usb:001,003]. But I can't found it in a terminal (nothing in /mnt nor in /media). But this is the output of lsusb:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 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 003 Device 002: ID 046d:c05a Logitech, Inc. Optical Mouse M90
Bus 002 Device 002: ID 04f2:b1d8 Chicony Electronics Co., Ltd 
Bus 001 Device 003: ID 0fce:0171 Sony Ericsson Mobile Communications AB 

How can I mount it knowing the bus and device numbers?. (001:003 in this case). My OS is Debian Wheezy.

The output of the mount command:

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=497357,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=405696k,mode=755)
/dev/disk/by-uuid/ec90e556-b90e-467c-80b6-bde9048e6686 on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=2486440k)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
share|improve this question
    
What does mount command say? See this link. –  yegorich Dec 13 '13 at 15:16
add comment

2 Answers

up vote 3 down vote accepted

When you see the handlers like gphoto2:// and smb:// these are special interfaces that the GNOME desktop or whatever file browser you're using is making available to access these devices. In the case of gphoto2, the desktop is using the application gphoto2`

lsof

The only way I can think to gain access to a mount such as this would be to mount it as you did before using Nautilus or whatever file browser, and then using a tool such as lsof to see what files/devices are opened by Nautilus.

$ lsof -p $(pgrep nautilus)

But if you're having to connect to your phone via gphoto2 then you're likely not mounting the device a a mass storage device but rather a PTP - Picture Transfer Protocol. There's a Linux FUSE implementation for PTP too.

gvfs?

I would also look in your $HOME directory for a sub-directory called .gvfs. Usually when GNOME or Nautilus are doing the mounting this directory is created as a convenience.

In newer versions of GNOME (3+) this directory has moved and is now here, /run/user/$UID/gvfs.

Example

$ ls -l /run/user/$UID/gvfs/smb-share\:server\=tank\,share\=t 
total 2
drwx------. 1 saml saml    0 Oct 31 09:16 Development
drwx------. 1 saml saml    0 Nov 18 14:52 home
drwx------. 1 saml saml    0 May 14  2013 incoming
...

NOTE: That's a environment variable $UID that is often set in Bash on most modern systems. If it isn't set you can find your user's ID like so:

$ id
uid=1000(saml) gid=1000(saml) groups=1000(saml),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
share|improve this answer
    
On newer systems, the gvfs mount directory has moved to /run/user/$UID/gvfs. –  cjm Dec 13 '13 at 15:43
    
@cjm - thanks for the correction. I've added it to the A. –  slm Dec 13 '13 at 17:54
add comment

Your smartphone's partition is mounted via gphotofs, that is based on FUSE. That's why you don't see it under /mnt and /media.

You can try to mount your partition via:

gphotofs /mnt
share|improve this answer
    
"that is based on FUSE. That's why you don't see it under /mnt and /media." The second part does not necessarily follow from the first. FUSE or fully-kernel-space file system implementation has no bearing on where in the file system tree a file system can be mounted. I'm not familiar with gphotofs but can't see it having such an arbitrary limitation. –  Michael Kjörling Dec 13 '13 at 15:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.