FORUMS
Remove All Ads from XDA

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

58 posts
Thanks Meter: 32
 
By poppyto, Member on 15th May 2018, 05:02 PM
Post Reply Email Thread
19th May 2018, 09:50 PM |#11  
OP Member
Thanks Meter: 32
 
More
Quote:
Originally Posted by tramp20

Thank you, your app will become better with each update.
To 1. the server stops with no wakelocks now: good
But the server stops always, it should only stop if WLAN is off.

To 2. Backup is fine but if I select a external path (e.g. SDCard1) the app should remember this selected path if I want to restore, so I do not
have to search.

To 3. ok

Thank you.

1. Ok I will add an option for that too
2. Mmmm why not ok


Quote:
Originally Posted by tramp20

There could be a bug with access rights to root directory.
With the build-in root share or with a own declared share I can
1. map this share in Windows but cannot access directories or
2. mapping fails with access error 5 in windows.

Mapping and access of sdcard0 and sdcard1 is always ok.

I have this behavior on two smartphones (Sony Z1c Android 5.1.1 stock rom, rooted of course)

With Samba File Server and SambaDroid no problem.

So only "Root" / shows access denied in Windows ?
Maybe there's something wrong with Android < 6.0 (I use 6.0 and more)
Could I contact you directly to solve the case ? (I will need some actions to do)

Stephane
The Following User Says Thank You to poppyto For This Useful Post: [ View ] Gift poppyto Ad-Free
 
 
20th May 2018, 03:57 AM |#12  
Senior Member
Thanks Meter: 105
 
More
Quote:
Originally Posted by poppyto

So only "Root" / shows access denied in Windows ?
Maybe there's something wrong with Android < 6.0 (I use 6.0 and more)
Could I contact you directly to solve the case ? (I will need some actions to do)

There are sometimes difficulties to access the other shares too on my two identical Z1c.
Today I found 6 active connections to my PC even if none are really mapped (PC was new started, see screenshot).

To the wakelocks: stopping the server is NO solution as the samba server is not started again when WLAN comes back.
Perhaps you can find here on XDA how to handle wacklocks correct.
As you can see in the second screenshot LD permanently sends wakelocks (98.6% of the running time of the server), compare this with the other running apps. I cannot help I am no programmer.
Your app seems to have one permanent wakelock (count:0 time 98,6%), all other apps have some counts and a very little used time. So your app prevents Android to go to deep sleep.

Of course you can connect me direct with perhaps a PM (XDA-profile).

Good luck.
Attached Thumbnails
Click image for larger version

Name:	2018-05-20 04.15.57.png
Views:	84
Size:	103.4 KB
ID:	4505433   Click image for larger version

Name:	2018-05-17 05.53.09.png
Views:	84
Size:	129.4 KB
ID:	4505436  
20th May 2018, 11:45 AM |#13  
OP Member
Thanks Meter: 32
 
More
Quote:
Originally Posted by tramp20

There are sometimes difficulties to access the other shares too on my two identical Z1c.
Today I found 6 active connections to my PC even if none are really mapped (PC was new started, see screenshot).

You may mapped "Z:" drives ? Or a backup utility ? I need more information to investigate if there's a bug.

Quote:
Originally Posted by tramp20

To the wakelocks: stopping the server is NO solution as the samba server is not started again when WLAN comes back.
Perhaps you can find here on XDA how to handle wacklocks correct.
As you can see in the second screenshot LD permanently sends wakelocks (98.6% of the running time of the server), compare this with the other running apps. I cannot help I am no programmer.
Your app seems to have one permanent wakelock (count:0 time 98,6%), all other apps have some counts and a very little used time. So your app prevents Android to go to deep sleep.

Other apps don't wavelock because they don't need it.
Without wavelock, LAN drive can't work (TCP connections are dropped) when the screen goes off and people want to use it when the scren goes off, the first option to stop the server when there's no more connections since a duration is a good option.
The good way should be to capture the "Deep Sleep" event, but it's impossible with the WaveLock on.
I will think about it this week if I can find a better solution
The Following User Says Thank You to poppyto For This Useful Post: [ View ] Gift poppyto Ad-Free
20th May 2018, 01:07 PM |#14  
Senior Member
Thanks Meter: 105
 
More
Quote:
Originally Posted by poppyto

You may mapped "Z:" drives ? Or a backup utility ? I need more information to investigate if there's a bug.

I mapped 3 shares with
net use u: \\Sony-Z2c\sdcard0

net use v: \\Sony-Z2c\sdcard1

net use x: \\Sony-Z2c\root

As the last share does not allow access to me (only with your app) I tried several times to read a directory.
On your app main screen i saw some messages that LD has connected to my PC and displayed every time a new connection. After 6 I stopped the server.
Attached Thumbnails
Click image for larger version

Name:	2018-05-20 04.15.57.png
Views:	50
Size:	103.4 KB
ID:	4505716  
20th May 2018, 01:25 PM |#15  
Senior Member
Thanks Meter: 105
 
More
Quote:
Originally Posted by poppyto

Other apps don't wavelock because they don't need it.
I will think about it this week if I can find a better solution

You could try this with the Samba File Server app how wakelocks should look.
And with BetterBatteryStats (https://play.google.com/store/apps/d...erbatterystats) you see the result after some time in summary-partial wakelocks.

I tried this again with samba file server, waited ~20 mins in deep sleep and no single wakelock from this server was seen.
I don't know how this works but in my opinion Android shuts down WLAN when the screen goes off and no charging (that is my setting in Android) and then the samba server has nothing to do and it should stop his own wakelocks to save battery until WLAN starts again.

Sorry I am not a programmer.
20th May 2018, 01:34 PM |#16  
OP Member
Thanks Meter: 32
 
More
Quote:
Originally Posted by tramp20

You could try this with the Samba File Server app how wakelocks should look.
And with BetterBatteryStats (https://play.google.com/store/apps/d...erbatterystats) you see the result after some time in summary-partial wakelocks.

I tried this again with samba file server, waited ~20 mins in deep sleep and no single wakelock from this server was seen.
I don't know how this works but in my opinion Android shuts down WLAN when the screen goes off and no charging (that is my setting in Android) and then the samba server has nothing to do and it should stop his own wakelocks to save battery until WLAN starts again.

Sorry I am not a programmer.

So to resume the behaviour you would like :

If server smb is started :
if WLAN off : stop wavelock
if WLAN on : start wavelock

Does it sound ok for you ?
20th May 2018, 01:38 PM |#17  
OP Member
Thanks Meter: 32
 
More
Quote:
Originally Posted by tramp20

I mapped 3 shares with
net use u: \\Sony-Z2c\sdcard0
net use v: \\Sony-Z2c\sdcard1
net use x: \\Sony-Z2c\root

As the last share does not allow access to me (only with your app) I tried several times to read a directory.
On your app main screen i saw some messages that LD has connected to my PC and displayed every time a new connection. After 6 I stopped the server.

Ok there's a bug with Root directories, could you track what's happen with the debug interface and send me the result :
From a computer, while LAN drive is launched go here :
http://your_phone_ip:13000/debug.html?refresh=auto&refreshtime=1&orderby=desc
Then try to access Root sharefolder, the debug page should show/may something
Then save the page CTRL+S from your browser dans send it to me enclosed here
Thank you
20th May 2018, 01:47 PM |#18  
Senior Member
Thanks Meter: 105
 
More
Quote:
Originally Posted by poppyto

If server smb is started :
if WLAN off : stop wavelock
if WLAN on : start wavelock

Does it sound ok for you ?

For the beginning that sounds good
20th May 2018, 02:01 PM |#19  
Senior Member
Thanks Meter: 105
 
More
Quote:
Originally Posted by poppyto

Ok there's a bug with Root directories, could you track what's happen with the debug interface and send me the result

output from your debug interface is attached.

My file manager never ends in connecting/reading the root share. And your app has created now >7 connections to my PC.

I hope you can see something in the debug file.
This afternoon I have only ~2 hours time and tomorrow morning I am not at home.
Attached Files
File Type: zip tramp20.zip - [Click for QR Code] (3.8 KB, 6 views)
20th May 2018, 07:25 PM |#20  
OP Member
Thanks Meter: 32
 
More
Quote:
Originally Posted by tramp20

output from your debug interface is attached.

My file manager never ends in connecting/reading the root share. And your app has created now >7 connections to my PC.

I hope you can see something in the debug file.
This afternoon I have only ~2 hours time and tomorrow morning I am not at home.

Thank you, I opened the debug but unfortunately it shows no issue, I'm back at work tuesday, I keep you in touch don't worry
21st May 2018, 03:10 AM |#21  
Senior Member
Thanks Meter: 105
 
More
Quote:
Originally Posted by poppyto

Thank you, I opened the debug but unfortunately it shows no issue,

I made new debug logs from my 3 shares.

My file manager hangs if I access the root share until I stop the LD server, it seems that something is missing in the answer from LD.
Attached Files
File Type: zip tramp20-2.zip - [Click for QR Code] (7.1 KB, 8 views)
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes