Tuesday, January 17, 2017

wi fi - Using SMB server without root access


I'm looking for a way for my HTC Hero (Android 2.1) so I can share the contents of my SD card and phone memory over the WiFi network like a regular Windows file share. I'd like one that does not require me to root my phone, and am willing to pay for the right app so it doesn't have to be free.


I'm thinking of using SMB server and all I've found so far are:



  1. SambaAndroid which requires root access.

  2. androidsmb which is a "Java implementation of the SMB/CIFS network file and printer share server for Android devices" hosted on Google Code that has no documentation and has not released any files.


Is it even technically possible to develop an SMB Server on Android that can be installed without root access?




Answer



As your original question still isn't answered and I wondered the same, here's the answer.


Short answer: No, without root it's not possible to run an SMB server using the default ports so that it's found by Windows PCs.


Long answer: 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. Why is this important? Apps not running as root can't bind to unprivileged ports (<1024). It's possible to use alternative ports for SMB but Windows is hard-wired to just listen to the default ones. So I guess if you use Linux or a separate SMB client for Windows which allows to connect to a server with a custom port number it's probably possible. But it's not really a straight-forward way.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...