5

On an unrooted Samsung phone, how can I access and modify the files on both /sdcard/ (internal storage) and the actual SD card, from my computer, as real folders and files (not PTP/MTP/etc which don't allow you to do anything)? I don't care if it's over a physical cable or wireless, etc.

I need to be able to delete files, move them from one folder to another, including from internal storage to sd card and vice versa, view their properties, measure disk usage, compare files, etc. All the things I can do from a normal folder on my hard drive.

I've tried FTP server, SFTP server, etc. and nothing has ever worked.

The best solution I have so far is to take the SD card out of the phone, plug it into a card reader, and plug it into my computer, then run Servers Ultimate on the phone to share the internal storage over FTP, and mount that on my computer using NetDrive2.

2
  • 1
    Possible duplicate of this (with an great 3 method writeup): android.stackexchange.com/questions/91900/…
    – trishmapow
    Commented Jan 11, 2019 at 8:56
  • @trishmapow That's a good answer. I have no problem with wireless solutions, though, unlike that question. My highest priority is the ability to access the files as if they're on a local drive, so I can move them around, back them up, do duplicate file checking using software that only works on local files, etc.
    – endolith
    Commented Jan 11, 2019 at 14:41

1 Answer 1

2

You can use Samba server to achieve that, and for that purpose I'd recommend LAN Drive and it works without root and it supports SMB1 (CIFS) and SMB2 protocols.

In this way, the device acts as a network drive where you can manipulate files/folders (copy/paste/move/delete etc) as if there were on local drive. However a little well known obstacle is that Windows can access a samba share only on TCP port 445, and on a non-rooted android a normal application can't listen on port 445.

As mentioned already in this post: Using SMB server without root access,

SMB either runs on ports 137-139 (UDP and TCP) using NetBIOS or on newer systems (from Windows Vista onwards) directly on TCP port 445 where in the latter case computer names are resolved by the LLMNR (Link-local Multicast Name Resolution) protocol which runs on UDP port > 5355

.

Thus apps not running as root can't bind to unprivileged ports (<1024). This is possible, nevertheless using TCP Port mapping. You need to install a port mapping software.

Instructions

  1. Install the port forwarder - Multi Port Forwarder (the suggested one in App's tutorial)
  2. Configure the port forwarder:
  • The rules we will implement :

  • Rewrite outgoing TCP packets to ip-phone:445 become ip-phone:1445

  • Cloning outgoing UDP packets to any:137 become any:1137
  • Cloning outgoing UDP packets to any:138 become any:1138 Note: We clone the UDP

packets to not break the actual network discovery.

  1. Add TCP, UDP rules and save

enter image description here

  1. Change the ports in the LAN drive settings, click the Save button and Start the server:

enter image description here

  1. Go back to Explorer in the network places (Windows), and access LAN drive

enter image description here

Disclaimer: I'm not affiliated with LAN Drive software

Acknowledgements

LAN drive - Samba Filesharing Server SMB1 and SMB2

1
  • Servers like SMB/CIFS running without root can only share (read/write) the internal sdcard section. The external/removable sdcard is read-only on devices Android 6+.
    – Robert
    Commented Aug 29, 2019 at 8:00

You must log in to answer this question.

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