Samsung Galaxy Devices and Linux Mint

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
MaverickJester

Samsung Galaxy Devices and Linux Mint

Post by MaverickJester »

I searched on this topic quite extensively. I did find some reference to Nexus devices and Acer but these solutions will not work for me. They require editing the android rules and having device specific information which I have not found yet (for the S3 or Galaxy Tab Note 10.1).
A few years ago I use a program (which I don't remember) to transfer files to my Acer iconia tab. I also edited the android rules for this device. This was on Linux Mint 10 and/or 11.

Now I own a Galaxy S3 and a Galaxy Note Tab 10.1 and I am looking for some feed back on how to sync these devices with Linux Mint.

The key is this, I know I can use certain programs to sync music and photos but this is not my major concern. I want to navigate the device file system or at the very least transfer videos (movies) and contacts. Any ideas/thoughts or links to posts I may have missed would be greatly appreciated!

Thanks in advance and as soon as I have something that works I will mark this as solved.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
cwsnyder

Re: Samsung Galaxy Devices and Linux Mint

Post by cwsnyder »

Have you tried the FTP Server Android app through WiFi?
viking777

Re: Samsung Galaxy Devices and Linux Mint

Post by viking777 »

I own a Samsung galaxy tab. Linux treats it like any other hard disk when it is attached via usb, you just copy and paste files from one place to another like you would any other disk/folder. There is only one thing I have to do and that is to select 'Mass Storage' mode on the tab before connecting it, that setting is in - Settings>Wireless and Network>Usb Settings although its exact location will vary with your phone and android version. Incidentally if you happen to have 'Usb debugging' switched on (unlikely, it is off by default) you have to switch debugging off before you can access 'Usb Settings'. That is done in 'Applications>Development.
MaverickJester

Re: Samsung Galaxy Devices and Linux Mint

Post by MaverickJester »

cwsnyder wrote:Have you tried the FTP Server Android app through WiFi?

cw, thanks and yes I do have an ftp program and have used it to transfer data but that will not work the way I would like it to with contacts and basically all PIM data.
MaverickJester

Re: Samsung Galaxy Devices and Linux Mint

Post by MaverickJester »

viking,
thanks for the reply. I do have USB debugging turned on. It was the only way I could get my wife's tab to work with her mac, so I figured yeah ok. Also I needed USB debugging for my Acer iconia and linux last year. The other problem is since Android 4.0 google shifted away from mass storage to MTP, now HTC went back to mass storage on the One X but Samsung still is sticking with MTP which does not work on Linux or Mac for that matter. I was reading about a "hack" if I install a terminal emulator on my phone and tab that would enable it. Just for giggles I will try it with USB debugging off.

Thanks for the reply.
MaverickJester

Re: Samsung Galaxy Devices and Linux Mint

Post by MaverickJester »

viking,
so I just tried it with USB debugging. This was on my S3. I got a funny (and I mean haha funny) message.

Attention: Unable to find software on your device. Service pack 3 Windows Media Player version 10 or higher, for Windows XP or Android File Transfer for Mac OS must be installed. and then just some text telling me where I can download Samsung Kies for windows or mac.

The funning thing is Android file transfer is a dead dog and is not supported anylonger so that leaves only and easy way for windows to connect. This sounds more like a move apple would make going to a protocal that is not very well supported other than say windows. mass storage is the way to go for sure.

Well looks like I will keep looking. I don't really want to add a terminal emulator but I may have to, just have to read up on this guys program and hack. I just started developing apps on the android platform so if I get this nailed down I guess I have a good idea for an app.

On a side not connecting to transfer photos is still no problem I just connect as a camera and done.

thanks again!
MaverickJester

Re: Samsung Galaxy Devices and Linux Mint

Post by MaverickJester »

viking,
now here is something even more strange. When I had the S3 connected as a camera there was a camera icon on my desktop and I was able to import my photos to gthumb. then I unmounted the device and while it was still connected to the computer I switched it back to mtp and the icon changed to an ipod looking device. I was able to browse the file system. I saw two folders (internal and external storage, I have both). Well I can transfer files easy now but still can not sync any PIM data.
viking777

Re: Samsung Galaxy Devices and Linux Mint

Post by viking777 »

Well I am glad you got somewhere, but for my part I don't even know what mtp stands for.

I never tried to answer anything relating to 'sync' because I don't know anything about it and also your opening post said:
I know I can use certain programs to sync music and photos but this is not my major concern
After what you have written, I am glad I am not looking to update my galaxy tab anytime soon, connecting it is so easy on my device I don't hardly have to think about it, your newer ones sound like a real pain!

I am not really sure what a terminal emulator is going to do for you either, it really shouldn't be that difficult.

Good luck anyway.
MaverickJester

Re: Samsung Galaxy Devices and Linux Mint

Post by MaverickJester »

viking,
your right it should not be this difficult. I really do prefer 4.1 android. This is the first problem I have had granted its important for me to sync. I wish I could remember the name of the program I had that sync'd my acer iconia. Anyway, thats for the replies.
cwsnyder

Re: Samsung Galaxy Devices and Linux Mint

Post by cwsnyder »

MTP stands for Media Transfer Protocol. There is a special file system available which supports this protocol, see http://manpages.ubuntu.com/manpages/nat ... pfs.1.html

The way I read the articles, MTP file storage gets away from using FAT file systems. The only drawback that I see is that some files are NOT supported in the MTP transfers. Samsung's Kies program does allow you to transfer media files which it recognizes (if only one way in the version I tried) using the USB cable. AirDroid also allows you to transfer those files without connecting your USB cable. However the only method which I found which allows transfer from the PC to the tablet is to install a FTP server on the tablet and sign in using Filezilla or similar program on the PC. The specific app and program I used was the Rapfox FTP Server (just FTP Server in the Google Play Store) and Filezilla under Debian Wheezy. This I tested with a Samsung Galaxy Tab 2 7" tablet, and it works for media files supported under Android 4.0 and files not supported got transferred, even if they don't do me any good. With the way I set it up, if there is a file in the structure, I can transfer the file. It may not be useful, but I can still back them up for restore later, if necessary.
MaverickJester

Re: Samsung Galaxy Devices and Linux Mint

Post by MaverickJester »

cw, thanks again. Transferring files doesn't seem to be an issue now since I found this weird way of connecting the devices (which I believe is not what Samsung intended). What I really want to do is sync PIM data or just have a program that is like kies on mac or windows. My wife uses kies on mac and she can import/export files and sync contacts. I will never get her machine on Linux unless I can make it as simple there for her.

So atm I don't need ftp to transfer files just connect the tab/phone to the computer via usb. Really want to sync PIM this is the key.

I also found this:
http://www.acertabletforum.com/forum/ac ... buntu.html

which I am pretty sure I used to do my iconia with MTP. Just have to dig some more.

If anyone out there knows of any program or any way to sync the tab just like on windows or mac please chime in. thanks.
viking777

Re: Samsung Galaxy Devices and Linux Mint

Post by viking777 »

MaverickJester wrote:viking,
thanks for the reply. I do have USB debugging turned on. It was the only way I could get my wife's tab to work with her mac, so I figured yeah ok. Also I needed USB debugging for my Acer iconia and linux last year. The other problem is since Android 4.0 google shifted away from mass storage to MTP, now HTC went back to mass storage on the One X but Samsung still is sticking with MTP which does not work on Linux or Mac for that matter. I was reading about a "hack" if I install a terminal emulator on my phone and tab that would enable it. Just for giggles I will try it with USB debugging off.

Thanks for the reply.
Just revisited that post and it makes sense. My Samsung tablet is running Gingerbread so it connects to linux faultlessly. OTOH my wife has an ICS phone which also connects to LInux faultlessly, but it is an HTC model.

I hope someone from Samsung reads this - I can tell them they have just lost a potential customer - fail to support Linux at your peril :evil:
MaverickJester

Re: Samsung Galaxy Devices and Linux Mint

Post by MaverickJester »

It sure is a real bummer. I really like my Galaxy S3 and the Note 10.1 Tab. With that said, Samsung has been a real pain to live with. I have the Galaxy S Tab 10.1 wifi and I waited more than a year for 4.0. I was never a big HTC fan but I like the new phones they are putting out. I really like the 8X, I just am waiting for them to put Andoid a phone with those slick dimensions. It feels nice when you hold it.
MaverickJester

Re: Samsung Galaxy Devices and Linux Mint

Post by MaverickJester »

bump?
zwockel

Re: Samsung Galaxy Devices and Linux Mint

Post by zwockel »

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...

Code: Select all

# lshal > hal.log
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..

Code: Select all

# mkdir /media/GalaxySIII
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

Code: Select all

# service udev restart
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.
ntrcessor
Level 1
Level 1
Posts: 29
Joined: Fri Jan 04, 2013 12:59 am

Re: Samsung Galaxy Devices and Linux Mint

Post by ntrcessor »

As for syncing, I haven't needed to use a cable to sync my S3 ever. (Or even wifi). Simple solution: Setup a gmail account. The primary account on your S3 device will automatically sync contacts, calendar, and email with your google account. If she uses the webmail interface, no more problem than that. (Otherwise, set up thunderbird on linux w/ gmail account, and google calendar plugin, and google contacts plugin.

Add google play to the mix, which will automatically keep in synch your music library with the cloud. You'll be able to access your music through google play "music". Although I agree with your posts for differing reasons. Samsung Kies is limiting, and is nothing more than a glorified ftp server/client targeting specific file types.

There used to be a google app for windows/mac/linux which could turn any google web page into a "standalone" app. I don't think it is supported anymore. It's how picassa started.
BillV

Re: Samsung Galaxy Devices and Linux Mint

Post by BillV »

[quote="zwockel"]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..


Great Help!
Ok, I ran all this (except couldn't find in the phone where to change mtp to ptp) and phone now mounts but still wont let me access the sd card. i can pretty much get to all the rest of the phone media stuff copy pictures etc from the phone but the sdcard just sits there and thinks never opens to show me the files for transferring files, so i assume i'm missing something (phone hasn't been rooted). But just by your tutorial here I'm way closer than when i started (Linux Mint 13 Maya Xfce)! Thanks!!!
cwsnyder

Re: Samsung Galaxy Devices and Linux Mint

Post by cwsnyder »

Your SD card is actually the EASIEST part of your device to access from Linux, just plug it in to an appropriate USB adapter!

Of course, this does require removal from the device. :lol:
MaverickJester

Re: Samsung Galaxy Devices and Linux Mint

Post by MaverickJester »

Thanks everyone for your responses. I have not checked the post in a while, I actually though no one was interested.

What I found was Airdroid. This has been the best solution for me so far, transferring large files such as a movie takes longer than being connected. It does not really sync but it allows for transfers.

As far as syncing with my Google account yes this would work but I don't like to tell Google about all my personal or business appointments. I think Google gets enough information from me as it is now.
zipzapzor

Re: Samsung Galaxy Devices and Linux Mint

Post by zipzapzor »

I have a Samsung Note 11 and the way I connect (not sync) is using Samba on my Desktop and loading the AndSMB app from Google play (free), onto my Samsung Note 11. My friend does this the same way for his Galaxy S111. So I know it works for that device as well. I hope this helps. :-)
Locked

Return to “Hardware Support”