4

After initially not recognising MTP at all (here) I have an issue with both my Nexus 5 and my new Nexus 5x whereby some - but not all - DCIM (camera) and Music folder content shows up in Thunar. I can see the discrepancy on the phone itself or via AirDroid

Thunar view of MTP connected phone on left, AirDroid view of same on right:

Thunar view of MTP connected phone AirDroid view of MTP connected phone

As far as I recall, all files were added using AirDroid, but at different times. The same happens with camera images. Possibly-helpfully, <=5 day old pictures were listed in Thunar, >=6 day old pictures weren't. Photos taken on same phone in same timezone with no other obvious changes. This is NOT true for the music: Elephant (White Stripes; present in Thunar) was added most recently but before that was Deep House (absent Thunar) and before that The National (present Thunar). No obvious pattern to the present/absent folders.

Any thoughts much appreciated.

Edit: versions of stuff: xubuntu 15.10 Thunar 1.6.10

dez93_2000
  • 1,241

1 Answers1

1

According to go-mtpfs

Go-mtpfs is a simple FUSE filesystem for mounting Android devices as a MTP device.

It will expose all storage areas of a device in the mount, and only reads file metadata as needed, making it mount quickly. It uses Android extensions to read/write partial data, so manipulating large files requires no extra space in /tmp.

It has been tested on various flagship devices (Galaxy Nexus, Xoom, Nexus 7). As of Jan. 2013, it uses a pure Go implementation of MTP, which is based on libusb.

install the Go compiler suite; e.g. on Ubuntu:

sudo apt-get install golang-go
Install libmtp header files
sudo apt-get install libusb1-devel

Then run

mkdir /tmp/go
export GOPATH=/tmp/go
go get github.com/hanwen/go-mtpfs

/tmp/go/bin/go-mtpfs will then contain the program binary.

You may need some tweaking to get libusb to compile. See the comment near the top of usb/usb.go, ie.

 # edit to suit libusb installation:
 vi /tmp/go/src/github.com/hanwen/go-mtpfs/usb/usb.go
 go install github.com/hanwen/go-mtpfs

A 32 and 64-bit linux x86 binaries are at

go-mtpfs

USAGE

mkdir /tmp/go
GOPATH=/tmp/go go get github.com/hanwen/go-mtpfs
sudo mv /tmp/go/bin/go-mtpfs /usr/bin/
mkdir ~/Android

to mount device:

go-mtpfs ~/Android
GAD3R
  • 3,748