6

How can I mount a smartphone internal storage in Ubuntu in a way that I could run photorec on it to recover several documents. Photorec does not detect the Smartphone (External or Internal storage) and it will only show the ones that are in /dev/.

When I connect the smartphone it shows the following:

[Thu Apr 10 15:38:32 2014] usb 3-13: new high-speed USB device number 9 using xhci_hcd
[Thu Apr 10 15:38:33 2014] usb 3-13: New USB device found, idVendor=04e8, idProduct=6860
[Thu Apr 10 15:38:33 2014] usb 3-13: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[Thu Apr 10 15:38:33 2014] usb 3-13: Product: SAMSUNG_Android
[Thu Apr 10 15:38:33 2014] usb 3-13: Manufacturer: SAMSUNG
[Thu Apr 10 15:38:33 2014] usb 3-13: SerialNumber: 4d10e317e3f070a9
[Thu Apr 10 15:38:33 2014] cdc_acm 3-13:1.1: This device cannot do calls on its own. It is not a modem.
[Thu Apr 10 15:38:33 2014] cdc_acm 3-13:1.1: ttyACM0: USB ACM device

When I run mount it does not appeared anywhere mounted but I can see both External and Internal storage medias

0

3 Answers 3

8

MTP mode wont work. It's an abstracted filesystem meaning Photorec (et al) don't have direct access. According to the Photorec website, you'll need to throw the phone into Mass Storage mode. Once you've done that, it should see the drive correctly.

I'm not sure what sort of recovery you're doing here. If the screen is broken and you're stuck in MTP mode, you might still be able to do a recovery, using adb and dd to create a raw image of the affected partition. Move that over to Ubuntu, mount it and recover.

If you have neither access to the screen or root, you're fighting a much, much tougher battle. For what it's worth, I've been in that exact spot before and it's not good. All I can say is thank Google and Facebook for the various privacy-invading cloud syncs :) They have saved my behind a couple of times now.

3
  • Gah, out of upvotes. I'm going to have to start a list of things to vote for.
    – Seth
    Apr 10, 2014 at 22:34
  • Accepted the answer because THE MAN HAS SPOKEN. I we who serve do not doubt the word of.... THE MAN!. Thanks for the links pretty sure that should solve it. In my case it is the S4 GT-9500 which does not have the Mass Storage option, only PTP and MTP. So I need to do the dd as suggested. Apr 10, 2014 at 22:37
  • 1
    I think it might. You need to enable USB debugging as part of the process. It seems to be ridiculously complicated on the S4 but it's possible AFAICS.
    – Oli
    Apr 10, 2014 at 22:39
0

It's very slow access, but I have successfully been able to use jmtpfs, you can install it with:

sudo apt install jmtpfs

Then:

mkdir /tmp/mount_point
jmtpfs /tmp/mount_point

I am unable, for example, to play a movie file directly through it, I have to copy it first, but it's fine for browsing.

1
  • I got this error: Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP). ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface LIBMTP libusb: Attempt to reset device ignoring libusb_claim_interface() = -6LIBMTP PANIC: failed to open session on second attempt terminate called after throwing an instance of 'MtpErrorCantOpenDevice' what(): Can't open device Aborted (core dumped) Any clue?
    – SaTa
    Apr 7, 2019 at 19:50
0

If you have ~2MB free on your phone device, you might prefer to go for a device scanner app such as DiskUsage. You should be prepared to upload the pictures to a cloud, you have link to on your device, e.g. Ubuntu One, DropBox, GoogleDisk, etc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .