1. You want that $100.00 in your pocket or an Amazon Fire TV don't you? Well here's the deal. With our new updated look we are in desperate need of an updated logo. The 'old' one has certainly served us well, but it's time. Find all the details here: bit.ly/1q0k6Wa
  2. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

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

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

  1. VingInMedina
    Offline

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    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 New Member

    Joined:
    Mar 8, 2010
    Messages:
    225
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    shreveport
    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 New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    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 New Member

    Joined:
    Mar 8, 2010
    Messages:
    225
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    shreveport
    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 New Member

    Joined:
    Dec 8, 2009
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    SoCal, USA
    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 New Member

    Joined:
    Jan 2, 2010
    Messages:
    4,828
    Likes Received:
    12
    Trophy Points:
    0
    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 New Member

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

    czerdrill New Member

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

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    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 New Member

    Joined:
    Jan 2, 2010
    Messages:
    4,828
    Likes Received:
    12
    Trophy Points:
    0
    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 New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    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 New Member

    Joined:
    Jan 2, 2010
    Messages:
    4,828
    Likes Received:
    12
    Trophy Points:
    0
    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 New Member

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


    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 New Member

    Joined:
    Dec 8, 2009
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    SoCal, USA
    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 New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    Last edited: Jan 8, 2012
  16. Dilligaf
    Offline

    Dilligaf New Member

    Joined:
    Dec 8, 2009
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    SoCal, USA
    OK, thanks. Will try the link.

    libmtp-1.1.1 is installed.

    I was able to link to the phone using sshfs, so I have that route also.
  17. Dilligaf
    Offline

    Dilligaf New Member

    Joined:
    Dec 8, 2009
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    SoCal, USA
    OK, got all the dependencies taken care of, and the typos in the id3tag.pc file fixed. So now it'll configure, but won't compile - it appears to be missing a header file:

    [rcs@yoda: ~/Downloads/mtpfs-read-only]$ make check
    gcc -DPACKAGE_NAME=\"MTPfs\" -DPACKAGE_TARNAME=\"mtpfs\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"MTPfs\ 1.0\" -DPACKAGE_BUGREPORT=\"Chris\ Debenham\ \<chris@adebenham.com\>\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mtpfs\" -DVERSION=\"1.0\" -DDEBUG=0 -I. -DFUSE_USE_VERSION=22 -D_FILE_OFFSET_BITS=64 -pthread -I/usr/local/include/fuse -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DUSEMAD -g -O2 -MT mtpfs-mtpfs.o -MD -MP -MF .deps/mtpfs-mtpfs.Tpo -c -o mtpfs-mtpfs.o `test -f 'mtpfs.c' || echo './'`mtpfs.c
    In file included from mtpfs.c:9:
    ./mtpfs.h:29:20: error: id3tag.h: No such file or directory
    In file included from ./mtpfs.h:30,
    from mtpfs.c:9:
    ./id3read.h:4: warning: ‘struct id3_tag’ declared inside parameter list
    ./id3read.h:4: warning: its scope is only this definition or declaration, which is probably not what you want
    ./id3read.h:5: warning: ‘struct id3_tag’ declared inside parameter list
    ./id3read.h:6: warning: ‘struct id3_tag’ declared inside parameter list
    ./id3read.h:7: warning: ‘struct id3_tag’ declared inside parameter list
    ./id3read.h:8: warning: ‘struct id3_tag’ declared inside parameter list
    ./id3read.h:9: warning: ‘struct id3_tag’ declared inside parameter list
    ./id3read.h:10: warning: ‘struct id3_tag’ declared inside parameter list
    ./id3read.h:11: warning: ‘struct id3_tag’ declared inside parameter list
    mtpfs.c: In function ‘mtpfs_release’:
    mtpfs.c:484: error: ‘ID3_FILE_MODE_READONLY’ undeclared (first use in this function)
    mtpfs.c:484: error: (Each undeclared identifier is reported only once
    mtpfs.c:484: error: for each function it appears in.)
    mtpfs.c:485: warning: assignment makes pointer from integer without a cast
    mtpfs.c:487: warning: passing argument 1 of ‘getArtist’ from incompatible pointer type
    ./id3read.h:4: note: expected ‘struct id3_tag *’ but argument is of type ‘struct id3_tag *’
    mtpfs.c:488: warning: passing argument 1 of ‘getTitle’ from incompatible pointer type
    ./id3read.h:7: note: expected ‘struct id3_tag *’ but argument is of type ‘struct id3_tag *’
    mtpfs.c:489: warning: passing argument 1 of ‘getAlbum’ from incompatible pointer type
    ./id3read.h:5: note: expected ‘struct id3_tag *’ but argument is of type ‘struct id3_tag *’
    mtpfs.c:490: warning: passing argument 1 of ‘getGenre’ from incompatible pointer type
    ./id3read.h:8: note: expected ‘struct id3_tag *’ but argument is of type ‘struct id3_tag *’
    mtpfs.c:491: warning: passing argument 1 of ‘getYear’ from incompatible pointer type
    ./id3read.h:6: note: expected ‘struct id3_tag *’ but argument is of type ‘struct id3_tag *’
    mtpfs.c:499: warning: passing argument 1 of ‘getSonglen’ from incompatible pointer type
    ./id3read.h:9: note: expected ‘struct id3_tag *’ but argument is of type ‘struct id3_tag *’
    mtpfs.c:507: warning: passing argument 1 of ‘getTracknum’ from incompatible pointer type
    ./id3read.h:10: note: expected ‘struct id3_tag *’ but argument is of type ‘struct id3_tag *’
    make: *** [mtpfs-mtpfs.o] Error 1
  18. VingInMedina
    Offline

    VingInMedina New Member

    Joined:
    Jan 18, 2010
    Messages:
    172
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Medina, Ohio
    Sorry -- That's my fault. I just saw that what I had pasted into my post for creating the id3tag.pc file was not correct. I went back and updated it. The file should look like this:

    Code:
    # id3tag pkg-config source file
    
    
    prefix=/usr/local
    exec_prefix=${prefix}
    libdir=${exec_prefix}/lib
    includedir=${prefix}/include
    
    
    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} 
    
    
    
    Fix that file, do your ./configure again and see if mtpfs compiles for you.
  19. Dilligaf
    Offline

    Dilligaf New Member

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

    Did that, and after installing the dev package for libid3tag (oops!), it compiled fine...

    THANKS!
    Last edited: Jan 8, 2012
  20. Dilligaf
    Offline

    Dilligaf New Member

    Joined:
    Dec 8, 2009
    Messages:
    133
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    SoCal, USA
    However, it compiles - but it has a problem finding the phone (wrong product ID) and can't do anything else with it:

    [mythtv@vader: ~]$ mtp-detect
    libmtp version: 1.1.1

    Listing raw device(s)
    Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1/S2.
    Found 1 device(s):
    Samsung: GT-P7510/Galaxy Tab 10.1/S2 (04e8:6860) @ bus 1, dev 0
    Attempting to connect device(s)
    ignoring usb_claim_interface = -1ignoring usb_claim_interface = -22PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
    LIBMTP libusb: Attempt to reset device
    inep: usb_get_endpoint_status(): Operation not permitted
    outep: usb_get_endpoint_status(): Operation not permitted
    usb_clear_halt() on IN endpoint: Operation not permitted
    usb_clear_halt() on OUT endpoint: Operation not permitted
    usb_clear_halt() on INTERRUPT endpoint: Operation not permitted
    ignoring usb_claim_interface = -1ignoring usb_claim_interface = -22LIBMTP PANIC: failed to open session on second attempt
    Unable to open raw device 0
    OK.

    Hmmm....
Search tags for this page

galaxy nexus ubuntu 10.04

,
gmtp 10.04
,
gmtp for ubuntu 10.04
,

gmtp ubuntu 10.04

,
go-mtpfs ubuntu 10.04
,
how to use gmtp
,
how to use mtpfs
,

install gmtp ubuntu 10.04

,
linux mtp ubuntu
,
mtp for ubuntu 10.04
,

mtp ubuntu 10.04

,
ubuntu 10 mtp
,

ubuntu 10.04 gmtp

,

ubuntu 10.04 mtp

,
ubuntu 10.04 mtpfs