cjd / mtpfs Goto Github PK
View Code? Open in Web Editor NEWFilesystem to mount MTP devices directly
License: GNU General Public License v3.0
Filesystem to mount MTP devices directly
License: GNU General Public License v3.0
Hi!
Try to attach a phone to a Gentoo linux box...
use libmtp-1.1.11 mtpfs-1.1-r3
mtpfs ~/AndroidDevice/
Listing raw device(s)
Device 0 (VID=2717 and PID=ff68) is a Xiaomi Redmi 2 2014811 (MTP).
Found 1 device(s):
Xiaomi: Redmi 2 2014811 (MTP) (2717:ff68) @ bus 2, dev 8
Attempting to connect device
Android device detected, assigning default bug flags
Error 7: Found a bad handle, trying to ignore it.
Listing File Information on Device with name: Redmi Note 3
mtp-detect: http://pastebin.calculate-linux.ru/ru/show/11901
Installed latest OSX Fuse 3.5.8 from https://osxfuse.github.io/
Installed mtpfs dependencies via:
brew install libid3tag
brew install libmad
brew install libmtp
After ./configure
and make
I get these errors:
In file included from ./mtpfs.h:13:
In file included from /usr/local/include/osxfuse/fuse/fuse.h:31:
/usr/local/include/osxfuse/fuse/fuse_common.h:555:8: error: On Darwin API version 25 or greater must be used
# error On Darwin API version 25 or greater must be used
^
In file included from mtpfs.c:9:
./mtpfs.h:20:10: fatal error: 'sys/statfs.h' file not found
#include <sys/statfs.h>
^
2 errors generated.
I connected in the past using file managers to mtp device, but now I want to perform some sync accross folder, so I need a regular filesystem access
the device is correctly working with pcmanfm-qt, with libmtp support
but when I try with mtpfs I only get the following:
mtpfs media/mtp/
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 2, dev 7
Attempting to connect device
Android device detected, assigning default bug flags
nothing is outputed when ls media/mtp
I can´t find how to have more debug information
thanks and regards
This is what happens:
root@bobby:/media# mtpfs /media/SAMSUNG_Galaxy3/
Unable to open ~/.mtpz-data for reading, MTPZ disabled.
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 6
Attempting to connect device
ignoring libusb_claim_interface() = -6PTP_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
I have a Fairphone 3, running vanilla Android 10. I tried to mount it on my gentoo system. USB debugging is enabled. I followed the usage instructions here: https://wiki.gentoo.org/wiki/MTPfs
$ mtpfs ~/AndroidDevice/
Listing raw device(s)
Device 0 (VID=18d1 and PID=4ee2) is a Google Inc Nexus/Pixel (MTP+ADB).
Found 1 device(s):
Google Inc: Nexus/Pixel (MTP+ADB) (18d1:4ee2) @ bus 2, dev 32
Attempting to connect device
Android device detected, assigning default bug flags
Listing File Information on Device with name: (NULL)
All the directories appear, but most are blank:
$ ls ~/AndroidDevice/Internal\ shared\ storage/
Alarms Android DCIM Download Movies Music Musicolet Notifications Pictures Podcasts Ringtones TWRP WhatsApp
daniel@gentoo:~
$ ls ~/AndroidDevice/Internal\ shared\ storage/DCIM/Camera/
# no output, but there are definitely files here
$ ls ~/AndroidDevice/Internal\ shared\ storage/Download/
0f63f9_7876b8c5d43d4713a46fb3d5bb853e64.pdf freeculture.pdf
'1178993 (1).jpg' 1178993.jpg
Camera
daniel@gentoo:~
$ ls ~/AndroidDevice/Internal\ shared\ storage/Download/Camera/
# again, no output, despite files existing on the device
Hello,
I cannot install mtpfs on my Debian Jessie.
Is it compatible?
When trying to mount with mtpfs
, I get:
time sudo mtpfs -o allow_other mtp
Listing raw device(s)
Device 0 (VID=12d1 and PID=1082) is a Huawei Ascend P8 .
Found 1 device(s):
Huawei: Ascend P8 (12d1:1082) @ bus 3, dev 63
Attempting to connect device
Android device detected, assigning default bug flags
Listing File Information on Device with name: (NULL)
real 0m13.330s
user 0m0.144s
sys 0m0.164s
ls mtp
ls: cannot access 'mtp': Transport endpoint is not connected
But when I try with go-mtpfs
, it works without problems:
sudo fusermount -u mtp
go-mtpfs mtp &
2016/08/28 15:15:53 FUSE mounted
ls mtp
Internal storage SD card
mtp-getfile
also does work:
time mtp-getfile 3158 IMG_20160826_093251.jpg
libmtp version: 1.1.12
Device 0 (VID=12d1 and PID=1082) is a Huawei Ascend P8 .
Android device detected, assigning default bug flags
Getting file/track 3158 to local file IMG_20160826_093251.jpg
Progress: 3246016 of 3246016 (100%)
real 0m11.193s
user 0m0.300s
sys 0m0.364s
as root on freebsd-10.1 (in VirtualBox eg not usb 2.0)
mtpfs /mnt
Listing raw device(s)
Device 0 (VID=0fce and PID=0170) is a SONY ST21i Xperia Tipo MTP.
Found 1 device(s):
SONY: ST21i Xperia Tipo MTP (0fce:0170) @ bus 0, dev 2
Attempting to connect device
Android device detected, assigning default bug flags
Listing File Information on Device with name: (NULL)
dmeg (exited on signal 6 (core dumped))
#0 0x00000008025b16ca in thr_kill () from /lib/libc.so.7
#1 0x0000000802686149 in abort () from /lib/libc.so.7
#2 0x000000080139fa80 in g_thread_abort (status=1, function=0x8013fdaed "pthread_mutex_unlock") at gthread-posix.c:80
#3 0x000000080139faba in g_mutex_unlock (mutex=0x80401e7c0) at gthread-posix.c:236
#4 0x000000000040567a in mtpfs_getattr (path=0x80401ec00 "/", stbuf=0x7fffffbfdbf8) at mtpfs.c:919
#5 0x000000080082e475 in fuse_fs_getattr (fs=0x804096300, path=0x80401ec00 "/", buf=0x7fffffbfdbf8) at fuse.c:1596
#6 0x0000000800834b9f in fuse_lib_getattr (req=0x80404e400, ino=1, fi=0x0) at fuse.c:2734
#7 0x000000080083fd94 in do_getattr (req=0x80404e400, nodeid=1, inarg=0x8040eb028) at fuse_lowlevel.c:1044
#8 0x000000080083f3a5 in fuse_ll_process_buf (data=0x804064600, buf=0x7fffffbfdf58, ch=0x804016300) at fuse_lowlevel.c:2441
#9 0x00000008008444a0 in fuse_session_process_buf (se=0x8040632e0, buf=0x7fffffbfdf58, ch=0x804016300) at fuse_session.c:87
#10 0x000000080083c063 in fuse_do_work (data=0x804017cd0) at fuse_loop_mt.c:117
#11 0x00000008023284f5 in pthread_create () from /lib/libthr.so.3
#12 0x0000000000000000 in ?? ()
Mounting appears to succeed, but as soon as I try listing the mountpoint, this happens:
Listing raw device(s)
Device 0 (VID=22b8 and PID=2e76) is a Motorola Moto G (ID1).
Found 1 device(s):
Motorola: Moto G (ID1) (22b8:2e76) @ bus 1, dev 17
Attempting to connect device
Android device detected, assigning default bug flags
Listing File Information on Device with name: (NULL)
FUSE library version: 2.9.9
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 2, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0
INIT: 7.31
flags=0x03fffffb
max_readahead=0x00020000
INIT: 7.19
flags=0x00000010
max_readahead=0x00020000
max_write=0x00020000
max_background=0
congestion_threshold=0
unique: 2, success, outsize: 40
unique: 4, opcode: ACCESS (34), nodeid: 1, insize: 48, pid: 343884
unique: 4, error: -38 (Function not implemented), outsize: 16
unique: 6, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 343891
getattr /
Attempt to unlock mutex that was not locked
fish: “mtpfs -d droid” terminated by signal SIGABRT (Abort)
(This is with -d.)
package versions:
mtpfs 1.1-4
libmtp 1.1.17-1
glib2 2.64.5-1
libid3tag 0.15.1b-11
fuse2 2.9.9-4
libmad 0.15.1b-9
os: archlinux
The device is a Moto G4 (athene), but that should be irrelevant since it works fine on thunar with vgfs-mtp.
Got an unknown device with a request to report this to this project. It's a Boox Onyx NovaPro e-ink tablet running (at the latest) Android 6.0.1. Appears to perhaps have read-only access to the file system (directory tree appears visible), but apparently all write operations silently fail as the user and fail with a permission denied error as root.
I am trying to transfer files from a Nokia 3.1. Using the libmtp example mtp-filetree I am able to see photos on the telephone, I have a similar experience in Windows Explorer. Using mtpfs I am not able to see any files within the photo folders.
There is a single file in the wifi root, which I am able to see. I have attached the debug output.
I have tried libmtp-git, with mtpfs-git.
Using mtp-getfile I am able to transfer it:
mtp-files | grep -B 1 mp4
File ID: 393
Filename: VID_20200405_193618.mp4
mtp-getfile 393 VID_20200405_193618.mp4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.