38

So some smartphones are mounted as.. I don't even know how to call it.. a device, see the screenshot below. The problem is this is no drive, so I can't go there in cmd (can I?) and do other stuff.

(particularly now I'd like to recover some files that were lost when I cut them on the smartphone, navigated to another folder on my PC and pasted there; I encounter this bug for the second time, although failed to make it reproducible; again, Recuva doesn't recognize the device, see the second screenshot)

My question is: can I mount such device as a drive? What is this situation and why some devices are mounted as drives while others are not?

(I've tried also to enable USB-debugging mode on the smartphone, but that didn't help, although when enabled, safe ejection is required)

enter image description here

enter image description here

PS for those interested, currently I use WebDAV server app for some operations like OscarAkaElvis suggested, but for now, it has the following drawbacks:

  • drive letter mapping is to be done per WiFi network. That's a Windows problem, not sure if this can be simplified
  • namely WebDAV server doesn't work for me in the password-protected mode
  • some operations are slow: for instance, calling tree in cmd with output to a file for several tens of folders and 1.5K files tree took ~10 minutes

PPS for certain purposes like autobackuping, syncing via SyncThing is a good substitution of mounting.

YakovL
  • 759
  • 1
  • 7
  • 25
  • these days, for various needs, I find useful to sync parts of my Android filesystem with SyncThing. This way, I can do many operations with files on PC and get them synced with Android – YakovL Jan 20 '22 at 08:15
  • webdav is an outdated pos that only updates itself to ensure its ads still work; wouldn't use it even if paid to do so---save yourself the grief and use an ftp server like wsftp or the like. If you HAVE to have a drive letter you will want to install WFS on it somehow, there are some out there--unfortunately you'll probably have to pay for them, but at least they will work. The alternative is to use a linux machine to piggyback the ftpfs and then share it via samba then windows will mount it as a drive--might be slow depending on hardware. Not to mention, it requires a whole other machine... – osirisgothra Aug 12 '22 at 14:18
  • but can syncThing use a USB cable ? @YakovL – Berry Tsakala Apr 13 '23 at 21:25
  • @BerryTsakala I'm almost certain that it can't as a USB cable doesn't create any kind of http network. If you want to create a connection without any 3d party networks, you may want to consider creating a direct WiFi connection (search, for instance, windows hotspot or `netsh wlan start hostednetwork`). – YakovL Apr 14 '23 at 14:25

4 Answers4

14

Historically Android phones did support two major protocols when presenting themselves to USB hosts: (1) Mass storage class (MSC), and (2) MTP/PTP device (media transfer protocol, with camera capabilities). The USB mode was user-selectable in the settings menu. Since the Mass Storage provides almost direct access to phone file directories (as from CMD), there were many cases of phone bricking (corruption). As a result, newer phones do not offer the MSC configuration mode, only MTP/PTP. So the answer to your question is "you can't", unless your particular Android phone does have the MSC/MTP switch.

Here is some answer from Photography stackexchange.

pfabri
  • 113
  • 5
Ale..chenski
  • 12,414
  • 4
  • 35
  • 46
  • 2
    the main reason newer versions of Android don't allow direct mounting of the SD card anymore is because when mount to Windows it must be unmounted from android first, making it impossible to use data on SD card – phuclv Jun 07 '17 at 12:24
  • 2
    I don't care if it's direct mounted, I just need to be able to access the files from software I write... I know how to do that if the path is under a drive letter, but how do I do it if it's e.g. "This PC > Device Name"? I tried "\\This PC\Device Name" and "\\Device Name" and neither is recognized. – Michael Sep 24 '22 at 02:55
11

If you want to have a drive with letter you should install some software. Look at this

I guess you know how to perform single copy operations on files in windows but I'll detail the process for you just in case:

After plugin it, usually it needs another interaction more to be done in phone's side. You can drop down the push events and select there to mount your phone as a drive (MTP/PTP), you can select also only to charge power on phone.

It depends of your android version. Here are a couple of images of what I'm talking about:

Android1

Android2

OscarAkaElvis
  • 575
  • 1
  • 3
  • 16
  • I edited my answer to put an useful link to map a drive as a "network drive". Check it out. – OscarAkaElvis Dec 18 '16 at 03:01
  • Well, I have MTP enabled already and using PTP doesn't help much. Thanks for the link, I've seen that already, but for the recovery purpose I don't want to install anything new to the device as that will be new writing to FS which may hurt the cut files. Besides, I don't think WebDAV will allow me low-level recovery operations.. (but I will explore that possibility later) – YakovL Dec 18 '16 at 03:04
  • What is your android version? which mobile model? here is something for samsung involving software [samsung kies](http://trendblog.net/android-file-transfer-not-working/) – OscarAkaElvis Dec 18 '16 at 03:10
  • Uh... the link is for wireless transfer and has nothing to do with USB – Michael Sep 24 '22 at 02:59
6

Install a webdav server on your 'phone. The webdav server delivers the data in a given storage partition on your phone to a specific TCP/IP address. On your Windows PC you can then open this IP Address and link a drive letter to it.

OP: https://forums.androidcentral.com/samsung-galaxy-s3/210019-how-can-i-get-drive-letter-windows.html#post2172515

It should be noted that file system options will be limited because any supported file system options must be supported by all the interacting systems.

Jim Fell
  • 5,836
  • 16
  • 55
  • 76
  • 1
    I installed [WebDav Server](https://play.google.com/store/apps/details?id=com.theolivetree.webdavserver&hl=en_US) and then ran `net use * \\192.168.1.2:8080` and I can now browse my phone's root folder as drive Z:, and my phone's SD card via Z:\sdcard. – Ross Smith II Aug 04 '18 at 19:34
  • you need to add http:\\ in front of webdav server urls in windows (This PC > View menus at top > Map network drive, or any other webdav server apps, i use the app "Ultimate Servers (pro version, also has free)" with it's webdav server plugin. so on Windows map network drive from webdav server need: http:\\192.168.1.2:8080 or if using Ultimate Server http:\\192.168.1.2:8484 – washere Oct 01 '19 at 00:31
2

Use FAR Manager and install the PortaDev plugin into it. Then you'll see the storages from the phone as drives in FAR Manager, even if they still don't have drive letters.

Dan Simiha
  • 29
  • 1
  • have you tested it with Android devices? Does this help to access the storage via cmd? – YakovL Nov 26 '19 at 09:47
  • I tested it, yes it helps. Latest version here: https://sourceforge.net/projects/farplugs/files/PortaDev/ – Rufat Nov 02 '21 at 06:09
  • There's also a similar solution in Total Commander (via plugin), but it doesn't answer the question; It doesn't give a Windows drive letter, and therefore can't automate it easily – Berry Tsakala Apr 13 '23 at 21:28