Code: Select all
Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note.
Found 1 device(s):
Samsung: GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note (04e8:6860) @ bus 1, dev 5
Attempting to connect device
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
Code: Select all
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
DESCRIPTION="a FUSE based MTP filesystem designed to make exchanging files between Android devices and Linux"
HOMEPAGE="http://research.jacquette.com/jmtpfs-exchanging-files-between-android-devices-and-linux/"
SRC_URI="http://research.jacquette.com/wp-content/uploads/2012/05/${P}.tar.gz"
LICENSE="GPL"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
DEPEND="media-libs/libmtp
sys-fs/fuse"
RDEPEND="${DEPEND}"
Code: Select all
make -j3
Making all in src
make[1]: Entering directory `/tmp/portage/sys-fs/jmtpfs-0.4/work/jmtpfs-0.4/src'
i686-pc-linux-gnu-g++ -DPACKAGE_NAME=\"jmtpfs\" -DPACKAGE_TARNAME=\"jmtpfs\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"jmtpfs\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jmtpfs\" -DVERSION=\"1.0\" -DHAVE_LIBMAGIC=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MAGIC_H=1 -I. -I/usr/include/libusb-1.0 -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -march=native -O2 -pipe -fomit-frame-pointer -std=c++0x -c -o jmtpfs-jmtpfs.o `test -f 'jmtpfs.cpp' || echo './'`jmtpfs.cpp
i686-pc-linux-gnu-g++ -DPACKAGE_NAME=\"jmtpfs\" -DPACKAGE_TARNAME=\"jmtpfs\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"jmtpfs\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jmtpfs\" -DVERSION=\"1.0\" -DHAVE_LIBMAGIC=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MAGIC_H=1 -I. -I/usr/include/libusb-1.0 -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -march=native -O2 -pipe -fomit-frame-pointer -std=c++0x -c -o jmtpfs-MtpDevice.o `test -f 'MtpDevice.cpp' || echo './'`MtpDevice.cpp
i686-pc-linux-gnu-g++ -DPACKAGE_NAME=\"jmtpfs\" -DPACKAGE_TARNAME=\"jmtpfs\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"jmtpfs\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jmtpfs\" -DVERSION=\"1.0\" -DHAVE_LIBMAGIC=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MAGIC_H=1 -I. -I/usr/include/libusb-1.0 -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -march=native -O2 -pipe -fomit-frame-pointer -std=c++0x -c -o jmtpfs-ConnectedMtpDevices.o `test -f 'ConnectedMtpDevices.cpp' || echo './'`ConnectedMtpDevices.cpp
i686-pc-linux-gnu-g++ -DPACKAGE_NAME=\"jmtpfs\" -DPACKAGE_TARNAME=\"jmtpfs\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"jmtpfs\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jmtpfs\" -DVERSION=\"1.0\" -DHAVE_LIBMAGIC=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MAGIC_H=1 -I. -I/usr/include/libusb-1.0 -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -march=native -O2 -pipe -fomit-frame-pointer -std=c++0x -c -o jmtpfs-Mutex.o `test -f 'Mutex.cpp' || echo './'`Mutex.cpp
jmtpfs.cpp: In function ‘int main(int, char**)’:
jmtpfs.cpp:454:90: error: ‘getuid’ was not declared in this scope
jmtpfs.cpp:454:100: error: ‘getgid’ was not declared in this scope
make[1]: *** [jmtpfs-jmtpfs.o] Errore 1
make[1]: *** Attesa dei processi non terminati....
make[1]: Leaving directory `/tmp/portage/sys-fs/jmtpfs-0.4/work/jmtpfs-0.4/src'
make: *** [all-recursive] Errore 1

