[Android General] Qui Peccavit:
Android Phones as USB Mass Storage Devices with a Drive Letter

.​

ANDROID DATA EXCHANGE

The Phone as a USB Mass Storage Device with a Drive Letter​

In their unholy alliance to bully and subdue their customers, manufacturers and network operators have for some time replaced the former status of mobile phones as USB mass storage with the limited and inadequate Media Transfer Protocol (MTP). This makes many operations much more difficult, cumbersome or simply impossible for device owners, from synchronized backup or data recovery to simply interchanging non-media files between phone and computer.

Users who are fed up with the arrogance and impertinence with which large corporations feel entitled to decide what customers are or not allowed to do with their property, currently have two options to restore the mobile phone's functionality as an external hard drive or a USB Stick ― at least until these workarounds get blocked by the companies for purposes of profit maximization and data grabbing, too.

Be aware that phone manufacturers and telephone service providers have a tendency to take away ever more possible actions and options from the owners of mobile phones with every new hard- and software version, and that the most capable, efficient and versatile apps are often removed from the Play Store for that reason. HUAWEI, SAMSUNG SONY et al and of course, data kraken GOOGLE know what's best for you and there is no need for apps that give you more options than they deem necessary. When you read this, they may very well have removed the possibility to mount a phone's internal storage, only the microSD card, and apps that offer more may have disappeared from the Play Store altogether. My apologies, but other than sending manufacturers pre-sales enquiries about root-friendliness with OTA updates and related topics, basing one's purchasing decision on the brand accepting that it's the owner who should have the final say, the big brothers are going to continue watching and dictating how we may use our property as they please.

A brief preparatory look at Android's File System Structure cannot hurt, and then we jump into medias res.

Mount Android as a mapped Network Drive​

The first approach to get back a drive letter for cellphones consists in mapping them as a network drive via a trustworthy wireless network. You do not want to do this at a public hotspot, airport or Internet café, but your wireless router at home ― provided you secured it adequately with a long, complicated non-default password and a whitelist of allowed devices ― should be fine.

A brief word on Local Area Networks (LAN): local/private IP address ranges are typically 192.168.0.0 – 192.168.255.255 (16 bit block => 65,536 addresses), 172.16.0.0 – 172.31.255.255 (20 bit block => 1,048,576 addresses) or 10.0.0.0 – 10.255.255.255 (24 bit block => 16,777,216 addresses). The IP address of your phone will be in the same range as the one of your router and PC, assigned to it automatically via the Dynamic Host Configuration Protocol (DHCP). There are certain programs, however, that require a static IP address for port forwarding et al (P2P, messengers, ...), so you might want to configure such, both on the phone when connecting to your home network and on your router.

To specify a static IP address on Android, navigate to Settings | Connections | Wi-Fi | Current Network. Select your home network, scroll down to Advanced and under IP Settings, switch from DHCP to Static and then enter the same static IP address that you assigned to the phone on the router. It must be the same address on both or you will no longer get a connection, but if you mistype, you can always go back to correct the digits or switch back to a dynamic IP (DHCP). While you are configuring the router settings, take the time to verify its security relevant settings, too.

Windows needs the «WebClient» service to use WebDAV. Navigate to Control Panel | Services by holding [Windows]+[R] and entering Services.msc. Launch the «WebClient» service and set it to start automatically.

Now it's time to map the phone as a network drive, in order to obtain a drive letter for it on the computer: the basic principle consists in starting a WebDAV server app on the mobile phone and getting its IP address on the local Wi-Fi network. The connection must be started by tapping the respective button, it is not established automatically upon opening the WebDAV app. The IP address will be in one of the ranges listed above, for example http:\\172.30.0.7:8080. The first four numbers with dots in between constitute the IP address, the four digits after the colon are the port that the connection 'runs through'.

When using an FTP server, the link could also be presented in the format ftp://username:password@ip1.ip2.ip3.ip4:port/folderpath, for example ftp://JohnDoe:Abc987Def654@172.30.0.7:8080/microSD/images

Obviously, the username, password, IP address, port and path need to be adapted to your personal details and setup.

Open a command window in Windows ([Windows]+[R], CMD) and ping the IP address, entering Ping 172.30.0.7, for instance. If the computer cannot 'see' the phone, follow the previous guide above until it does. Then you can enter Net use \\172.30.0.7:8080.

