[APP][4.0.3+][NO Root] LAN drive - Samba Filesharing Server SMB1 and SMB2

Search This thread

GJS_MA

New member
Nov 30, 2021
3
0
Can you set up a share within android and have windows connect to it ? Can you verify if the date created, date modified or date accesed of folders from android are preserved when transferred or copied to windows 10 ?
When Windows 10 copies a file or folder, it sets the copy's creation date/time to when the *copy* was created. It also sets the access date/time to the same value. When copying a folder, it also sets the modification time to the same value. So really, file modification date/time is the only one which Windows 10 preserves in the copy. That is what is shown by default in listings, and is used by makefiles, file compare programs, and so on.

Below is the output of my test for copying files via LAN Drive. It shows that file mod date/time is correctly preserved when copying from Android to PC, but not when copying from PC to Android. It also appears that creation and access date/time are either not set on Android, or not retrieved by LAN Drive.

C:\Tmp\LAN Drive ++ > lan_drive_test.bat > net use W: Local name W: Remote name \\samsung-s9\sd card Resource type Disk Status OK # Opens 0 # Connections 1 The command completed successfully. --- SOURCE FILES ON PHONE: --- MODIFIED: > dir /t:w /a-d "W:\Data\Computer\LAN Drive"\landrive* | find "/" 11/09/2021 06:51 PM 3,862 landrive_backup_2021-11-09-17-49-43 11/09/2021 07:45 PM 3,979 landrive_backup_2021-11-09-18-45-09 04/21/2022 10:59 AM 4,069 landrive_backup_2022-04-21-10-59-20 CREATED: > dir /t:c /a-d "W:\Data\Computer\LAN Drive"\landrive* | find "/" 12/31/1969 08:00 PM 3,862 landrive_backup_2021-11-09-17-49-43 12/31/1969 08:00 PM 3,979 landrive_backup_2021-11-09-18-45-09 12/31/1969 08:00 PM 4,069 landrive_backup_2022-04-21-10-59-20 ACCESSED: > dir /t:a /a-d "W:\Data\Computer\LAN Drive"\landrive* | find "/" 12/31/1969 08:00 PM 3,862 landrive_backup_2021-11-09-17-49-43 12/31/1969 08:00 PM 3,979 landrive_backup_2021-11-09-18-45-09 12/31/1969 08:00 PM 4,069 landrive_backup_2022-04-21-10-59-20 --- COPY FROM PHONE TO PC: --- > xcopy /q /y "W:\Data\Computer\LAN Drive"\landrive* "C:\Tmp\LAN Drive" 3 File(s) copied MODIFIED: > dir /t:w /a-d "C:\Tmp\LAN Drive"\landrive* | find "/" 11/09/2021 06:51 PM 3,862 landrive_backup_2021-11-09-17-49-43 11/09/2021 07:45 PM 3,979 landrive_backup_2021-11-09-18-45-09 04/21/2022 10:59 AM 4,069 landrive_backup_2022-04-21-10-59-20 CREATED: > dir /t:c /a-d "C:\Tmp\LAN Drive"\landrive* | find "/" 04/21/2022 02:49 PM 3,862 landrive_backup_2021-11-09-17-49-43 04/21/2022 02:49 PM 3,979 landrive_backup_2021-11-09-18-45-09 04/21/2022 02:49 PM 4,069 landrive_backup_2022-04-21-10-59-20 ACCESSED: > dir /t:a /a-d "C:\Tmp\LAN Drive"\landrive* | find "/" 04/21/2022 02:49 PM 3,862 landrive_backup_2021-11-09-17-49-43 04/21/2022 02:49 PM 3,979 landrive_backup_2021-11-09-18-45-09 04/21/2022 02:49 PM 4,069 landrive_backup_2022-04-21-10-59-20 --- COPY FROM PC BACK TO PHONE: --- > xcopy /q /y "C:\Tmp\LAN Drive"\landrive* "W:\Data\Tmp\Lan Drive" 3 File(s) copied MODIFIED: > dir /t:w /a-d "W:\Data\Tmp\Lan Drive"\landrive* | find "/" 04/21/2022 02:49 PM 3,862 landrive_backup_2021-11-09-17-49-43 04/21/2022 02:49 PM 3,979 landrive_backup_2021-11-09-18-45-09 04/21/2022 02:49 PM 4,069 landrive_backup_2022-04-21-10-59-20 CREATED: > dir /t:c /a-d "W:\Data\Tmp\Lan Drive"\landrive* | find "/" 12/31/1969 08:00 PM 3,862 landrive_backup_2021-11-09-17-49-43 12/31/1969 08:00 PM 3,979 landrive_backup_2021-11-09-18-45-09 12/31/1969 08:00 PM 4,069 landrive_backup_2022-04-21-10-59-20 ACCESSED: > dir /t:a /a-d "W:\Data\Tmp\Lan Drive"\landrive* | find "/" 12/31/1969 08:00 PM 3,862 landrive_backup_2021-11-09-17-49-43 12/31/1969 08:00 PM 3,979 landrive_backup_2021-11-09-18-45-09 12/31/1969 08:00 PM 4,069 landrive_backup_2022-04-21-10-59-20
 
