I had no success trying to connect my Galaxy S3 within LMDE, I have a semi-workable solution which allows me to connect and transfer files, it won't help with synching anything but for basic file transfers it seem to be working OK, the steps are provided below if it's any help to anybody..
Mounting Galaxy SIII within Linux Mint (Debian Edition)....
The basic steps are...
1. Install the MTP application of choice.
2. Discover some device specific identifiers.
3. Add rules to udev to recognise the device and mount/umount as required and restart udev service.
1. I tested mtpfs, jmtpfs and go-mtpfs of those I opted for go-mtpfs as is seemed to be that little bit better in terms of both stability and performance for me. I grabbed a pre-compiled binary from
http://hanwen.home.xs4all.nl/public/software/go-mtpfs/ I'm running LMDE 64bit so choose the go-mtpfs.amd64.ca2e2c82 file.
From a root terminal I set execution bits then copied it to /usr/local/sbin/ renaming it at the same time...
Code: Select all
# chmod +x go-mtpfs.amd64.ca2e2c82
# cp go-mtpfs.amd64.ca2e2c82 /usr/local/sbin/go-mtpfs
2. In order to discover the unique device attributes for the phone I had to find the syspath of the connected device (make sure the phone is plugged in), I found this by examining the output from lshal. This output is fairly verbose so I piped it to a file...
Open the hal.log file in a text editor and search for "phone" the snippet from mine looks like this....
Code: Select all
udi = '/org/freedesktop/Hal/devices/usb_device_4e8_6860_4df13e826b174f3d'
info.linux.driver = 'usb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_1d6b_2_0000_00_1d_7' (string)
info.product = 'GT-I9100 Phone [Galaxy S II]' (string)
info.subsystem = 'usb_device' (string)
info.udi = '/org/freedesktop/Hal/devices/usb_device_4e8_6860_4df13e826b174f3d' (string)
info.vendor = 'Samsung Electronics Co., Ltd' (string)
linux.device_file = '/dev/bus/usb/001/007' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'usb' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5' (string)
usb_device.bus_number = 1 (0x1) (int)
usb_device.can_wake_up = false (bool)
usb_device.configuration_value = 1 (0x1) (int)
usb_device.device_class = 0 (0x0) (int)
usb_device.device_protocol = 0 (0x0) (int)
usb_device.device_revision_bcd = 1024 (0x400) (int)
usb_device.device_subclass = 0 (0x0) (int)
usb_device.is_self_powered = true (bool)
usb_device.linux.device_number = 7 (0x7) (int)
usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5' (string)
usb_device.max_power = 96 (0x60) (int)
usb_device.num_configurations = 2 (0x2) (int)
usb_device.num_interfaces = 1 (0x1) (int)
usb_device.num_ports = 0 (0x0) (int)
usb_device.product = 'GT-I9100 Phone [Galaxy S II]' (string)
usb_device.product_id = 26720 (0x6860) (int)
usb_device.serial = '4df13e826b174f3d' (string)
usb_device.speed = 480.0 (480) (double)
usb_device.vendor = 'Samsung Electronics Co., Ltd' (string)
usb_device.vendor_id = 1256 (0x4e8) (int)
usb_device.version = 2.0 (2) (double)
The required info is the linux.sysfs_path parameter which is used by udevadm to get the required info...
From root terminal..
Code: Select all
# udevadm info --attribute-walk --path=/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5
Which produce the following output...
Code: Select all
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:1d.7/usb1/1-5':
KERNEL=="1-5"
SUBSYSTEM=="usb"
DRIVER=="usb"
ATTR{configuration}==""
ATTR{bNumInterfaces}==" 1"
ATTR{bConfigurationValue}=="1"
ATTR{bmAttributes}=="c0"
ATTR{bMaxPower}==" 96mA"
ATTR{urbnum}=="89"
ATTR{idVendor}=="04e8"
ATTR{idProduct}=="6860"
ATTR{bcdDevice}=="0400"
ATTR{bDeviceClass}=="00"
ATTR{bDeviceSubClass}=="00"
ATTR{bDeviceProtocol}=="00"
ATTR{bNumConfigurations}=="2"
ATTR{bMaxPacketSize0}=="64"
ATTR{speed}=="480"
ATTR{busnum}=="1"
ATTR{devnum}=="3"
ATTR{devpath}=="5"
ATTR{version}==" 2.00"
ATTR{maxchild}=="0"
ATTR{quirks}=="0x0"
ATTR{avoid_reset_quirk}=="0"
ATTR{authorized}=="1"
ATTR{manufacturer}=="SAMSUNG"
ATTR{product}=="SAMSUNG_Android"
ATTR{serial}=="xxxxxxxxxxxxxxxx"
looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb1':
KERNELS=="usb1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bMaxPower}==" 0mA"
ATTRS{urbnum}=="55"
ATTRS{idVendor}=="1d6b"
ATTRS{idProduct}=="0002"
ATTRS{bcdDevice}=="0302"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{speed}=="480"
ATTRS{busnum}=="1"
ATTRS{devnum}=="1"
ATTRS{devpath}=="0"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="8"
ATTRS{quirks}=="0x0"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Linux 3.2.0-2-amd64 ehci_hcd"
ATTRS{product}=="EHCI Host Controller"
ATTRS{serial}=="0000:00:1d.7"
ATTRS{authorized_default}=="1"
looking at parent device '/devices/pci0000:00/0000:00:1d.7':
KERNELS=="0000:00:1d.7"
SUBSYSTEMS=="pci"
DRIVERS=="ehci_hcd"
ATTRS{vendor}=="0x8086"
ATTRS{device}=="0x27cc"
ATTRS{subsystem_vendor}=="0x1028"
ATTRS{subsystem_device}=="0x01bd"
ATTRS{class}=="0x0c0320"
ATTRS{irq}=="20"
ATTRS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003"
ATTRS{local_cpulist}=="0-1"
ATTRS{numa_node}=="-1"
ATTRS{dma_mask_bits}=="32"
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{enable}=="1"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
ATTRS{companion}==""
ATTRS{uframe_periodic_max}=="100"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
The first section is the device itself, and I decided to use the idVendor (04e8) and idProduct (6860) attributes. I switched the phone over to PTP connection and checked again and got a different idProduct value (6865) so two rules are required to recognise and handle the phone. I'm lead to believe that different software builds (Android versions) may produce different values so you do need to check these with your own device.
3. Create a mount point for the phone...
From root terminal..
With your text editor of choice, create the udev rules file (I called the file "99-android-mtp-phones.rules") I used "99" so it's loaded last and the filename must end with ".rules"
The file itself contains the following...
Code: Select all
# Samsung Galaxy SIII MTP mode
ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", ACTION=="add", ENV{ID_MODEL}="GalaxySIII"
# Samsung Galaxy SIII PTP mode
ATTR{idVendor}=="04e8", ATTR{idProduct}=="6865", ACTION=="add", ENV{ID_MODEL}="GalaxySIII"
# Samsung Galaxy SIII : automount when plugged in
ENV{ID_MODEL}=="GalaxySIII", ACTION=="add", RUN+="/usr/bin/sudo -u root /usr/local/sbin/go-mtpfs -allow-other=true /media/GalaxySIII"
# Samsung Galaxy SIII : umount when unplugged
ENV{ID_MODEL}=="GalaxySIII", ACTION=="remove", RUN+="/bin/fusermount -u /media/GalaxySIII"
Save this file to the '/etc/udev/rules.d/' directory.
Note: when udev calls go-mtpfs, I had to do so via sudo so udev had the PATH evironment variable. I'm not sure if this would be regarded as a security concern or not but for me, this is just a local personal machine not an enyerprise server environment so I'm not overly concerned.
Then disconnect your phone if you haven't done so already, restart the udev service...
From root terminal
Now if all is well when you reconnect your phone you should be able to browse and transfer content by navigating to /media/GalaxySIII with the file browser (and if you're lucky it might even show up in the left hand pane as a mounted device)
If for some reason the device is not being mounted, you can set the log level of udev to debug..
From root terminal
Code: Select all
# udevadm control --log-priority=debug
And view the contents of syslog for the debug info.
A point worth mentioning, I'm not sure if it's an MTP, Samsung or Android thing but when you plug the phone in you have only 2 (or maybe 3 at most) seconds to mount it after which time the phone will not mount regardless and you have to unplug then replug before continuing.