Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
FadeFx
Old
(Last edited by FadeFx; 13th April 2013 at 10:44 AM.)
#1  
FadeFx's Avatar
Senior Member - OP
Thanks Meter 1351
Posts: 5,695
Join Date: Mar 2010
Location: Vienna

 
DONATE TO ME
Default [APP] Samba Server for Android

Welcome back jimmychingala!

Jimmy has stated that he will look into the problems we had with the app under jellybean roms, so we all will be happy again...

For the moment there is an app on play store that patches samba to work om jelly bean roms:
https://play.google.com/store/apps/d...om.brest.samba


Jimmy posted a quickfix for the problem here: http://forum.xda-developers.com/show...postcount=1153


Hi,

i was looking for a more easy option to push files to my android device than running a ftp server and run a ftp client on the pc, the best option in my mind would be to run a samba server on the device, which would enable both, linux and windows boxes, to pull and push files from and to the device, but it seems there is no such software available, i found a project about exactly this, but it seems dead at birth, no submits, nothing in there... for my part i am unable to code this by myself (otherwise i would type some code and not a lousy forum entry ), but i think if a talented dev would take this task it would benefit the whole comunity.

nice greets FadeFx

Edit:

since i didnt check back here for long time i missed that the task is already done and a working solition is available.

all credits go to user JimmyChingala for building this and to Jack_R1 and HardCorePawn for testing and support.


Requirements
============
- Root access on your phone.
- Bussybox 1.17.1 during installation




you can get the latest version of SambaAndroid on this post

for everyone who wants to get even more out of samba like sharing the whole filesystem and more custom shares, check out this thread thanx to chrishohl
Who said there is no i in

Samsung Galaxy S | CyanogenMod 10 | Version:HellyBean #??? (not older than a week) | Modem:XXJVT | Kernel: Devil 3.x
Samsung Galaxy SIII | OmegaRom 27.1 / Hellybean I9300 | Modem: XXLG8 | Kernel: Shiah 1.7rc3



Scoobycontrol EQ for Scoobydoo Sound i9300
VoodooEQ for Voodoo Sound i9000
Samba Server for Android
The Following 15 Users Say Thank You to FadeFx For This Useful Post: [ Click to Expand ]
 
DAGr8
Old
#2  
DAGr8's Avatar
Recognized Developer
Thanks Meter 6086
Posts: 3,358
Join Date: Feb 2010
Location: Montreal

 
DONATE TO ME
hey there I was lookin for similar feature , its not exactly the sme well it is , but anyways , Estrong Explorer does the job for what you are tryin to do , ( ESexplorer) free inmarket . as long as phone is reg on network it will access your share
COME CHAT WITH US

T W I T T E R
 
King-Kang For The Galaxy Note LTE

The Hybrid for Galaxy Note II & SGH-I717


SAUROM-PROJEKT for I9000


or

 
JimmyChingala
Old
#3  
Senior Member
Thanks Meter 141
Posts: 189
Join Date: Apr 2010
Location: Melbourne
Hi, I just got Samba server (2.2.12) working on my HTC Hero. The daemons smbd+nmbd take up just under 4Mb memory when running (and opening a shared folder on the phone from a computer on the network will launch another smbd daemon, which is about 2.5Mb).

The main problem I'm having is slow xfer rates - seems to max out at 600 - 700Kb/s. Its the same if i SCP files though, so I dont think its a problem is with samba specifically...

I can provide a tarball with the files if you want to try it out (install & configuration is through a root shell, its all pretty basic at the moment).

- Jimmy
 
Jack_R1
Old
#4  
Senior Member
Thanks Meter 910
Posts: 4,255
Join Date: Aug 2009
By all means, I'd like to try it on my Nexus. Just finished a thread about changing Nexus One's hostname from default "localhost", and understood that besides my router, I can't do much with it on Windows network w/o DNS
Please post the files & instructions.
 
JimmyChingala
Old
(Last edited by JimmyChingala; 1st August 2010 at 04:33 AM.) Reason: Update on newer version attached to later msg in this thread.
#5  
Senior Member
Thanks Meter 141
Posts: 189
Join Date: Apr 2010
Location: Melbourne
Have attached a zip file containing the samba files + README.txt with basic install instructions. Access the phone shared folder via Windows network browsing, or with \\IPaddress of the phone.

** See a later post by me in this thread that has a newer version of Samba attached which includes automated install/uninstall script.
Attached Files
File Type: zip sambaAndroid-0.3b.zip - [Click for QR Code] (2.60 MB, 2224 views)
File Type: txt README.txt - [Click for QR Code] (5.6 KB, 1885 views)
The Following User Says Thank You to JimmyChingala For This Useful Post: [ Click to Expand ]
 