Last edited:

[email protected]

Senior Member
May 27, 2016
104
1
toronto
When Windows 10 copies a file or folder, it sets the copy's creation date/time to when the *copy* was created. It also sets the access date/time to the same value. When copying a folder, it also sets the modification time to the same value. So really, file modification date/time is the only one which Windows 10 preserves in the copy. That is what is shown by default in listings, and is used by makefiles, file compare programs, and so on.

Below is the output of my test for copying files via LAN Drive. It shows that file mod date/time is correctly preserved when copying from Android to PC, but not when copying from PC to Android. It also appears that creation and access date/time are either not set on Android, or not retrieved by LAN Drive.

C:\Tmp\LAN Drive ++ > lan_drive_test.bat > net use W: Local name W: Remote name \\samsung-s9\sd card Resource type Disk Status OK # Opens 0 # Connections 1 The command completed successfully. --- SOURCE FILES ON PHONE: --- MODIFIED: > dir /t:w /a-d "W:\Data\Computer\LAN Drive"\landrive* | find "/" 11/09/2021 06:51 PM 3,862 landrive_backup_2021-11-09-17-49-43 11/09/2021 07:45 PM 3,979 landrive_backup_2021-11-09-18-45-09 04/21/2022 10:59 AM 4,069 landrive_backup_2022-04-21-10-59-20 CREATED: > dir /t:c /a-d "W:\Data\Computer\LAN Drive"\landrive* | find "/" 12/31/1969 08:00 PM 3,862 landrive_backup_2021-11-09-17-49-43 12/31/1969 08:00 PM 3,979 landrive_backup_2021-11-09-18-45-09 12/31/1969 08:00 PM 4,069 landrive_backup_2022-04-21-10-59-20 ACCESSED: > dir /t:a /a-d "W:\Data\Computer\LAN Drive"\landrive* | find "/" 12/31/1969 08:00 PM 3,862 landrive_backup_2021-11-09-17-49-43 12/31/1969 08:00 PM 3,979 landrive_backup_2021-11-09-18-45-09 12/31/1969 08:00 PM 4,069 landrive_backup_2022-04-21-10-59-20 --- COPY FROM PHONE TO PC: --- > xcopy /q /y "W:\Data\Computer\LAN Drive"\landrive* "C:\Tmp\LAN Drive" 3 File(s) copied MODIFIED: > dir /t:w /a-d "C:\Tmp\LAN Drive"\landrive* | find "/" 11/09/2021 06:51 PM 3,862 landrive_backup_2021-11-09-17-49-43 11/09/2021 07:45 PM 3,979 landrive_backup_2021-11-09-18-45-09 04/21/2022 10:59 AM 4,069 landrive_backup_2022-04-21-10-59-20 CREATED: > dir /t:c /a-d "C:\Tmp\LAN Drive"\landrive* | find "/" 04/21/2022 02:49 PM 3,862 landrive_backup_2021-11-09-17-49-43 04/21/2022 02:49 PM 3,979 landrive_backup_2021-11-09-18-45-09 04/21/2022 02:49 PM 4,069 landrive_backup_2022-04-21-10-59-20 ACCESSED: > dir /t:a /a-d "C:\Tmp\LAN Drive"\landrive* | find "/" 04/21/2022 02:49 PM 3,862 landrive_backup_2021-11-09-17-49-43 04/21/2022 02:49 PM 3,979 landrive_backup_2021-11-09-18-45-09 04/21/2022 02:49 PM 4,069 landrive_backup_2022-04-21-10-59-20 --- COPY FROM PC BACK TO PHONE: --- > xcopy /q /y "C:\Tmp\LAN Drive"\landrive* "W:\Data\Tmp\Lan Drive" 3 File(s) copied MODIFIED: > dir /t:w /a-d "W:\Data\Tmp\Lan Drive"\landrive* | find "/" 04/21/2022 02:49 PM 3,862 landrive_backup_2021-11-09-17-49-43 04/21/2022 02:49 PM 3,979 landrive_backup_2021-11-09-18-45-09 04/21/2022 02:49 PM 4,069 landrive_backup_2022-04-21-10-59-20 CREATED: > dir /t:c /a-d "W:\Data\Tmp\Lan Drive"\landrive* | find "/" 12/31/1969 08:00 PM 3,862 landrive_backup_2021-11-09-17-49-43 12/31/1969 08:00 PM 3,979 landrive_backup_2021-11-09-18-45-09 12/31/1969 08:00 PM 4,069 landrive_backup_2022-04-21-10-59-20 ACCESSED: > dir /t:a /a-d "W:\Data\Tmp\Lan Drive"\landrive* | find "/" 12/31/1969 08:00 PM 3,862 landrive_backup_2021-11-09-17-49-43 12/31/1969 08:00 PM 3,979 landrive_backup_2021-11-09-18-45-09 12/31/1969 08:00 PM 4,069 landrive_backup_2022-04-21-10-59-20
This is indeed strange. When I right click on my android phone and use windows 10 file explorer's "import pictures and videos" I can import pictures and videos perfectly fine, although after copying, the files date created, date modified and date accessed are all using the date modified date and time from the android phone. Thus after copy, pictures and videos 3 date and time stamps are all the same.

