Include your device in libmtp source code
You can try to include your device in the libmtp source code and build libmtp from source.
Install mtp-tools and optionally the checkinstall package:
sudo apt-get install mtp-tools libusb-dev checkinstall
sudo mtp-detect
Take note to VID and PID numbers, example:
Download the latest libmtp source from the project site. At the time of writing the version was 1.1.6, so this is would be an example:
wget http://downloads.sorceforge.net/project/libmtp/1.1.6/libmtp-1.1.6.tar.gz
tar xvf libmtp-1.1.6.tar.gz
cd libmtp-1.1.6
Add an entry to your in device in the source:
gedit src/music-players.h
Example:
{ "Motorola", 0x22b8, "Moto G (XT1032)", 0x2e82, DEVICE_FLAGS_ANDROID_BUGS }
Note, pay attention to the trailing commas (,
) in the file like this:
[...]
{ "Motorola", 0x22b8, "Moto X (XT1058)", 0x2e63,
DEVICE_FLAGS_ANDROID_BUGS },
{ "Motorola", 0x22b8, "Moto G (XT1032)", 0x2e82,
DEVICE_FLAGS_ANDROID_BUGS },
{ "Motorola", 0x22b8, "Droid Maxx (XT1080)", 0x2e67,
DEVICE_FLAGS_ANDROID_BUGS },
[...]
Now configure, build and install (checkinstall
is recommended over make install
) the patched version:
./configure
make
sudo checkinstall
Reboot and thats it.
I too had the problem that my "asus padfone infinity" was not mounted through mtp. (adb worked though).
Solution was to connect it through one of the USB3 Ports of my thinkpad instead of a usb2 port. Looks like the USB2 port is not recognized as usb2, or are devicenames for usb2 "usb1"?
syslog when connecting to USB2 Port:
Feb 21 13:59:55 t530 kernel: [39597.968522] usb-storage 1-1.2:1.2: USB Mass Storage device detected
Feb 21 13:59:55 t530 kernel: [39597.968634] scsi16 : usb-storage 1-1.2:1.2
Feb 21 13:59:55 t530 mtp-probe: checking bus 1, device 7: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2"
Feb 21 13:59:55 t530 mtp-probe: bus: 1, device: 7 was not an MTP device
Feb 21 13:59:56 t530 kernel: [39598.966743] scsi 16:0:0:0: CD-ROM ASUS Device CD-ROM 0000 PQ: 0 ANSI: 2
Feb 21 13:59:56 t530 kernel: [39598.971140] sr1: scsi-1 drive
Feb 21 13:59:56 t530 kernel: [39598.971427] sr 16:0:0:0: Attached scsi CD-ROM sr1
Feb 21 13:59:56 t530 kernel: [39598.971580] sr 16:0:0:0: Attached scsi generic sg3 type 5
Feb 21 14:01:02 t530 kernel: [39665.530135] usb 1-1.2: USB disconnect, device number 7
Connecting to usb 3.0 port:
Feb 21 14:01:06 t530 kernel: [39669.292066] usb-storage 3-1:1.2: USB Mass Storage device detected
Feb 21 14:01:06 t530 kernel: [39669.292231] scsi17 : usb-storage 3-1:1.2
Feb 21 14:01:06 t530 mtp-probe: checking bus 3, device 2: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-1"
Feb 21 14:01:06 t530 mtp-probe: bus: 3, device: 2 was an MTP device
Best Answer
I don't know which mtp device you have but I have been able to recover files using photorec (part of the package testdisk) where scapel (outdated) and foremost (also outdated) were not able to. I also recommend setting the mtp device to mass storage so photorec can read it as mentioned here How to mount Smartphone to recover files