++jcTux wrote:It's a shame that MTP protocole is not fully supported on Linux.
I have a Galaxy S3 also, I use the old FTP solution for now.
I don't think that Galaxy S3 is the problem. This is the new recommendation by Google for new devices under ICS.kernelOfTruth wrote: probably won't buy a Galaxy S3 then
Seems that's a gcc-4.7 related problem, try gcc-4.6 instead.yellowhat wrote:Thanks for reply but I get this error in emerging:
Code: Select all
make -j3 Making all in src make[1]: Entering directory `/tmp/portage/sys-fs/jmtpfs-0.4/work/jmtpfs-0.4/src' i686-pc-linux-gnu-g++ -DPACKAGE_NAME="jmtpfs" -DPACKAGE_TARNAME="jmtpfs" -DPACKAGE_VERSION="1.0" -DPACKAGE_STRING="jmtpfs\ 1.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="jmtpfs" -DVERSION="1.0" -DHAVE_LIBMAGIC=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MAGIC_H=1 -I. -I/usr/include/libusb-1.0 -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -march=native -O2 -pipe -fomit-frame-pointer -std=c++0x -c -o jmtpfs-jmtpfs.o `test -f 'jmtpfs.cpp' || echo './'`jmtpfs.cpp i686-pc-linux-gnu-g++ -DPACKAGE_NAME="jmtpfs" -DPACKAGE_TARNAME="jmtpfs" -DPACKAGE_VERSION="1.0" -DPACKAGE_STRING="jmtpfs\ 1.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="jmtpfs" -DVERSION="1.0" -DHAVE_LIBMAGIC=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MAGIC_H=1 -I. -I/usr/include/libusb-1.0 -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -march=native -O2 -pipe -fomit-frame-pointer -std=c++0x -c -o jmtpfs-MtpDevice.o `test -f 'MtpDevice.cpp' || echo './'`MtpDevice.cpp i686-pc-linux-gnu-g++ -DPACKAGE_NAME="jmtpfs" -DPACKAGE_TARNAME="jmtpfs" -DPACKAGE_VERSION="1.0" -DPACKAGE_STRING="jmtpfs\ 1.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="jmtpfs" -DVERSION="1.0" -DHAVE_LIBMAGIC=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MAGIC_H=1 -I. -I/usr/include/libusb-1.0 -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -march=native -O2 -pipe -fomit-frame-pointer -std=c++0x -c -o jmtpfs-ConnectedMtpDevices.o `test -f 'ConnectedMtpDevices.cpp' || echo './'`ConnectedMtpDevices.cpp i686-pc-linux-gnu-g++ -DPACKAGE_NAME="jmtpfs" -DPACKAGE_TARNAME="jmtpfs" -DPACKAGE_VERSION="1.0" -DPACKAGE_STRING="jmtpfs\ 1.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="jmtpfs" -DVERSION="1.0" -DHAVE_LIBMAGIC=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MAGIC_H=1 -I. -I/usr/include/libusb-1.0 -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -march=native -O2 -pipe -fomit-frame-pointer -std=c++0x -c -o jmtpfs-Mutex.o `test -f 'Mutex.cpp' || echo './'`Mutex.cpp jmtpfs.cpp: In function ‘int main(int, char**)’: jmtpfs.cpp:454:90: error: ‘getuid’ was not declared in this scope jmtpfs.cpp:454:100: error: ‘getgid’ was not declared in this scope make[1]: *** [jmtpfs-jmtpfs.o] Errore 1 make[1]: *** Attesa dei processi non terminati.... make[1]: Leaving directory `/tmp/portage/sys-fs/jmtpfs-0.4/work/jmtpfs-0.4/src' make: *** [all-recursive] Errore 1
The intention was good, but implementation (mtp) is bad.jcTux wrote:Here are some explanations by a Google engineer on the reasons why they made this choice.
Code: Select all
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
inherit eutils
DESCRIPTION="a FUSE based MTP filesystem designed to make exchanging files between Android devices and Linux"
HOMEPAGE="http://research.jacquette.com/jmtpfs-exchanging-files-between-android-devices-and-linux/"
SRC_URI="http://research.jacquette.com/wp-content/uploads/2012/05/${P}.tar.gz"
LICENSE="GPL"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE=""
DEPEND="media-libs/libmtp
sys-fs/fuse"
RDEPEND="${DEPEND}"
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${PN}-gcc-4.7.patch
}
Code: Select all
--- src/jmtpfs.cpp.orig 2012-06-19 23:17:11.954301180 +0800
+++ src/jmtpfs.cpp 2012-06-19 23:17:41.745302509 +0800
@@ -32,6 +32,7 @@
#include <sstream>
#include <iomanip>
#include <assert.h>
+#include <unistd.h>
#define JMTPFS_VERSION "0.4"
Don't know how to auto mount yet.jmtpfs on /home/test/nexus type fuse.jmtpfs (rw,nosuid,nodev,user=test)

Thanks, will check that later.kernelOfTruth wrote:automount probably could be realized via udev rules:
http://www.monperrus.net/martin/automou ... and+pmount
or some other shiny stuff:
http://code.google.com/p/yad/wiki/USBFlash
umount /path/to/folder should do the job.yellowhat wrote: A question for you how to unmount?
Will file a bug report or add a wiki when I dig something more.yngwin wrote:If you find a decent solution to make MTP (more or less) work on Gentoo, please document it in our wiki!
There'syellowhat wrote:Seems that ubuntu uses gphoto2 to mount it. Any ideas for gentoo?
The ideas using ssh over usb is too slow (1-2 MB/s)
Code: Select all
media-sound/gmtp