For folders, its a different story, when using file explorer's "import pictures and videos" method, the folder's date and timestamps are all the today's date and time (current date/time of transfer).

However, from looking at the above example, which only shows for files, the date created and date accessed is shown as Dec 31, 1969 @ 8 PM which I'm assuming is a limitation for linux ?

After trying, many many different softwares, I've come across only goodsync which preserves folders date created and date modified as shown in android and even without daylight savings time complication which is also a plus. I've tried so many backup, folder replication, synchronization softwares none of them preserve the date and time accessed for some reason except for windows 10 explorer's import feature as strange as it works its almost magical in it's own way.

I've spent way too much time on this problem, so I've resorted to importing all pictures and videos via windows 10 explorer import feature and then using goodsync to overwrite folders so that they have their date and time fixed.. But now after thinking about this, if I use goodsync after using import pics and vids, the pics and video's date accessed will change to current system time...so now it's all of a sudden become alot more complicated than I thought.

I will update you as time goes on if I find a workaround...if there exists any...
 

GJS_MA

New member
Nov 30, 2021
3
0
However, from looking at the above example, which only shows for files, the date created and date accessed is shown as Dec 31, 1969 @ 8 PM which I'm assuming is a limitation for linux ?
An uninitialized date/time with value '0' is interpreted as zero seconds after the UNIX epoch, which is 00:00 UTC 1/1/1970. I am four time zones earlier than UTC, so it displays as 8:00 PM local time the previous day. I don't have an Android app which can show a file's creation and access times, so I don't know whether they are unset on Android or whether LAN Drive is not transmitting them.
After trying, many many different softwares ...
I've spent way too much time on this problem ...
Same here. I am currently using SSH/SFTP Server-Terminal (Android) and Beyond Compare (Windows) to mirror each Android folder onto my PC. After doing whatever file file operations I need, I mirror the folders back to Android. This is the only combination I have found which preserves file modification dates, preserves file sizes, and is reasonably fast. Beyond Compare supports scripting, so I wrote a Perl module to do the grunt work. The scheme does what I need, but seems more complicated than ought to be necessary.

As far as I can tell, this combination does not attempt to synchronize folder modification times. They remain unchanged on both the Android and Windows sides after a sync.
 

[email protected]

