Anyone Know How to Use MTP from Linux (Ubuntu 10.04)

Discussion in 'Samsung Galaxy Nexus' started by VingInMedina, Dec 28, 2011.

DroidForums.net is the premier Android Forum - Registered Users do not see these ads. Please Register - It's Free!
  1. VingInMedina
    Offline

    VingInMedina Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Medina, Ohio
    Ratings:
    +1
    Has anyone been able to set up MTP access from their Linux system? I am using Ubuntu 10.04 and I would really like to get this working. I can access my Nexus with adb and push/pull files with that, but it isn't as easy as having a mounted file system.
    Last edited: Dec 28, 2011
  2. bryantjopplin
    Offline

    bryantjopplin Member

    Joined:
    Mar 8, 2010
    Messages:
    225
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    shreveport
    Ratings:
    +2
    wasnt seaching for this but i remembered there was a thread on it scroll down from the page on this link

    http://ohheyitslou.blogspot.com/

    Sent From My Sexy Nexy
  3. VingInMedina
    Offline

    VingInMedina Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Medina, Ohio
    Ratings:
    +1
    That link was helpful and I found another:

    http://www.omgubuntu.co.uk/2011/12/how-to-connect-your-android-ice-cream-sandwich-phone-to-ubuntu-for-file-access/

    M
    y problem was that all of these are assuming that you are running Ubuntu 11.10 and I am running 10.04. I was able to get it working, and this is how I did it.

    Using the Software Center, make sure that autoconf and libmad0-dev are installed.Download these files:
    • fuse-2.8.6.tar.gz
    • libid3tag-0.15.1b.tar.gz
    • libmtp-1.1.1.tar.gz
    Extract them into a working area. Then compile and install each one (./configure ; make ; sudo make install).

    After the libid3tag is built, you will need to create a file called id3tag.pc in the /usr/local/lib/pkgconfig directory. Here is the one that I made:

    Code:
    [LEFT][COLOR=#333333][FONT=Ubuntu]# id3tag pkg-config source file[/FONT][/COLOR][COLOR=#333333][FONT=Ubuntu]
    
    prefix=/usr/local
    exec_prefix=${prefix}
    libdir=${exec_prefix}/lib
    includedir=${prefix}/include
    [/FONT][/COLOR][COLOR=#333333][FONT=Ubuntu]
    Name: id3tag
    Description: id3lib is a software library for manipulating ID3v1/v1.1 and ID3v2 tags.
    Version: 0.15
    Requires:
    Conflicts:
    Libs: -L${libdir} -lid3tag
    Libs.private:
    Cflags: -I${includedir}
    [/FONT][/COLOR][/LEFT]
    
    
    Then you can get the mtpfs code with this command:

    Code:
    svn checkout [URL="http://mtpfs.googlecode.com/svn/trunk/"]mtpfs - Revision 21: /trunk[/URL] mtpfs-read-only
    Compile it with these commands:

    Code:
    aclocal
    autoconf
    automake -a
    ./configure
    make
    sudo make install
    
    When all that is done, you will have a working mtpfs program and you can mount your Galaxy Nexus with the command

    Code:
    mtpfs -o allow_other <mount_point>
    And then unmount it with this command

    Code:
    fusermount -u <mount_point>
    Last edited: Jan 8, 2012
  4. bryantjopplin
    Offline

    bryantjopplin Member

    Joined:
    Mar 8, 2010
    Messages:
    225
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    shreveport
    Ratings:
    +2
    Just to let you know I have no clue what you mean. Lol im not that good at linux.

    Sent From My Sexy Nexy
  5. Dilligaf
    Offline

    Dilligaf Member

    Joined:
    Dec 8, 2009
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    SoCal, USA
    Ratings:
    +0
    I am also running 10.04 as I only run LTS versions. The latest version of mtpfs and mtpfs-tools I can find is 1.0.2, and they're a no-go with the Nexus (won't detect it). Two of the other three files above are also several versions behind. Is there a repository where I can get the backports for these (preferred) or source code which will compile under 10.04 without a hassle?

    Thanks!
  6. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,828
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    Use gmtp found in the software center...it has a GUI and is pretty straight forward. I used to use it but found adb or swiftp more useful as I didn't want wires.
  7. Dilligaf
    Offline

    Dilligaf Member

    Joined:
    Dec 8, 2009
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    SoCal, USA
    Ratings:
    +0
    Not available for 10.04.
  8. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,828
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    You should be able to compile from source: gmtp.sourceforge.net/#Installation
  9. VingInMedina
    Offline

    VingInMedina Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Medina, Ohio
    Ratings:
    +1
    If you are running 10.04 LTS, I would STRONGLY recommend that you DO NOT attempt to compile and install gmtp. Not because you can't, because you can -- in fact I did. In the process of compiling gmtp, you will probably need to download, compile and install the latest version of glib, libIDL, and GConf. This will wreck havoc with your current GNome setup on your machine. I ended up getting the
    "Install Problem! The configuration defaults for the GNOME Power Manager have not been installed." error message and I was never able to clear it. Had to reinstall Ubuntu 10.04 and reconfigure the whole machine.

    Here are links for the software that I had to download and compile to get mtpfs working:

    The command to download mtpfs:

    svn checkout
    http://mtpfs.googlecode.com/svn/trunk/ mtpfs-read-only
  10. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,828
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    Interesting. When you got that error did you try sudo dpkg --configure -a ? That should fix any configuration errors you got. Of course if your method above does the job, it saves the headache.
  11. VingInMedina
    Offline

    VingInMedina Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Medina, Ohio
    Ratings:
    +1
    Oh yeah, tried that and just about every other thing that was suggested. Had a couple people from the Ubuntu support forums pointing me to possible solutions as well. I am sure that if I kept at it (I think the problem may have been files that were put into /usr/local/share) I could have fixed it, but I was three days without my machine and I needed to get it back up and running.

    For me, having mtpfs working and able to mount my Nexus as a file system was good enough.

    Dilligaf -- you won't be able to get compiled versions of these modules for 10.04 -- you will have to compile them yourself.
    Last edited: Jan 8, 2012
  12. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,828
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    Yeah, I had that problem separately from the Nexus and gmtp and the dpkg configure worked for me when it happened. I've been on 11.10 since its been stable so never had to worry about gmtp not working or compiling from source. however, just because i prefer wireless, i've been using ftp or wireless adb rather then gmtp. either way, sounds good.
  13. Dilligaf
    Offline

    Dilligaf Member

    Joined:
    Dec 8, 2009
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    SoCal, USA
    Ratings:
    +0


    Thanks VERY much! I was going to go ahead and compile gmtp this morning.
    I knew I would need the other three packages as well - thanks for the links.
    I'll post up when it's working.

  14. Dilligaf
    Offline

    Dilligaf Member

    Joined:
    Dec 8, 2009
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    SoCal, USA
    Ratings:
    +0
    OK - compiled fuse-2.8.6 and installed. It turns out that I have new-enough versions of the other two already installed.

    However, on trying to compile mtpfs, I get this during the .configure (via autogen.sh):

    checking dependency style of gcc... gcc3
    checking whether gcc and cc understand -c and -o together... yes
    checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for FUSE... configure: error: Package requirements (fuse >= 2.2 glib-2.0 >= 2.6 gthread-2.0 >= 1.2 libmtp >= 0.0.9) were not met:

    No package 'glib-2.0' found
    No package 'gthread-2.0' found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    Alternatively, you may set the environment variables FUSE_CFLAGS
    and FUSE_LIBS to avoid the need to call pkg-config.


    Well...
    [rcs@yoda: ~/Downloads/mtpfs-read-only]$ echo $PKG_CONFIG_PATH
    /usr/local/lib/pkgconfig/

    I have libglib2.0.0 installed (2.24). There is no package "glib-2.0" available.

    There is no available package for gthread-2.x or libgthread2.x available, and I couldn't find anything on sourceforge.net either.

    What should I try setting those two environment variables to?

    Thanks!
  15. VingInMedina
    Offline

    VingInMedina Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Medina, Ohio
    Ratings:
    +1
    Last edited: Jan 8, 2012
Search tags for this page
galaxy nexus ubuntu 10.04
,
gmtp 10.04
,
gmtp for ubuntu 10.04
,

gmtp ubuntu 10.04

,
how to use gmtp
,
how to use mtpfs
,
install gmtp ubuntu 10.04
,

mtp ubuntu 10.04

,
ubuntu 10.04 gmtp
,

ubuntu 10.04 mtp