Frustrated. Java On CentOS 6 Doesn’t Give An Error Message When Downloading From A Samsung Galaxy S3

Home » CentOS » Frustrated. Java On CentOS 6 Doesn’t Give An Error Message When Downloading From A Samsung Galaxy S3
CentOS 71 Comments

SUMMARY:
Maybe this all boils down to “how do we debug when Java fails on CentOS 6?

DETAILS:
If you don’t have the Samsung Galaxy S3, then you might not realize how frustratingly difficult it is to transfer multiple files from the smartphone to CentOS 6. It should be as simple as hooking up a USB cable and dragging and dropping (which it is, on most other smartphones, including the Samsung Galaxy S2, which has USBMS mode still intact).

Note: I don’t have a microUSB card, so that isn’t an option and I have no desire to transfer the personal photos to the cloud just to get them from the phone to CentOS, nor to install Wine and/or a virtuoal OS just to do something as simple as transfer files.

On the Samsung Galaxy S3, you can go all day to Settings->More Settings->
but there is nothing for “USB” anywhere anymore.

Unfortunately, [url=http://androidforums.com/computers/499522-looking-linux-file-transfer-tool-android-4-0-devices.html]Google has apparently disabled USB transfer in the Android OS 4.0[/url] and above and replaced it with MTP file transfer.

So Windows recognizes any ICS device plugged in, and Mac does too (via Android File Transfer); but CentOS does not.

Anyway, [url=https://www.CentOS.org/modules/newbb/viewtopic.php?topic_id=39977&forum=57&post_id=182904#forumpost182904]the workaround[/
url], is to use Kies Air to transfer the files over the air via WiFi from the phone to the CentOS PC. This works – but that brings up the problem of [b]multiple[/b] files.

The Kies Air gui for transferring multiple files at once is trivial (you just check “all files”); but it doesn’t work. There is no error message. There are no warnings. There are no indications whatsoever; it just doesn’t transfer anything. If you use the exact same procedure to transfer a single file, it works just fine. Googling for “Kies air won’t download multiple files”, I find a bazillion others have this problem – but most answers simply say to “install Java”
on the host PC.

For example:
http://www.samsung.com/uk/support/usefulsoftware/KIESAIR/JSP
Q: I cannot send multiple files at once A: Need to install Java – downloadable from the Java homepage (www.java.com ) in order to transfer multiple files at once or to upload a file over 100MB.

So maybe this whole frustrating task of downloading multiple files from the smartphone to CentOS hinges on debugging Java. Here’s where I’m lost though. I know nothing about Java. What does “install Java” mean for CentOS 6? Is that icedtea?
[b]Q: How can I get an error message if icedtea isn’t working when I try to transfer multiple files via Kies Air?[/b]

[img]http://www5.picturepush.com/photo/a/13140568/640/13140568.png[/img]

71 thoughts on - Frustrated. Java On CentOS 6 Doesn’t Give An Error Message When Downloading From A Samsung Galaxy S3

  • That’s a bug in Android (or perhaps just your device, since on that thread other users report ICS does support USB mass storage), not CentOS. I understand that’s not helpful to you, but it’s good to be clear.

    I’d install an scp or sftp client on your Android and use that for file transfer to your CentOS box, as suggested by many folks on that thread. There are probably a bunch of clients in the Play store.

    –keith

  • For fun you could install lighttpd. This will bypass any issues that arise from OS limitations. You have a mini web server but it’s just going to be for serving files, etc.

    you’ll be able to wget stuff and…well many many more options.

    SCP if all else fails.

  • As someone who looked into this after getting the Galaxy SIII.

    It does NOT support USB mass storage. I have forgotten the logic, but this is definitely the case.

    Ah, here’s one quick link explaining it. (Quote from an Android engineer about a quarter of the page down.

    http://www.androidcentral.com/ics-feature-mtp-what-it-why-use-it-and-how-set-it

    On more current distributions, that is, just about everything but RHEL6 and clones, one can install a version of mtpfs, simple-mtpfs on Fedora, for example, jmtpfs on Arch, and get it to work.

    I believe it also works with any Virtual Machine that supports USB, but as I have an easily accessible desktop with ArchLinux, I haven’t tested that.

  • I had the same problem until I stumbled upon the solution:

    Airdroid

    Search for airdroid on Google Play. I use it regularly to transfer files

  • Thanks for that tip!

    I just installed AirDroid on the Samsung Galaxy S3, and tested it out.

    On single files, it seems to work exactly like Kies Air does, only with the AirDroid desktop being more intuitive than Kies Air’s desktop:
    http://www4.picturepush.com/photo/a/13140997/img/13140997.png

    The good news is that transferring the entire set of files was as simple as checking a checkbox (as was Kies Air); but, the better news is that it actually worked (as opposed to Kies Air failing every time):
    http://www3.picturepush.com/photo/a/13141006/img/13141006.png Note: AirDroid, by default, creates a single zip file, apparently to get around the multiple-file restriction that fells Kies Air every time.

    The bad news is that transferring select files was an exercise in futility, simply because the standard shift key (to select blocks of photos) is apparently not implemented, and scrolling from file to file would take the rest of your lifetime to get through the 300 pictures that I have snapped on the Samsung Galaxy S3, it’s that slow:
    http://www2.picturepush.com/photo/a/13140995/img/13140995.png

    In summary:
    a. AirDroid works, for single or multiple pictures, & is simple to use!
    b. Use AirDroid for single pictures or small sets of contiguous pictures c. Don’t even attempt to download select (dispersed) photos!
    d. Downloading the entire set of pictures is far easier, albeit slow.

    Thanks for the AirDroid tip!

  • I guess the point would be to set up the phone as an FTP server.

    That might work … but luckily, the suggestion to use AirDroid worked nicely (albeit selecting individual pictures would take the rest of your life so the only ‘real’ choices you have with AirDroid are to download the entire batch or a small set of contiguous pictures).

  • I installed Total Commander for Android, it had Samba/Windows ( LAN
    plugin), FTP/SFTP plugin and WebDAV plugin. I also have FSync set-up to daily backup all important files via SFTP.

  • Just my luck that CentOS is one of those linuxes that are problematic.

    Anyway, here’s the summary:
    a) Connecting the Samsung Galaxy S3 by USB (fails)
    b) Connecting that phone by Kies Air (fails for multiple files, no error message!)
    c) Connecting that phone by AirDroid (works! Even for multiple files!)

    Slow. Cumbersome. But all that matters is that files can be transferred from the Samsung Galaxy SIII to the CentOS 6 PC.

  • MTP doesn’t work all that well on Linux even when it works.

    The real easy and best solution is ‘Wifi File Explorer’ which runs a web server on your phone which you can access from the desktop computer and transfer files & folders between them. I use Fedora for desktop system and I definitely still use Wifi File Explorer.

    I think most people are using cloud storage with the smart phones these days and that makes for tepid enthusiasm for attempting to maintain any type of synchronization between a single desktop system and the smart phone. The cloud or running Wifi File Explorer on your smart phone becomes a solution that allows you to add other computers and devices into the equation at any time.

    Craig

  • I understand.

    Anyway, here’s a summary for the next person with this same problem
    (Note: This affects other phones but I don’t know which are affected.)

    Summary of the current status:
    Connecting the SG S3 by USB cable (fails for every CentOS owner)
    Connecting the SG S3 by Kies Air (Java fails for multiple files, no errors!)
    Connecting the SG S3 by AirDroid (Works! Zips up multiple files, slow but OK)
    … Connecting the SG S3 by Android FTPServer (suggested, complicated setup)
    Connecting the SG S3 by WiFi File Explorer (didn’t work on my 1st test)
    Connecting the SG S3 by WiFi File Transfer (didn’t work on my 1st test)
    Connecting the SG S3 by Total Commander for Android (suggested, untested)
    Connecting the SG S3 by WiFi file transfer pro (suggested, untested)
    Note: When testing solutions, my general approach is to give each suggested program a single pass – and if that fails, to then move on to the next solution. If no solutions work, then I revisit the prior attempts and implement heroics to get it to work, if needed.

    Deprecated approaches which would also work to transfer pictures:
    MicroSD card (shouldn’t have to buy storage just to transfer pictures)
    Dropbox or the cloud (shouldn’t have to do that just to transfer data)
    Windows/Mac (shouldn’t have to give up on your CentOS operating system)
    Wine/Emulation/Virtual OS (shouldn’t have to give up on native CentOS)
    Email them to myself (shouldn’t have to do that just to transfer pictures)

    < Rant >
    Why the Android dev team removed USB file transfer for Linux users is beyond me!
    < /Rant >

  • This is a “feature” of Android 4.0 and above. That’s when the switch to the MTP protocol on that end happened.

    Older Android phones (2.x if I remember correctly) will still mount as a file system when connected to USB on CentOS.

  • It’s not “luck”–it’s intentional. RHEL deliberately follows older, more stable versions of software, because RH tests the bejeezus out of their releases. By extension CentOS also follows older, more stable versions of sofotware. Therefore if you want bleeding edge versions of unstable software, you likely need to do it yourself, because that software probably isn’t in CentOS. And if you frequently want bleeding edge versions, you probably want to put a different distro on that box, because otherwise you’ll spend lots of time fighting the distro.
    (Sometimes this can be worked around by getting software from third-party repositories, but not always.)

    –keith

  • [snip]

    The reason is pretty straightforward…FAT sucks.

    USB Mass Storage serves up a block device in a linear layout over USB. This shows up under Linux as a raw block device. Unless you’re using a disk-level filesystem such as OCFS2, or all mounts are read-only, there’s no way to safely have multiple filesystem drivers independently access that disk at the same time.

    MTP is the workaround for that, at least on mobile devices.

    FWIW, Calibre uses MTP to push books and such to Android devices
    (including my S3 and my Xoom), and it manages it reliably. Whatever library it’s using could surely be placed under a FUSE filesystem.

  • Indeed! :)

    I’m just a regular Joe user of a smartphone & CentOS (which is the OS choice of my employer who provides the laptop).

    While most of you, on CentOS, are experienced with compiling source code
    (e.g., MPT source), I fail half the time if/when I try to run make files.

    For an average user, will this problem of mounting an IceCreamSandwich Android phone to a CentOS laptop be resolved when MTP RPMs are available?

    If so, when would we expect to see MTP RPMs in the standard repositories?
    (i.e., how long should I expect my workaround to be in place?)

  • I do appreciate your explanation & apologize for my rant.

    So that I better understand, does that mean if I bought a microSD card, and stored the photos from the smartphone onto that microSD card, that I could then transfer those photos to the CentOS laptop via a USB cable?

  • What do you think are the “standard” repositories?

    If you think that they are CentOS base, then they will almost certainly not appear at all for CentOS 6. And if my understanding of the MTP
    libraries is correct, they probably won’t appear in extras, either. So unless someone on the team has a compelling reason to put these packages in addons (packages which change 100% binary compatibility with upstream) it is really unlikely that they will ever appear in an official CentOS repo. (98% of the time I appreciate that the CentOS
    team is conservative even when adding packages to addons. The other 2%
    I remind myself of the above and look elsewhere.)

    If you’re asking about other yum repositories, you’d have to ask them.
    (Though IIRC some of those developers hang out here every once in a while.)

    –keith

  • I had never heard of OTG cable adapters. Googling for “Samsung Galaxy S3 OTG cable adapters”, I find, for example:
    http://tinyurl.com/q3tuhov

    Reading the Newegg P/N 9SIA1PU0PJ0486 description, it seems we simply plug a FAT-only USB stick into the female end, and the male end goes into the smartphone (it won’t work for NTFS, according to that Newegg description).

    This seems like a viable option – if it works. Thanks for that wonderful idea!

  • gphoto package in rhel/CentOS is way too old. unfortunately gnome use gvfs-gphoto2 libgphoto2 to handle automount both for mtp and ptp. so you’re not able to use it what’s more it’s better to remove gvfs-gphoto. on the other hand if you rebuild: libmtp and simple-mtpfs from fedora, them it’ll work on rhel/CentOS-6 too.

  • $ ls -l /etc/yum.repos.d adobe-linux-x86_64.repo CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Media.repo.rpmsave CentOS-Vault.repo
    … elrepo.repo < == needed for nvidia display drivers, for example ... epel.repo <== needed for recordmydesktop, for example epel-testing.repo ... google-chrome-64bit.repo <== needed for chrome, for example google-chrome.repo ... linuxtech.repo <== needed for DeVeDe, for example ... mirrors-rpmforge mirrors-rpmforge-extras mirrors-rpmforge-testing ... naulinux-school.repo <== needed for avidemux, for example ... nux-dextop.repo <== needed for NAS, for example ... rpmforge.repo <== needed for vlc, for example rpmfusion-nonfree-updates.repo <== needed for vcdimager, for example ... rpmfusion-nonfree-updates-testing.repo ... torproject.repo <== needed for Tor, for example Of those, assuming the CentOS repositories are standard, I’d guess the other “standard” repos are elrepo, epel, & rpmforge. I’ve learned never to use Atrpms; and I just can’t figure out yum priorities setup; so I get burned rather frequently. Is that a decent guess as to what’s a standard repo for CentOS?

  • I found out the following, if it matters:

    QUOTE 1:
    You can use tools like gphoto or digikam to access the images, should be just plug the phone to the computer and start the application you want to use (KDE will list applications which can access the content like digikam and dolphin), you don’t need to install anything as it’s already there.

    There seems to be an experimental packages for S3 which allows you to share it as a usb mass storage. http://www.android.gs/how-to-enable-usb-mass-storage-on-samsung-galaxy-s3-i9300/

    QUOTE 2:
    There is nothing preventing you from downloading the latest version of libmtp and installing that (under /usr/local) on your CentOS system. http://libmtp.sourceforge.NET/

  • Yes.

    Those are third party repositories. Only the CentOS* repositories are official CentOS repos.

    –keith

  • If I could, I’d stick with those official repositories.

    Looking at my installation log file, it seems that I’ve only needed the non-official repositories about 30 times in the past year, which is pretty good (although I’ve also given up on a dozen or so, which weren’t in any decent repository).

    $ sudo yum –enablerepo=elrepo install kmod-nvidia
    $ sudo yum –enablerepo=elrepo install nvidia-detect
    $ sudo yum –enablerepo=elrepo install nvidia-x11-drv-32bit
    $ sudo yum –enablerepo=elrepo-testing install kmod-nvidia
    $ sudo yum –enablerepo=elrepo-testing install nvidia-x11-drv-32bit
    $ sudo yum –enablerepo=epel install blender
    $ sudo yum –enablerepo=epel install gkrellm
    $ sudo yum –enablerepo=epel install nas
    $ sudo yum –enablerepo=epel install recordmydesktop
    $ sudo yum –enablerepo=google-chrome-64bit install google-chrome-stable
    $ sudo yum –enablerepo=linuxtech-backports install k3b
    $ sudo yum –enablerepo=linuxtech-release install devede
    $ sudo yum –enablerepo=linuxtech-release install gnome-alsamixer
    $ sudo yum –enablerepo=linuxtech-release install vcdimager
    $ sudo yum –enablerepo=linuxtech-testing install deluge
    $ sudo yum –enablerepo=linuxtech-testing install devede
    $ sudo yum –enablerepo=naulinux-school install avidemux
    $ sudo yum –enablerepo=nux-dextop install kdenlive
    $ sudo yum –enablerepo=nux.noarch install openshot
    $ sudo yum –enablerepo=rpmforge install azureus vuze
    $ sudo yum –enablerepo=rpmforge install dvdauthor
    $ sudo yum –enablerepo=rpmforge install kino
    $ sudo yum –enablerepo=rpmforge install libgmime
    $ sudo yum –enablerepo=rpmforge install mencoder
    $ sudo yum –enablerepo=rpmforge install openvpn
    $ sudo yum –enablerepo=rpmforge install pan
    $ sudo yum –enablerepo=rpmforge install tcptraceroute
    $ sudo yum –enablerepo=rpmforge install transcode
    $ sudo yum –enablerepo=rpmforge install uberkey
    $ sudo yum –enablerepo=rpmforge install vlc

  • You are still missing the point, which is that you are much more likely to get a more accurate and official answer about a package in a non-official repo from a list or forum dedicated to that non-official repo. Yes, people here can guess, but unless they have a relationship with that repo it’s just a guess (and possibly not a good one). And unless someone has that relationship, they certainly can’t arrange for a new package in one of these repos if that is desired.

    Put another way, would you ask Upstream when rpmforge was going to carry these packages?

    –keith

  • Ah, I see. Sorry for being dense.

    I understand. I’m not sure *who* handles the MTP package, but, what you’re saying is whomever it is that feels they should own it, would be the ones to ask.

  • I just googled for mtpfs and EPEL and here is answer:

    Just a note that it won’t compile for EPEL 6. The error is:

    checking for MTP… configure: error: Package requirements (libmtp >= 1.1.0) were not met:
    Requested ‘libmtp >= 1.1.0’ but version of libmtp is 1.0.1

    (libmtp is provided by RHEL, so it’s not so easy to upgrade)”

    from https://bugzilla.redhat.com/show_bug.cgi?id

  • I use ES File Explorer on my S3 for manual single or multiple file transfers to CentOS desktops over wireless. The ftp targets in ES File Explorer supports sftp, which works well and is enabled on default CentOS installs.

  • Thanks. I made a bunch of guesses how to proceed. I’m sure I erred, but here’s what I did. What should I correct by way of use model?

    $ uname -a Linux machine 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
    $ sudo yum install libmtp
    ==> Package libmtp-1.0.1-2.el6.x86_64 already installed and latest version
    $ sudo yum remove libmtp
    ==> Removing:
    ==> libmtp x86_64 1.0.1-2.el6 @anaconda-CentOS-201112091719.x86_64/6.2 695 k
    ==> Removing for dependencies:
    ==> rhythmbox x86_64 0.12.8-1.el6 @anaconda-CentOS-201112091719.x86_64/6.2 12 M
    ==> vlc x86_64 1.1.13-1.el6.rf @rpmforge 60 M
    ==> Erasing : rhythmbox-0.12.8-1.el6.x86_64 1/3
    ==> Erasing : vlc-1.1.13-1.el6.rf.x86_64 2/3
    ==> Erasing : libmtp-1.0.1-2.el6.x86_64 3/3

    $ mkdir /tmp/test; cd /tmp/test
    $ wget http://home.roadrunner.com/~computertaijutsu/libmtp-1.1.6-0.el6.x86_64.rpm
    ==> Saving to: “libmtp-1.1.6-0.el6.x86_64.rpm”

    I’m not sure what the next step is (either rpm -ivh or rpm -Uvh)
    $ sudo rpm -ivh libmtp-1.1.6-0.el6.x86_64.rpm
    ==> Preparing… ########################################### [100%]
    ==> 1:libmtp ############################################## [100%]

    I’m not sure how to check if it worked or not, so I’ll just re-run this and compare output:
    $ sudo yum install libmtp
    ==> Package matching libmtp-1.0.1-2.el6.x86_64 already installed

    Hmmm… I had expected a later version, and, at the same time, I would have expected the same wording. Neither occurred. It says it’s the same version; but it uses different wording to do that. But I don’t see any errors either, so I’ll move to the next step.

    Hmm… What is the next step?
    I guess the next step is to plug in the Samsung Galaxy S3 via USB cable and see what happens.

    Drat. Unable to mount SAMSUNG_Android_SGH-T999
    Error initializing camera: -1: Unspecified error http://www5.picturepush.com/photo/a/13169313/640/13169313.png

    $ dmesg
    ==> usb 3-2: new high speed USB device number 3 using xhci_hcd
    ==> usb 3-2: New USB device found, idVendor=04e8, idProduct=6860
    ==> usb 3-2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
    ==> usb 3-2: Product: SAMSUNG_Android_SGH-T999
    ==> usb 3-2: Manufacturer: SAMSUNG
    ==> usb 3-2: SerialNumber: < I redacted this >
    ==> usb 3-2: configuration #1 chosen from 1 choice
    ==> usb 3-2: ep 0x81 – rounding interval to 32768 microframes, ep desc says 0 microframes
    ==> usb 3-2: ep 0x83 – rounding interval to 32768 microframes, ep desc says 0 microframes
    ==> usb 3-2: ep 0x2 – rounding interval to 32768 microframes, ep desc says 0 microframes
    ==> usb 3-2: ep 0x85 – rounding interval to 32768 microframes, ep desc says 0 microframes
    ==> usb 3-2: ep 0x3 – rounding interval to 32768 microframes, ep desc says 0 microframes
    ==> cdc_acm 3-2:1.1: This device cannot do calls on its own. It is not a modem.
    ==> cdc_acm 3-2:1.1: ttyACM0: USB ACM device
    ==> gvfs-gphoto2-vo[3575]: segfault at 3 ip 00007f886e7ac290 sp 00007fffacd22980 error 4 in ptp2.so[7f886e78c000+4f000]

    I unplug the USB cable, and plug the USB cable back in:
    On the desktop, a new entry called ‘disk’ shows up:
    Places->disk When I click it, I see what “appears” to be the phone. Clicking again (to take a screenshot) I now see a newer entry below ‘disk’ called ‘SAMSUNG_Android_SGH-T999’. http://www4.picturepush.com/photo/a/13169407/640/13169407.png

    Clicking on SAMSUNG_Android_SGH-T999 in the file browser, shows what “appears” to be the phone (except that all folders show up as empty). http://www5.picturepush.com/photo/a/13169408/640/13169408.png

    It looks like the libmtp RPM worked but I’m not sure of the use model to access the picture data on the cellphone (or any data on the cellphone, as all directories show as empty when I click on them in CentOS).

  • You can always use Uvh which should update. When I played with it, I first removed the older libmpt libraries. U is for update, but it didn’t in my case, saying a library supplied by the older version was required by vlc.

    If there is nothing to be updated, Uvh will just install. At any rate, from

    I’m not sure what happened. As I think I said, I removed the older version first.

    One point that I’ve found on more recent distributions is make sure the phone is unlocked when plugging it in.

    I use a window manager with fewer features (dwm) so I didn’t see any icon. On distributions that I do use to access the phone, on one of them, Lubuntu with LXDE, it will show up and be accessible in the file browser. On the others, I run the command simple-mtpfs (or variant, depending upon distribution) to mount it. However, I wasn’t able to successfully install any of those (simple-mtpfs, mtpfs, or jmtpfs) on CentOS.

    Honestly, I don’t know. However, I’m no expert programmer (or packager, I
    just ran rpmbuild -ba on the spec file to build it.)

  • Thanks. Next time I’ll use “Uvh”.

    I “thought” I removed the older version of libmtp when I ran:
    $ sudo yum remove libmtp

    Doesn’t this message indicate it removed libmtp, vlc, & rhythmbox?
    ==> Erasing : rhythmbox-0.12.8-1.el6.x86_64 1/3
    ==> Erasing : vlc-1.1.13-1.el6.rf.x86_64 2/3
    ==> Erasing : libmtp-1.0.1-2.el6.x86_64 3/3

    OK. Thanks. I unlocked it & tried again, but I don’t see any different things happening yet.

    Hmmm… it ‘does’ show up in the file browser. But all the directories are shown as empty. I think we’re close, but I’m unsure of the use model and/or debug commands.

  • I guess I should have done it this way?
    $ sudo yum remove vlc
    $ sudo yum remove rhythmbox

    Or would you have left rhythmbox in place?

    Are you saying I should run that yum upate of libmtp with the libmtp RPM in the same directory? If so, I can run that now.

    Hmmm… good point. Thanks. I don’t even know what gvfs-gphoto2-vo is. Looking for it, I find:
    $ sudo updatedb; locate gvfs-gphoto2-vo
    ==> /usr/libexec/gvfs-gphoto2-volume-monitor

    Hmmm… what is that?
    Googling, it’s some kind of Gnome filesystem monitor. Grepping, it’s running:
    $ ps auxww|grep gvfs-gphoto2-volume-monitor|grep -v grep
    ==> user1 10465 0.1 0.0 151084 3356 ? S 11:23 0:01 /usr/libexec/gvfs-gphoto2-volume-monitor

    OK. I’ll kill the process. Is that the same thing?
    $ sudo kill -9 10465

    Then, I’ll unlock the phone & plug it in. Hmmm…. when I did that, this series of dialogs came up, in sequence:
    http://www1.picturepush.com/photo/a/13171084/img/13171084.png

    But now it won’t even open the directory. I’m sure we’re close, but I’m not sure how to debug why it won’t open up.

  • Yes it does, sorry. Rough day today.

    Nor am I. :) As I mentioned, I’ve only used the file browser method (and things were accessible) in a more recent distribution. Otherwise, I’ve used the manual commands.

    Sorry I can’t be of more help here.

  • Rock wrote:

    no you were right: “sudo yum remove libmtp” was the correct command, yum removed vlc and rythmbox because they must have a dependency on libmtp. You could not have kept rythmbox while removing libmtp if rythmox needs libmtp (except using –force, which you should never use except if you really know what you’re doing).

    no need: yum update does the same thing as rpm -Uvh
    , except that it installs any deps needed by localfile.rpm if they are in one of your configured repos. But if that were the case rpm -Uvh wold have complained about a missing dep and would have refused to install the rpm. Another small difference is that yum stores a history of its transactions (and has some features associated with that), but installing the odd local package with rpm won’t cause any problems AFAIK.

    BTW rpm -Uvh and rpm -ivh do the same thing when the package is not already installed on your system. The difference is that -ivh won’t remove an older version if already present (but you can’t do that with most packages, and rpm won’t let you, since different versions of the same package will often conflict with one another).

    To summarize, you did the right things as far as libmtp is concerned. Now the issue lies beyond that, probably with gvfs-photo2 as suggested by Farkas via Ljubomir, but I can’t help you much with that. Except Farkas suggests also rebuilding and installing simple-mtpfs, have you done that?

  • I was afraid of the scope creep! :)

    I have no idea how to rebuild and reinstall simple-mtpfs.

    In fact, I’ve never even heard of simple-mtpfs, so, I’ll start googling. Note: I ran a locate, and, whatever it is, it’s not on my system.

    EDIT:
    Googling, I find out the definition:
    SIMPLE-MTPFS (Simple Media Transfer Protocol FileSystem) is a file system for Linux (and other operating systems with a FUSE implementation, such as Mac OS X or FreeBSD) capable of operating on files on MTP devices attached via USB to local machine. It allows the end user to seamlessly interact with MTP device files.

  • The bug report doesn’t show *how* to put the Samsung Galaxy S3
    in “PTP” mode (which I know nothing about).

    Googling “How to put samsung galaxy s3 in ptp mode”, I find:
    http://www.samsunggalaxys3forum.com/forum/samsung-galaxy-s3-help/1619-can-someone-tell-me-how-put-my-phone-ptp-mode.html

    Which says:
    1. Connect the phone (in that case, to the Mac)
    2. Pull down the notification bar (in that case, on the Samsung phone)
    3. Tap on the connection (in that case, the same USB connection)
    4. Select PTP mode (to transfer photos)

    When I tried that on Linux:
    1. Connect the phone by USB to CentOS 6 (this pops up first):
    http://www3.picturepush.com/photo/a/13198631/img/13198631.png
    2. Pull down the notification bar (Connected as a media device):
    http://www3.picturepush.com/photo/a/13199411/img/13199411.png
    3. Tap on the Ongoing connection:
    http://www4.picturepush.com/photo/a/13199412/640/13199412.png
    4. Select PTP mode:
    http://www3.picturepush.com/photo/a/13199481/img/13199481.png
    5. The Samsung Galaxy S3 is now in “Connected as a camera”:
    http://www1.picturepush.com/photo/a/13199514/img/13199514.png

    Hmmm… this pops up again, on the Desktop:
    http://www3.picturepush.com/photo/a/13198631/img/13198631.png

    But, wait! This then shows up in the menus in a few seconds:
    http://www5.picturepush.com/photo/a/13199313/img/13199313.png

    And, for the first time, the folders are no longer zero size:
    http://www5.picturepush.com/photo/a/13199358/img/13199358.png

    Pensively, I click on the DCIM folder, hoilding my breath:
    http://www1.picturepush.com/photo/a/13199374/img/13199374.png

    Voila! Success at last!
    It’s so simple, once you already know the answer!

    PS: I’m not sure if there is a graceful way to disconnect;
    and, I’m not sure if I should leave the phone in PTP mode;
    but, the good news is that single and multiple photo transfer by USB wire now works, in PTP mode, on the Samsung Galaxy S3!

  • that setting only affects how the device presents itself to a USB host, it otherwise does nothing. so leave it in the mode you want the USB
    connection to operate in.

  • Thanks. I’ll leave the Android 4.0.4 phone in PTP mode then.

    In order to be thorough, I wanted to write up a summary to help others; so, to see if it was the updated libmtp that made the difference, I ran the following:

    $ sudo yum remove libmtp (this removed the updated libmtp)
    $ sudo yum install rhythmbox (this installed the old libmtp)
    (& replaced the missing rhythmbox)
    $ sudo yum –enablerepo rpmforge install vlc (this replaced VLC)

    Then, I plugged in the Samsung Galaxy S3 by USB cable
    (with the media mode set to PTP camera mode).

    Drat!
    Nothing happened.

    Lesson learned: The solution requires more steps, which may be
    (at the very least)
    a) Update libmtp on CentOS
    b) Switch the Android 4.0.4 phone from MTP to PTP (camera mode). c) ? unknown other steps ?

    Luckily, I documented all the steps performed in the past few weeks so I simply repeated the successful ones.

    Namely, I removed the old libmtp again (see previous posts in this thread for details) and re-installed the new libmtp, but, nothing showed up when I plugged in the phone by USB cable.

    Hmmm… So I rebooted the CentOS laptop to see if that made a difference.

    OK, I rebooted, and PTP mode is working again.

    So, this seems to be the sequence for the next person to follow in our footsteps on CentOS 6 with an Android 4.0.4 phone:
    1. Remove the original libmtp NOTE: This will remove rhythmbox and vlc & any other program
    with dependencies on libmtp)
    2. Update libmtp with Scott’s libmtp
    3. Reboot the CentOS6 PC < == this is an important step! 4. Switch the Android 4.x phone from MTP to PTP mode (if not already) 5. Connect the Android phone by USB cable The one problem I’m having now is that I can’t re-install rhythmbox & vlc. This failed after the newer libmtp was installed: $ sudo yum install rhymthbox ==> Error: Package: rhythmbox-0.12.8-1.el6.x86_64 (base)
    ==> Requires: libmtp.so.8()(64bit)
    ==> Available: libmtp-1.0.1-2.el6.x86_64 (base) libmtp.so.8()(64bit)
    ==> Installed: libmtp-1.1.6-0.el6.x86_64 (installed) Not found
    ==> You could try using –skip-broken to work around the problem
    ==> You could try running: rpm -Va –nofiles –nodigest

    Not knowing how to proceed, I vainly tried the suggested
    “–skip-broken” option, but it simply skipped the install altogether:
    sudo yum install rhythmbox –skip-broken
    ==> Processing Dependency: libmtp.so.8()
    ==> (64bit) for package: rhythmbox-0.12.8-1.el6.x86_64
    ==> Packages skipped because of dependency problems:
    ==> rhythmbox-0.12.8-1.el6.x86_64 from base

    So, I guess the question is:
    Q: How do I install rhythmbox & vlc with the newer libmtp?


  • That is best solved by asking Red Hat (opening a bug) to update libmtp and rhythmbox packages. If they accept, then vlc will be recompiled by all third-party repositories, and problem solved for all RHEL/CentOS/SL
    users.

    If not, one or all the third-party repositories will have to create libmtp, rhythmbox and vlc packages, but in a repository that can override base packages (so not EPEL).

    So, can someone from this list and Red Hat subscription open a bug report using Rock’s last e-mail (one I responded to)?

  • Hi Scott, You’ve been a GREAT help, as have the others!
    I’m back to working with the original libmtp, with VLC
    working just fine (but I’m not sure how to test rhythmbox as I’ve never used it).

    I’m confused how to explain the idealized setup since it took a few reboots and gyrations to get it to work again for me once I reinstalled the original CentOS libmtp, and especially because we (apparently) have to plug the phone in to see the MTP/PTP setup screen, and once we do that, we again have to reboot, so, this sequence below is idealized as I went through a bunch of reboots in the process, and I
    forgot to unlock the phone a couple of times also. With that caution as the caveat, I “think” the simplest procedure for connecting by wire on CentOS 6 is the following:

    0. DO THIS ONCE! Connect the Samsung Galaxy S3 Android 4.0.4
    phone by USB cable to your CentOS 6 PC in order to put the phone permanently into PTP mode (as explained earlier)
    and then (I think) you MUST disconnect the phone and reboot the CentOS PC!

    1. With CentOS booted, no phone connected, and the phone already in PTP mode, make sure the phone is unlocked! < == very important step! 2. With the phone unlocked, connect it by USB cable to the CentOS PC. 3. The phone will beep, and your “Places” menu should have “SAMSUNG_Android_SGH-T999” and your file browser should open up to location “gphoto2://[usb:003,003]/”. Voila! At this point, you can copy and paste picture and screenshot files from your phone to your CentOS PC! I just tested that sequence, and, as long as both the phone is unlocked at the time of connection, and a reboot (or two) occur after the libmtp was put back to the original, it works as desired (for me). Since a user new to this thread won’t have touched their libmtp, they won’t have to do all the reboots that I did. Note: It seems to me there should be no need to install the new libmtp (since we’re using PTP instead); hence vlc and rhythmbox should be unharmed; however, this sequence worked with both the old libmtp and the new libmtp; but, of course, neither rhythmbox nor vlc worked with the new libmtp, so, that’s why I re-installed the old libmtp (and this won’t work unless you reboot after messing with the libmtp – for reasons wholly unknown to me). Whew! Sorry for all the confusion. Things are only simple when they make sense. Thanks for all your kind support, patience, and help! I’m amazed at both how hard it is to figure out this workaround … yet – how easy the workaround is – once you know to both keep the phone in PTP mode and to ensure it is “alive” when connected. Note: The “real” solution is to get MTP to work, which is the point of Ljubomir Ljubojevic’s post earlier today.

  • To follow up on that question, here’s a summary that I *think*
    is correct.

    0. The real solution is to have libmtp updated by the Redhat developer community so that MTP mode works; until then, the PTP mode setup is an effective workaround – if you know the tricks.

    1. You apparently need to connect the phone once in order to even *see* the GUI for switching from MTP mode to PTP
    mode; so after you do that, make sure you reboot the CentOS PC with the phone disconnected from it.

    2. You apparently do *not* need the updated libmtp RPM to use PTP mode; so your rhythmbox and vlc programs should be unaffected by this MTP->PTP workaround

    3. You apparently *must* unlock your phone before connecting it to the CentOS PC; and if you connect without unlocking, you may have to start all over with a CentOS PC reboot (why this is the case is beyond me but don’t fight it; just reboot and remember to unlock the phone before connecting it to the PC).

    4. Once the phone is permanently in PTP mode, and the CentOS
    PC has been rebooted without the phone being connected, you can *unlock* the phone, and then connect it to the CentOS PC;
    and the result should be your file system on the phone being accessible on the CentOS PC.

    In my test just now, there was no error message whatsoever!
    The workaround sounds so easy, in retrospect! :)

  • I think you can avoid rebooting the PC. What you’ll need to do is before you plug in your locked S3, run the ‘lsmod’ command and save the output to ‘file-without-s3.’ Then plug the S3 into the PC and again save the output of ‘lsmod’ to ‘file-with-locked-s3.’ Now compare the 2
    files and note the differences. If say you find that when the locked S3
    was mounted a new module with the name ‘new_module’ was loaded, then instead of rebooting the PC, you can simply run the command ‘modprobe -r new_module.’

    In summary:
    1. sudo lsmod > file-without-s3
    2. ensure S3 is locked then connect to PC
    3. sudo lsmod > file-with-locked-s3
    4. sdiff-s file-with-s3 file-with-locked-s3| egrep ‘>’
    5. take note of what new modules are loaded by looking to the right of the ‘>’ sign
    6. disconnect the S3
    7. for each new module noted in step 5 above, do
    sudo modprobe -r module_name
    8. unlock the S3 and mount it again

    The phone should mount successfully! If not, then I’d really like to know what else the locked S3 does to the PC that requires a reboot to fix!

    Cheers, ak.

  • Creates a file with headers “Module, size, & used by”.
    OK. Done.
    OK. Done.
    Syntax error, corrected, in addition to file names:
    $ sdiff -s file-without-s3 file-with-locked-s3 | egrep ‘>’
    Reports nothing different. Hmmm…
    $ sdiff -s file-without-s3 file-with-locked-s3
    Also reports nothing different.
    Same with:
    $ diff file-without-s3 file-with-locked-s3
    None.
    OK. Done.
    No new modules popped up.
    Didn’t get to this point.

    Me too! :)

  • Please post what you see in /var/log/messages when you attach a locked S3. Run the following command before plugging in a locked S3:
    tail -f /var/log/message

    Hit enter key a few times to help demarcate the start of output (don’t worry, that won’t affect the contents of /var/log/messages, just what appears on screen).

    Cheers, ak.

  • Solution could be in restarting udev daemon/service, according to this article:
    http://marcofalchi.blogspot.com/2012/02/android-ics-usb-storage-on-fedora-16.html

    running:
    # service udev restart and
    # systemctl restart udev.service as root

    It also explains how to compile mtpfs, but I think Fedora 16 already had newer libmtp package.

    So Rock, try running those to commands instead of rebooting entire system. If that works, you can create 2 scripts, one to install newer libmtp and restart udev, and other to revert it back.

  • I didn’t keep the email from Ljubomir, so for those of you threading the list on mutt, this will mess up the headers–please accept my apologies.

    I don’t know why I never looked for mtpfs to compile on CentOS–after the link Ljubomir gave, I just downloaded it and compilation was trivial. I
    think I was always looking for simple-mtpfs, but honestly, I don’t remember. Maybe I just never thought of it.

    At any rate, even with older CentOS libmtp packages, installing mtpfs to
    /usr/local allows me to mount my S-III. I tried both with and without the udev rules suggested in the link, and it doesn’t seem to make a difference. The thing that is essential for me is to run mtp-detect after plugging in the phone. Otherwise, mtpfs will mount the phone, but nothing will show in the directories. If I first run mtp-detect, (though I may have to run it a couple of times before it takes–no apparent link to USB port, and I did make sure phone was unlocked when plugged in) and then mount it with mtpfs, it’s fine and works as it does in most other systems. (My way of using is command line, I mount it, usually on /mnt, then with root privilege add or remove files).

    This was with the phone set to mtp, NOT set to camera.

    So, many thanks to all who have kept this thread alive as I’ve been taking the easy way out and just using a more modern system.

  • Please provide link to rpm for Rock. Thanks.

    It would be good to see if EPEL would maintain this package.

  • Firstly, MANY thanks–your link was the thing that fixed it for me.

    It wasn’t an rpm, I just used the link that you gave

    http://marcofalchi.blogspot.com/2012/02/android-ics-usb-storage-on-fedora-16.html, downloaded the tarball from the link on the page, ran .configure && make &&
    sudo make install.

    As for libmtp, rpm -qi shows that I’m using the standard CentOS one.

    Note that it was (for me) rough around the edges, I didn’t worry about permissions, had to run mtp-detect a couple of times, but it did work. My needs are really simple though, copying a DRM ebook back and forth, or possible a short video snippet I made to show a friend, custom Ringtones and the like.

  • The good news is that it appears there are two decent solutions:
    1. PTP (camera) mode, enabled on the smartphone to work with CentOS
    2. MTP (media) mode, enabled by adding mtpfs to CentOS to work with the phone

    Neither of which appears to need the newer libmtp.

  • Just tried that but it wants the newer libmtp which may mess up vlc.

    On the system I use as workstation-cum-server (minimal server stuff) I’d rather be sure that vlc is working. Also, for Rock’s purposes, might not be good, because, I understand it, he also wants vlc, so while I fully agree that it would be better to have it from an rpm, in this case, (for me), it’s more trouble than it’s worth for the machine that I’m most likely to use. I built it on a VM running i386 just to see how it would do.

    Actually, I had less luck with it than on bare metal–part of that may be due to it being a VM, but the phone works fine with more current distributions on VM.

    The rpms for later libmtp and mtpfs all built and installed without problem, but though I could mount the phone, I was unable to see anything in the directories, even after running mtp-detect.

    So…my _personal_ experience with this is still rather iffy.

    Experimentation indicates that on the install where I have gotten it working, I have to run mtp-detect 2 or 3 times, till it completes, then I
    can mount the device.

    It’s probably quicker (for me in my particular situation) to start up the Lubuntu VM I have on this and mount it that way.

    Still, as of today, I’m way ahead of where I was before reading your post.

    Rock, I can almost certainly make an x86_64 rpm for you, but it would probably require that later libmtp which might cause its own issues.

  • Hi Scott (and thank you Ljubomir),

    I too am way ahead now, compared to the day the thread was posted. Actually, for ‘me’, the workaround works great (using PTP). And, for you, it’s also working (using your compiled mtpfs).

    As you correctly surmised, I would want VLC to work; so at this time, I have no desire for the latest libmtp. So there’s nothing more for you to do for me at this point in time.

    Any efforts moving forward should be for the general community, and not specifically for us, at this point in time.

    Thanks everyone for your help – and I hope someone with a Redhat subscription takes Ljubomir’s advice of filing a bug report against MTP so that the proper solution is in place for the future.

    You guys are all so wonderful!

  • I did not read the whole thread, but I just wanted to add:
    You don’t have to purchase a redhat subscription to file into their bugzilla.

  • OK. I opened an account, and can file the bug report:
    https://bugzilla.redhat.com/enter_bug.cgi

    What should I say?

    I’m confused how to write that bug report so that a developer will be interested in it, and so that we make that developer do the *least*
    amount of work possible to reproduce the problem, and, to therefore have a convenient testcase for solving the problem for that developer, since they are, after all, only human.

    We need to make this as simple, explicit, and rewarding for them to work on as possible.

    How is this for starters? (please modify brutally as needed!)

    a) Project = Fedora Products (but should it be Redhat Products?)
    b) Product = Fedora 18? (or should it be Fedora EPEL?)
    c) Component = mtpfs (or should it be libmtp?)
    d) Version = 18 (or should it be rawhide?)
    e) Summary: The Fedora mtpfs does not allow Android 4.x media file transfer
    (What’s a good one-sentence summary of the problem?)
    f) Description:
    Description of problem:
    Connecting an unlocked Android 4.x phone to Fedora 18 does not result in the ability to transfer media from the phone to the Fedora 18 PC.

    Version-Release number of selected component (if applicable):
    libmtp-1.1.6-0.el6.x86_64.rpm (or should we list the mtpfs version)?

    How reproducible:
    When you connect an Android 4.x smartphone to Fedora 18

    Steps to Reproduce:
    1. Set the Android 4.x smartphone to MTP mode (if not already)
    2. Unlock the Android 4.x smartphone
    3. Connect the Android 4.x smartphone to Fedora 18 by USB cable
    4. The file system will _not_ show up in the Desktop browser

    Actual results:
    Unable to mount SAMSUNG_Android_SGH-T999
    Error initializing camera: -1: Unspecified error http://www5.picturepush.com/photo/a/13169313/640/13169313.png

    $ dmesg
    ==> gvfs-gphoto2-vo[3575]: segfault at 3 ip 00007f886e7ac290 sp 00007fffacd22980
    ==> error 4 in ptp2.so[7f886e78c000+4f000]

    The file system shows up but all the directories show up as empty:
    http://www5.picturepush.com/photo/a/13169408/640/13169408.png

    Expected results:
    The file system should show up properly, with non-zero-sized files:
    http://www5.picturepush.com/photo/a/13199358/640/13199358.png

    Additional info:
    https://www.CentOS.org/modules/newbb/viewtopic.php?topic_id9977&forumW&post_id4608#forumpost184608

  • I thought we’re having the problem with RHEL6. (and offshoots).

    Fedora works almost out of the box with the phone, using simple-mtpfs. Actually, mtpfs has been abandoned (BIG DISCLAIMER–going on memory could be wrong) or else had other problems, but regardless (end of disclaimer, this part I distinctly remember) Fedora is using simple-mtpfs and once installed, Android is fine. So I think you want to file this against RHEL6.

    However:
    Although it now works for me with the tarball on my main workstation, which has all sorts of other things installed, when trying on a few VMS, both with and without the newer version of libmtp, with and without the udev file mentioned, and with both tarball and compiled from source mtpfs, I
    couldn’t get it to work. It would mount the phone, but show nothing in the directories. Therefore, not sure what a proper bug report would be at this point. I was under the impression that all that was needed was a working mtpfs, but that doesn’t seem to be the case.

    So…I’m back at square one, save for my workstation (the important one for me, though), I can’t get any combination to work on any CentOS 6.4 VM.

  • My mistake. I don’t really understand any of this, so, I’m really *not* the right guy to file the bug report, as I’m out of my league. I can “append” to it though.
    :)

  • No problem. I’m not going to file a bug report myself, as it’s something that I suspect will be fixed with the next release and not a major inconvenience to me, though it is nice to finally have it work on at least one machine.

  • What’s a good one-line description of the problem?

    Is it this?
    RHEL6 mtpfs does not properly mount Samsung Galaxy SIII in MTP media mode If not, would someone kindly correct that one liner?

    In addition, is this bug the same thing?
    Bug 820583 – Review Request:
    mtpfs – FUSE file system allowing MTP device to be mounted and browsed https://bugzilla.redhat.com/show_bug.cgi?id

  • Yes, that’s pretty accurate. Although there is no official RH mtpfs package. The source rpm was from sourceforge. So perhaps a feature request like

    RHEL6 cannot current mount the popular Samsung Galaxy SIII. Fedora is using simple-mtpf (and perhaps a link to 841260, and even 820583 with a mention that 841260 shows that mtpfs has been abandoned by Fedora).

    It’s against Fedora.

    Note that I was one of the ones who commented on that one, with the simple-mtpfs solution. That is also against Fedora 17, so not applicable.

  • OK. Please take a look at the bug and feel free to correct anywhere that I err or misrepresent the problem.

    If nobody corrects anything, I’ll know you didn’t look :)
    (because I really can’t have accurately portrayed the problem!).

    I invite corrections, so that we all benefit:
    https://bugzilla.redhat.com/show_bug.cgi?id

  • I don’t see anything to add–you linked to the forum thread, which covers most of the information we have had here.

  • Just for the record, for the past two weeks, for whatever (unknown) reason, I have been unable to mount the phone in PTP mode (i.e., camera mode) onto the CentOS laptop. Sigh.

    This is pretty frustrating.

    I’m sure *something* changed (either on the phone or on the laptop); but, whatever it is, is unknown to me.

    Sigh …

  • When that happened to me it was because I’d gotten paranoid and put a password on my phone. Which then, as a security measure, refused to mount itself on my PC. Ali

LEAVE A COMMENT