Senior Member
May 27, 2016
104
1
toronto
so folder date created and date modified and date accessed does not remain preserved and the only thing that works is only for files...Does it work on Linux ?
 
Last edited:

Gnome1911

Senior Member
Dec 4, 2013
50
9
Reutlingen
plus.google.com
Hey,
The File size of the shares are not displayd correct. It Shows Up millions of TB are free from total storage of 512kb...

Is there a chance to fix it?

Server Runs in Android 9, TV Box. I Connect over my Phone Android 10 with Solid Explorer.
Box ist Not rooted...

One Thing else, i can only Connect over IP, not over Domain Name. Is that normal?

Thx
 

RobMahn

Member
Mar 30, 2015
15
5
LG G6
I have purchased the app on a rooted Android 9.

I have the following settings:

- "Start the app after OS boot completed" enabled
- "Boot option: Always show UI" : disabled
- "Run as Service" enabled

However, the app always shows after a reboot.

A minor problem, I am very thankful for this very useful app.
 
Jul 13, 2008
26
0
Hi, I bought LanDrive but it doesn't work. Even on my mac or my PC.
My phone A52S no root. I use Port Forward on PC.

On Windows10 I have the error "No path found" 0x80070035
And on MacOS : connexion failed.
could someone help me ? It works well with you ?

James
 

tramp20

Senior Member
Jan 15, 2012
785
163
Rosenheim
Apps & Games
I am using this app on my rooted smartphones since 4 years.

But now I had to install LANDrive on an unrooted Sony XPeria 5II (Android 12) and the "multi port forwarder trial" on my Win 11 PC with the help of your manual.
But Windows and MPF do not see my 5ii.
The LANDrive start screen shows an unknown IP address 100.119.6.67 (changes after a restart), it is not the address to the mobile net nor to my WLAN (should be 172.16.10.209).
I tried the WLAN address in the MPF but with no success.
 

