I was referred here from android.stackexchange.com.

I wish to mount my Sony Xperia ST21i (Android 4.0.4) under Linux (Debian) via USB. However, I get this error:

# mount /dev/sdb /mnt
mount: no medium found on /dev/sdb

For more context see https://android.stackexchange.com/questions/52932/linux-fails-to-mount-android-device-in-usb-msc-mode.

Is this more an Android or a Linux issue?

  • 1
    From your log messages, it seems Linux sees a drive, but there is no disk inserted. Do you actually have a microSD card in your phone? – derobert Sep 10 '13 at 16:42
  • This could be the clue. No, I do not have a microSD card. Seems my photos are stored in the phone itself. No way to access the phone's own memory via USB mount? – Joachim W Sep 10 '13 at 17:46
  • 1
    You need to use PTP or MTP for accessing the phone's internal memory. Or adb. Or a network file share (via an app, for example). MTP does work on Linux. Maybe you want to ask a question about getting it to (assuming we don't already have one). – derobert Sep 10 '13 at 17:49
  • Ok. I'm going to post an answer based on my comments, then. – derobert Sep 10 '13 at 18:20

USB mass storage mode is only for accessing the microSD card. Linux is reporting that there is no medium because you don't have a card inserted in the phone.

Mass storage mode provides exclusive access to the card, and it provides that access on a raw device level, below even the filesystem. You're using Linux's implementation of vfat, not the phone's. You can't access the card at all from the phone while the computer is; doing so would result in filesystem corruption. That's why you can't access the internal memory this way—Android can't give exclusive access to the internal memory, as it needs to access it.

In order to access the phone's internal memory, you need to use MTP or PTP mode. In this mode, the computer accesses the phone at a file level—the phone OS says "here is a list of files on the device" and the computer says "give me file x". You can use both of these on Linux; and it actually works with a recent-enough version of libmtp.

Your final alternative is to use some app (or the command line on the phone) to export the files over the network. You could run Samba on the phone, or an NFS server, or a web server. Or for pictures, the DLNA stack. Best done over WiFi. (Except for using the command line, this is probably a question for android.SE—but I bet they already have it.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.