Now in File Explorer or Windows Explorer on the PC, in the menu bar above the address field, click on the [Computer] tab and then on the [Map Network Drive] button there. Everyone's computer/software is configured differently these days, or you may be using an alternative file management software, but somewhere among the menu entries or settings, there should be one that allows to map or mount a drive on the network. The settings we are configuring here are valid system-wide for Windows, so in case you cannot find the option in the software you use, map the drive in Windows' own File Explorer, it should then appear in your alternative file manager, too. O.k., click the [Map Network Drive] button, choose a drive letter for the phone, enter the address provided by its WebDAV app into the [Folder] field (eg. \\172.30.0.7:8080, with \\ backslashes instead of http://) and click [Finish]. Depending on your version of Windows, file manager, separate fields for IP address and port, whathaveyou, the format in which the WebDAV IP address must be entered can vary: if \\172.30.0.7:8080 does not do the trick, try http\\172.30.0.7:8080 (no colon, back- instead of forward slashes). If that does not work either, add the colon or write the address in standard web format with forward flashes, depending on the particular software that you are using.

If problems persist, hold [Windows]+[R] on the PC and enter RegEdit. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters -- "BasicAuthLevel"=dword:00000002, i.e. modify the value of the BasicAuthLevel key to a value of 2.

Most WebDAV servers allow to change the default port and specify a password for enhanced security; do so while the drive is mounted in Windows and make sure to have granted the necessary permissions in the firewall programs on both devices and the Wi-Fi router. If you feel uneasy about exposing too much of your data over a Wi-Fi connection, it is possible to only mount a particular subdirectory on the microSD card. Some apps offer to use the cellphone data connection, allowing to access the information even while on a different network, but make sure not to exceed your data plan.

There are too many WebDAV apps and file explorers for Android and Windows to provide the exact navigation path through the menus and settings of each of them, but the basic principle remains the same, and now that you know what to look for, you should be able to figure it out. If you are using Total Commander, this guide still seems to work. Keep in mind that not all programs are created equal: if you simply cannot seem to get it done in one app, install another one that might work better. Which one that is can vary from version to version, because sometimes, updates fix problems whereas other times, they break more than they repair. Nevertheless, there are sufficient alternatives out there to eventually find one that suits your needs.

A shortlist of WebDAV servers that might make separating the wheat from the chaff a little easier, in alphabetical order:

BestDAV Pro

DavDrive

DAVx⁵ DAVdroid

ownCloud

Servers Ultimate Pro

WebDAV Navigator

WebDAV Server Pro

WebDAV Server Ultimate Pro

File managers with integrated FTP or WebDAV functionality:

Cx File Explorer

File Manager

File Manager - Local and Cloud File Explorer

FX File Explorer

Ghost Commander File Manager

Solid Explorer File Manager

Total Commander + USB Plugin

USB Media Explorer by Homesoft

WiFi File Explorer Pro

Software for Windows PCs

Air Droid

DriveDroid

Net Drive

Wondershare TunesGo

With a little luck, anybody should be able to find a combination of software tools that allows them to transfer files between their mobile device and their computer.

MTP Driver to re-establish USB Mass Storage Support​

Since USB Share has been deprecated, there do not seem to be any apps left in the Play Store that try to bring back USB Mass Storage functionality to mobile phones.

There is, however, a company called Cranking Pixels that develops a Media Transfer Protocol (MTP) driver for Microsoft Windows. The software is called MTPdrive and permits devices operating in MTP mode to be mapped to a drive letter under Microsoft Windows, thereby appearing like an external hard disk or USB stick in file explorer programs.

While not completely the same as the genuine USB Mass Storage mode that could be found on earlier Andoid versions, MTPdrive seems to currently be the only solution that comes close. At least the driver makes file operations much less of a chicanery than what manufacturers and network operators impose on their customers in terms of lack of functionality and inconvenience, and it works for direct connections via USB cables without the need to mount and map a network drive.

New Technology File System (NTFS) for Android​

Unfortunately, many low- or mid-level Android phones do not natively support the New Technology File System (NTFS), which is the most popular file system among Android and Windows users. In order to be able to explore a PC's or an NTFS-formatted external hard disk's file structure from the phone, some USB drivers for Android may need to be installed. Possible candidates are ...

• A patched SDCardFS.ko by munjeni.

• ADB Driver for Android by APK Installer.

• Microsoft exFAT/NTFS for USB (also HFS+) by Paragon.

• USB Media Explorer by Homesoft.

• USB Stick Plugin for Total Commander by Ferenc Hechler.

It is a shame that Android is not HFS+ and NTFS compatible out of the box on all phones and OS versions, but with the drivers listed above, connecting On-the-Go (OTG) and other USB storage media that come formatted with those file systems should be less of a headache.

.