Attachments

  • Screenshot_20220807-105541.png
    Screenshot_20220807-105541.png
    92.4 KB · Views: 4

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    iUUVcmJE6gWKe-YlSlReNiLeedXOUVaFtqxKZ1eqye5MU3LoQBi_0WK4vzgGRa6EvWY=s180-rw


    Introduction:
    LAN drive is an easy SAMBA Server for Android (iOS & WM10) devices.
    Access all your phone files - InternalStorage,SDCard,ExternalHDD - in read/write remotely with common softwares :
    • MAC OS Finder
    • Windows File Explorer
    • ES Explorer
    • VLC
    • Kodi
    • Any SMB client capable app
    You just have to be on the same network (WiFi) to make it work.

    There are 3 default network sharings activated :
    • 'LANdrive' : storage bound with the app (deleted when you clear cache of the app)
    • 'Root' : "/" access
    • 'InternalStorage' :
    • 'SDCard'|'HDD': Any other external storage automatically detected
    You can create your custom sharings too (bound to the app or select one with file picker)

    The app is free with an InApp purchase for unlocking the bandwidth (0.5 MB/s in trial) and remove ads, otherwise all is functionnal.
    We released it first at the end of January 2018 and are looking for feedback and help in making LAN drive the best it can be.

    Presentation Video:


    Works without ROOT:
    Read the tutorial inside the app (works on Windows / MAC / Linux)


    Features:
    • Copy/paste/rename files and folders on your device with MAC OS Finder, Windows File Explorer, Android ES Explorer, etc.
    • Access the 'external' storage (Photos and Videos included) in your device as a network shared folder.
    • Access the Root folder and all directories including SD Cards or external HDDs as network shared folders
    • View your multimedia files with embedded mediaplayer (or external app).
    • Your device name appears automatically in MAC OS Finder, Windows File Explorer, Android ES Explorer, VLC, Kodi etc.
    • Manage your device name (NetBios) and Workgroup name.
    • 3 authentication types : Anonymous with popup confirmation, Anonymous and Users with custom rights
    • Manage users and create your own shared folders with credentials.
    • View users connected and disconnect them.
    • Unlimited connections (several users can access your sharings at the same time)
    • 5 languages : English, Spanish, French, German, Italian.
    • Launched as a service in the background : Access your SMB server while using other apps
    • Optionally start the app after boot device completed
    • Protocols SMB1 (CIFS) and SMB2 protocol (enable/disable via settings)

    How Does It Work?
    LAN drive uses its own SMB1 & SMB2 implementation with an efficient way to announce itself on clients (your phone appears automatically in other software, even in Windows 10 File Explorer).
    You can choose 3 ways to authenticate :
    • Popup confirmation (default)
    • Anonymous
    • Create users with custom rights
    Even if it requires root access, LAN drive is non intrusive (not installed in app systems), nothing will stay in the system after uninstall it.


    Known issues
    • App startup time could be very slow (could take 10 seconds depending the devices).
      It's not something we can improve at the moment (framework loading Xamarin.Forms)
    • App Size : 26MB. We can't make it better, again Xamarin.Forms have some mandatory DLL to load to work

    Use cases:
    Some users don't know the powerfull use of SMB server, here some use cases:
    • Backup files, like you do with an USB key, but without the USB cable, and with security credentials.
    • Watch your movies/photos on your TV with Kodi (or VLC) streaming directly from your Phone.
    • Use a Backup utility from MAC or PC to create a scheduled task which backup|synchronize your movies/photos every days.
    • Developers|Hackers could browse Root "/" and edit/delete/copy/paste any files without using adb shell


    Who Are We?
    Webrox is a little french company of 2 persons, we build apps since 2011, check the Webrox store page here.
    We made LAN drive to have a very easy multiplatform SMB Server.



    How To Download:
    Google Play Download



    XDA:DevDB Information
    LAN drive, App for all devices (see above for details)

    Contributors
    poppyto

    Version Information
    Status: Stable
    Current Stable Version: 1.4
    Stable Release Date: 2018-05-14

    Created 2018-05-15
    Last Updated 2018-11-19
    2
    Some minutes ago LD does not shut down when WiFi was off or does not return when WiFi comes back. I could try this many times.
    Then I forced close LD (with the back key) and LD behaves normal again. I do not know how long :(

    This looks for me that perhaps a variable in your app is not always synchronized to the real state.

    Ok got the bug, my code only works if you push the nav (center) button instead of back button (which close the page) => I fix it now :)
    2
    No, that is not normal: during 14h 59m your app has during 98.6% of this time wakelocks. The battery drops normally during night from 100 to 95% but with your running discharges to ~70%.
    As you can see other apps in my screenshot they have all >0.2 %.
    Your app should detect this unused time during night (deep sleep) and when WLAN is off, there is no need to permanent check.
    BetterBatteryStats is a perfect app to detect things.

    And thank you to solve the other two points.

    You will have a lot of work for this app (fine tuning) :)

    Ok, I just sent an update,

    So, based on your comment about the battery drain:
    I add an auto stop after inactivity time (no connection on the server) you can change it in the settings (default:30min), I hope it will resolve your battery issue ;) let me know !

    Here the new changelog for 1.5 (will be available in 15 minutes I guess) :

    • New feature : Auto Stop server after inactivity time (change the duration in the settings, default : 30mn)
    • New feature : Backup and restore your settings on an external file
    • New behavior : Doesn't stop the server when button back on the homepage
    2
    How do you define inactivity? No more transfer over WLAN alone or over Lan Drive? Is screen on or off?



    That is ok.



    My Sony does this in the firmware but I think every Android smartphone does this too.
    Screenshot only in German.


    To the inactivity period: did you changed something here since v1.5? I remember that the LD server always stopped after the chosen time even the screen was on. So I did no longer used this function.

    The change logs are now complete for 1.8 and 1.9, don't know what happened on two phones.



    A little fast test:
    I selected two minutes, unplugged the charger, the screen shuts off and 10 mins later the LD server still is running and I can access the shares.
    So the phone can not go to deep sleep because of the wakelocks :(


    I attache a new debug file

    I sent the 2.0 version, now the server auto stop when WLAN is down and restart when WLAN is up again.



    On the new version (2.0), it include busybox => it should work for you now :)
    1
    You're welcome :)
    Here are the previous messages from the original thread

    I hope no one will be upset with my post, specially the OP.

    But since there is no update for Samba Filesharing since 2014, I feel obligated to share my discovery.

    Yesterday I found an alternative app in play store: LAN drive - SAMBA Server.

    In preliminary tests it works well and seems faster than Samba Filesharing. But be aware that the free version has a speed limit. To use LAN drive at full speed you have to pay.

    The app has been released on January 25, 2018. There are constant updates and the dev seems active and responsive.

    I made this discovery because there was no way Samba Filesharing would work in my Moto Z2 Play. Due to the nightmare of using MTP I started searching for alternatives. I found LAN drive and it worked like a charm.

    When creating your accounts and shares, my advice is first create all your shares and then add users. If you follow the app suggested sequence you will end up with your custom shares not accessible from your PC.

    If you use file synchronization software be aware that LAN drive has a bug. Files written to the phone do not get the time stamp updated to the source file time stamp. I will report this to the dev and hope it gets fixed soon.

    Hello svbarbosa, I'm the LAN drive developer.
    I will fix the issues of users rights and wrong timestamp on monday.
    I would like to tell other users LAN drive is a non intrusive app (it doesn't install anything in the system apps and it only work when you started it, security is a big thing these days).
    If anybody have a feedback, feel free to test LAN drive and feedback me ;)

    @poppyto, welcome to XDA!

    Glad to confirm you are really active and responsive. ;)

    I have also seen your answer to my email and will get on it soon. Some family errands to run first. :p

    Take your time to fix the issues. We have been waiting for so long to have samba support that we can sure handle waiting some more time to have your fixes.

    And please do start the LAN Drive app thread. I am a long time user of Samba Filesharing and despite it seems to be dead in terms of new development, somehow I feel weird talking about a replacement app here. :eek:



    I had problems with Samba Filesharing not working in my Moto Z2 Play, it is my first phone where Samba Filesharing would not work. Shares do not appear on my PC.

    I did some research and foung a great replacement app. Check it out in my previous post #235.

    Can you make LAN drive compatible with android 2.3 too?
    Or
    Can you give me another version of it which is compatible with android 2.3?

    Unfortunately, Xamarin Forms needs at least Android 4.0.3, and I can't make it better :/

    I was happy to found your app, but nothing works (I have paid in the meantime):
    1. I cannot make a new user
    2. I cannot change sharings etc.
    3. I cannot change device name and so on.

    your app does not accept any input :(

    Until now I am using Samba FileServer or SambaDroid

    You could make a own XDA thread here if your app really works.

    Sony Z1c stock rom 5.1.1 rooted

    Hello tramp20,

    I will open a support thread for LAN drive. I am not the developer, just a user of the app willing to help.

    LAN drive is working fine in three of my phones.

    In the meantime please let us know your phone model, Android version / rom, kernel if not stock and from which device/PC you are trying to access the phone.

    1.
    I wrote this two times: Sony Z1c stock rom 5.1.1 rooted

    As I cannot change the settings I cannot get a connection to my Win10 PC.

    As I wrote too I have no problems with Samba File Server or SambaDroid.

    2. On a very old LG P970 (Android 4.x) I can change the settings of this app but I don't see this phone in my network because Lan Server catches a wrong IP address (perhaps mobile and not WLAN).

    This app is in my eyes only alpha quality until now.

    My bad. I am having a tough work period and missed the last line in your post. :p

    For now, in your Sony, please uninstall and reinstall from Play Store. This will wipe data for LAN Drive make sure you have the latest update.

    Then create one user and one share. It should work.

    Turn of mobile data in settings and check if you can see it from your PC.

    Hi,
    since Lan Drive v1.3 I can configure this app now:)
    But there are problems of course:
    1. During deep sleep of my device I have wakelocks the whole time (battery is discharging badly), See attached screenshot.
    2. If I de-install the app and make a fresh new installation all shares are visible and I have access (not always). But after a short time or after stopping and restarting this app my device is no longer visible. I tested this on two smartphones several times. That is terrible.

    Wishes.
    A possibility to save and restore the settings on the (external) sdcard.
    2. If I tap on the back key the should NOT stop the smb server.

    If the smb server is running the transfer rate is very good compared to the old samba file server

    Well done. You beat me! Could not find the time to start the thread as I offered. :eek:

    Truth is I'm having an unusually tough period at work.

    Fortunately it is almost over and I will be able to help LAN drive development again real soon.