I am now the proud owner of an Asus Transformer tablet (not the prime) and so wanted to update mtpfs to work better with it.
The biggest change was to add support for multiple storage areas. Now when you mount a MTP device which has internal storage and a MicroSD card (or similar) it shows up as two separate directories which you can access.
The download is available from mtpfs page
when i du i get a core dump
[[email protected] android]# du
0 ./Playlists
Aborted (core dumped)
[[email protected] android]# strace du
execve(“/usr/bin/du”, [“du”], [/* 48 vars */]) = 0
brk(0) = 0x10de000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1533fde000
access(“/etc/ld.so.preload”, R_OK) = -1 ENOENT (No such file or directory)
open(“/etc/ld.so.cache”, O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=103538, …}) = 0
mmap(NULL, 103538, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1533fc4000
close(3) = 0
open(“/lib64/libc.so.6”, O_RDONLY|O_CLOEXEC) = 3
read(3, “\177ELF\2\1\1\3\3>\1\260\27\342\31:”…, 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2076800, …}) = 0
mmap(0x3a19e00000, 3896632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3a19e00000
mprotect(0x3a19fad000, 2097152, PROT_NONE) = 0
mmap(0x3a1a1ad000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ad000) = 0x3a1a1ad000
mmap(0x3a1a1b3000, 17720, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3a1a1b3000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1533fc3000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1533fc2000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1533fc1000
arch_prctl(ARCH_SET_FS, 0x7f1533fc2700) = 0
mprotect(0x616000, 4096, PROT_READ) = 0
mprotect(0x3a1a1ad000, 16384, PROT_READ) = 0
mprotect(0x3a19c21000, 4096, PROT_READ) = 0
munmap(0x7f1533fc4000, 103538) = 0
brk(0) = 0x10de000
brk(0x10ff000) = 0x10ff000
brk(0) = 0x10ff000
newfstatat(AT_FDCWD, “.”, {st_mode=S_IFDIR|0777, st_size=0, …}, AT_SYMLINK_NOFOLLOW) = 0
openat(AT_FDCWD, “.”, O_RDONLY|O_NOCTTY|O_NONBLOCK|O_DIRECTORY|O_NOFOLLOW) = 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFDIR|0777, st_size=0, …}) = 0
fcntl(3, F_GETFL) = 0x38800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_NOFOLLOW)
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
newfstatat(AT_FDCWD, “.”, {st_mode=S_IFDIR|0777, st_size=0, …}, AT_SYMLINK_NOFOLLOW) = 0
fcntl(3, F_DUPFD, 3) = 4
fcntl(4, F_GETFD) = 0
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
getdents(3, /* 5 entries */, 32768) = 152
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
fstatfs(4, {f_type=0x65735546, f_bsize=1024, f_blocks=31255552, f_bfree=22782016, f_bavail=22782016, f_files=249567416327, f_ffree=1048576, f_fsid={0, 0}, f_namelen=0, f_frsize=1024}) = 0
newfstatat(4, “Playlists”, {st_mode=S_IFDIR|0777, st_size=0, …}, AT_SYMLINK_NOFOLLOW) = 0
openat(4, “Playlists”, O_RDONLY|O_NOCTTY|O_NONBLOCK|O_DIRECTORY|O_NOFOLLOW) = 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFDIR|0777, st_size=0, …}) = 0
fcntl(3, F_GETFL) = 0x38800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_NOFOLLOW)
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
newfstatat(4, “Playlists”, {st_mode=S_IFDIR|0777, st_size=0, …}, AT_SYMLINK_NOFOLLOW) = 0
fcntl(3, F_DUPFD, 3) = 5
fcntl(5, F_GETFD) = 0
fcntl(5, F_SETFD, FD_CLOEXEC) = 0
getdents(3, /* 2 entries */, 32768) = 48
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
close(5) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), …}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1533fdd000
write(1, “0\t./Playlists\n”, 140 ./Playlists
) = 14
newfstatat(4, “SD Card”, {st_mode=S_IFDIR|0777, st_size=0, …}, AT_SYMLINK_NOFOLLOW) = 0
openat(4, “SD Card”, O_RDONLY|O_NOCTTY|O_NONBLOCK|O_DIRECTORY|O_NOFOLLOW) = 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFDIR|0777, st_size=0, …}) = 0
fcntl(3, F_GETFL) = 0x38800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_NOFOLLOW)
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
gettid() = 6716
tgkill(6716, 6716, SIGABRT) = 0
— {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=6716, si_uid=0, si_value={int=1108061760, ptr=0xffff8801420bae40}} (Aborted) —
+++ killed by SIGABRT (core dumped) +++
Aborted (core dumped)
When I mount an encrypted Android ICS (4.0.2) phone and try to browse the file system, I get a bunch of these errors:
kernel: usb 1-8.2: usbfs: process 1619 (mtpfs) did not claim interface 0 before use
I have not tried an unencrypted device, so I’m not sure if that’s the issue.
The biggest change was to add support for multiple storage areas. Now when you mount a MTP device which has internal storage and a MicroSD card (or similar) it shows up as two separate directories which you can access.
[WORDPRESS HASHCASH] The poster sent us ‘0 which is not a hashcash value.
Version 0.9 used to work, kinda-sorta on the Samsung Galaxy Tab2 7.0 as long as you use version 1.1.5 of libmtpfs. The way it worked was it did a sort of union mount of the internal memory and sdcard on top of each other and set the permissions to 777. This version, 1,1, doesn’t work at all.
toybox:~$ mtpfs foo
Error: Unable to open ~/.mtpz-data for reading.
Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
Found 1 device(s):
Samsung: Galaxy models (MTP) (04e8:6860) @ bus 1, dev 3
Attempting to connect device
Listing File Information on Device with name: GT-P3113
toybox:~$ ls foo
ls: cannot access foo: Transport endpoint is not connected
toybox:~$ _
I think you should seriously look at doing some heavy code-borrowing from go-mtpfs and jmtpfs. Both of those work.
hi,
thanks for mtpfp.
I install it on Debian Wheezy (with libmtp-dev fuse libmtp9 pkg-config libfuse-dev libglib2.0-dev libmad0-dev libid3tag0-dev packages), and when I do
$mtpfs , with mtp enabled on my LG Optimus L5 I have this message :
Listing raw device(s)
Device 0 (VID=1004 and PID=631c) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Found 1 device(s):
1004:631c @ bus 1, dev 9
Attempting to connect device
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
Android device detected, assigning default bug flags
Error 1: Get Storage information failed.
Error 2: PTP Layer error 02fe: get_handles_recursively(): could not get object handles.
Error 2: (Look this up in ptp.h for an explanation.)
Listing File Information on Device with name: (NULL)
LIBMTP_Get_Storage() failed:-1
any idea ?
thank…..
thank…..
nice…..
good
nice…info….
good info….
very useful…