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

VingInMedina

Member
Joined
Jan 18, 2010
Messages
175
Reaction score
1
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:
OP
VingInMedina

VingInMedina

Member
Joined
Jan 18, 2010
Messages
175
Reaction score
1
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:

bryantjopplin

Member
Joined
Mar 8, 2010
Messages
225
Reaction score
2
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
 

Dilligaf

Member
Joined
Dec 8, 2009
Messages
133
Reaction score
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!
 

czerdrill

Silver Member
Joined
Jan 2, 2010
Messages
4,825
Reaction score
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.
 
OP
VingInMedina

VingInMedina

Member
Joined
Jan 18, 2010
Messages
175
Reaction score
1
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
 

czerdrill

Silver Member
Joined
Jan 2, 2010
Messages
4,825
Reaction score
12
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

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

VingInMedina

Member
Joined
Jan 18, 2010
Messages
175
Reaction score
1
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:

czerdrill

Silver Member
Joined
Jan 2, 2010
Messages
4,825
Reaction score
12
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/lib/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.

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.
 

Dilligaf

Member
Joined
Dec 8, 2009
Messages
133
Reaction score
0
Location
SoCal, USA
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.


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.

 

Dilligaf

Member
Joined
Dec 8, 2009
Messages
133
Reaction score
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!
 
OP
VingInMedina

VingInMedina

Member
Joined
Jan 18, 2010
Messages
175
Reaction score
1
Location
Medina, Ohio
Last edited:
Top