Jack_R1
Old
#6  
Senior Member
Thanks Meter 910
Posts: 4,255
Join Date: Aug 2009
Hi,

I've checked the most recent version and the one before it, on Nexus.
Both exhibit the same behavior.

1) When trying to unzip to SD card, everything's ok and the default file attributes are preserved. When extracting to /data/local, no matter which way is used, "executable" attributes aren't preserved - only RW attributes. chmod +rwx samba/bin/* doesn't help, and when trying to execute "samba-rc start" via Terminal on the phone, it shows: "ash: can't find samba-rc" (I'm using ash). Using "su samba-rc start" also doesn't help, it shows "permission denied".

2) Trying to execute smbpasswd - it asks for a new password and confirmation, and crashes with segmentation fault.

3) Trying to execute samba-rc from ADB SHELL didn't throw any error messages, but it didn't work either.
 
Jack_R1
Old
#7  
Senior Member
Thanks Meter 910
Posts: 4,255
Join Date: Aug 2009
I've tried both running from the phone's terminal emulator and by adb shell (I don't open the shell continuously, I run each command separately - adb shell "command", this way I can dump the output to PC by adding > in the end).

/data/local/samba/bin/nmbd -i -d 99

Looks like it's working, both from phone's terminal emulator and from adb shell. I see the Nexus being discovered by Windows 7 workstation on network scan (I've personalized the name - read my thread in Nexus development section on how to do that). nmbd_log attached, to check that everything's ok.

/data/local/samba/bin/smbd -i -d 99

Here the things start getting more interesting.
1) If I try to connect, after some time the smbd stops by itself - looks like after 5 failed attempts the server auto-stops itself. That's not a good behavior, especially considering that while Windows prompts you for username and password to connect, it also keeps trying to auto-connect using the default username (that's where 5 attempts come from). The server shouldn't stop itself. smbd_log1 attached.
2) If I write the user on time, smbd crashes while trying to compare passwords. smbd_log2 attached.

All the logs are zipped.
Attached Files
File Type: zip samba_logs.zip - [Click for QR Code] (13.8 KB, 189 views)
 
JimmyChingala
Old
(Last edited by JimmyChingala; 15th May 2010 at 01:21 AM.) Reason: Fix typo
#8  
Senior Member
Thanks Meter 141
Posts: 189
Join Date: Apr 2010
Location: Melbourne
Thanks for the info Jack.

With the shell script, can you try running it like:

sh -c "/data/local/samba/bin/samba-rc restart"

if that still doesnt work, as a further test, open two root sessions via adb shell, in one run the nmbd command, in the other run the smbd (both with same options as before) then try browsing again from your computer.

Note: dont let your phone go into sleep mode (keep the screen active so the display stays on).

- JC
 
Jack_R1
Old
#9  
Senior Member
Thanks Meter 910
Posts: 4,255
Join Date: Aug 2009
I had a chance to play with both versions some more.

1) using su and no shell (not running ash) I can run samba-rc, and it executes correctly. Both processes (nmbd and smbd) show up in ps. To achieve that, I needed to chmod +rwx /samba/bin/* after unzipping.

2) nmbd works well, and the phone shows up on Windows network.

3) It still doesn't allow logging into it, and I believe the problem lies in smbpasswd executable, which still shows erroneous behavior:

Tried to login using default user bogan: "network resource not available" message coming from Windows upon entering login credentials. Phone stays on the network and can be accessed again, but login is still impossible.

Tried to change default user's password: smbpasswd asks for new password twice (without asking for the old one - which is wrong behavior!) and crashes with segmentation fault.

Tried removing /samba/private/smbpasswd file and creating a new one, using smbpasswd -add username. Worked, but no password was asked for the user.

Tried to change password for new username. The same as before - asked for new password twice, then crashed with segmentation fault.

When tried to login with the new user, it didn't show "network resource not available", but it kept asking for password (the dialog where username is already there, and only the password needs to be retyped). I didn't know the default password that smbpasswd creates, if any. Tried nothing, tried several basic options (root, same as username, etc), none worked.

I believe the problem might be smbpasswd not working correctly on Android 2.1.
 
DocMAX
Old
#10  
DocMAX's Avatar
Senior Member
Thanks Meter 13
Posts: 485
Join Date: Nov 2006
ich started samba via chroot debian. i can read and write the filesystem.. except mapped /sdcard... i cannot delete files... any ideas how to set permissions? the user is 1000 and group is 1015
Samsung Galaxy S III Mini

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...