Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[APP][2.0.1+][Root] Samba Filesharing Server for Android [Play & Dev builds]

OP JimmyChingala

11th January 2015, 02:11 PM   |  #61  
mattgyver83's Avatar
Member
Flag I live on the right side of the USA, left if your upside down.
Thanks Meter: 7
 
45 posts
Join Date:Joined: Jan 2009
More
Quote:
Originally Posted by FadeFx

Sorry, to be clear again, you tried to run a script after boot, not in an init.d script, through scriptmanager, tasker, llama or whatever is able to, that contains


su
/data/data/com.funkyfresh.samba/files/samba-rc start

and you run into troubles that shares are not accessible in the same way as if you start it from the app manually?

tapatalked from lollipopped i9300

Essentially yes but there is a minor caveat. I was running the script through an an adb shell on the device in the script to work around another problem so my actual command was more like "adb -s emulator-5554 shell "su -c blahblah". The service starts however the share configured at /storage/emulated/0 cannot be found as that location is not available to the system when inside an adb shell. Its clunky but it was the only way I was able to get the script to work. I honestly have no idea why that location is available to working applications but not when your digging around inside of ADB I suspect its something made up on the fly for an applciation for security purposes and never actually exists and in order for the share to share out my SDCard its got to point to that specific location nothing else works.

If I get some cycles today I'm gonna just straight Barney the script to double check but I'm pretty certain I got the same "no such file or directory" when testing it that way.
Last edited by mattgyver83; 11th January 2015 at 02:23 PM.
11th January 2015, 10:56 PM   |  #62  
FadeFx's Avatar
Senior Member
Flag Vienna
Thanks Meter: 2,052
 
6,965 posts
Join Date:Joined: Mar 2010
Donate to Me
More
Quote:
Originally Posted by mattgyver83

Essentially yes but there is a minor caveat. I was running the script through an an adb shell on the device in the script to work around another problem so my actual command was more like "adb -s emulator-5554 shell "su -c blahblah". The service starts however the share configured at /storage/emulated/0 cannot be found as that location is not available to the system when inside an adb shell. Its clunky but it was the only way I was able to get the script to work. I honestly have no idea why that location is available to working applications but not when your digging around inside of ADB I suspect its something made up on the fly for an applciation for security purposes and never actually exists and in order for the share to share out my SDCard its got to point to that specific location nothing else works.

If I get some cycles today I'm gonna just straight Barney the script to double check but I'm pretty certain I got the same "no such file or directory" when testing it that way.

Probably i am just stupid, but i dont get that adb stuff, you want to start the service on the device from your pc, or what?

tapatalked from lollipopped i9300
12th January 2015, 04:03 PM   |  #63  
Member
Thanks Meter: 4
 
46 posts
Join Date:Joined: Jan 2014
Since I run the smb server on Kitkat 4.4.4 blekota Note 4 (galaxy s3 i9300) - Samba doesnt recognize my external sd anymore....
I already applied KITKAT SD fix but not chance....
What could be the reason?
13th January 2015, 03:26 AM   |  #64  
mattgyver83's Avatar
Member
Flag I live on the right side of the USA, left if your upside down.
Thanks Meter: 7
 
45 posts
Join Date:Joined: Jan 2009
More
Quote:
Originally Posted by FadeFx

Probably i am just stupid, but i dont get that adb stuff, you want to start the service on the device from your pc, or what?

tapatalked from lollipopped i9300

@FadeFx, your probably following along better than you think its just what I had to do was notably a cheat at best. So when I was trying earlier to execute it as su the service was starting but the SDCard was not being shared out so I had to dig from my local PC via adb to better understand how the script was seeing things and thats when things got odd and I realized that ADB sees things differently than the applications do in terms of the sdcard location however with ADB I was actually able to start up the service and get /sdcard shared out (kinda, ill get back to that). So, as I sit there kicking myself over it I realized that the script could actually just take advantage of the adb emulator on the device itself by just executing the commands as 'adb -s emulator-5554 shell '<put command here>' ' and then the script would work exactly how I was telling it to and work that way.

So, back to the "kinda" part, thats when I recognized to my dismay that ADB and applications and android see the sdcard in different ways that are not entirely compatible with each other and thats where things get dirty, while you can share out the sdcard that way its availalbe to root only and not applications so its a no-go. The only reason I even know about that method is because its a workaround for mounting CIFS shares in android post 4.3 and I just got done setting up a script for this very same device to do so on boot. If this leaves your head spinning don't worry your not alone and thats why my inital post was really about figuring out a way to get this to boot just for eth0 because that settles all the workarounds or having to use a different application. There's a way, I am probably over complicating it but thats what I do best. Thanks for the assists.
13th January 2015, 08:16 AM   |  #65  
FadeFx's Avatar
Senior Member
Flag Vienna
Thanks Meter: 2,052
 
6,965 posts
Join Date:Joined: Mar 2010
Donate to Me
More
Quote:
Originally Posted by mattgyver83

@FadeFx, your probably following along better than you think its just what I had to do was notably a cheat at best. So when I was trying earlier to execute it as su the service was starting but the SDCard was not being shared out so I had to dig from my local PC via adb to better understand how the script was seeing things and thats when things got odd and I realized that ADB sees things differently than the applications do in terms of the sdcard location however with ADB I was actually able to start up the service and get /sdcard shared out (kinda, ill get back to that). So, as I sit there kicking myself over it I realized that the script could actually just take advantage of the adb emulator on the device itself by just executing the commands as 'adb -s emulator-5554 shell '<put command here>' ' and then the script would work exactly how I was telling it to and work that way.

So, back to the "kinda" part, thats when I recognized to my dismay that ADB and applications and android see the sdcard in different ways that are not entirely compatible with each other and thats where things get dirty, while you can share out the sdcard that way its availalbe to root only and not applications so its a no-go. The only reason I even know about that method is because its a workaround for mounting CIFS shares in android post 4.3 and I just got done setting up a script for this very same device to do so on boot. If this leaves your head spinning don't worry your not alone and thats why my inital post was really about figuring out a way to get this to boot just for eth0 because that settles all the workarounds or having to use a different application. There's a way, I am probably over complicating it but thats what I do best. Thanks for the assists.

Hmm, never even heard of that adb-on-device hack, also i never used a ethernet device myselfs. However, i remember others had done that and it worked for them with only the smb.conf mod. What is the result if you run that samba-rc start, as i posted it, in terminal emulator?

tapatalked from lollipopped i9300
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes