5,596,235 Members 35,989 Now Online
XDA Developers Android and Mobile Development Forum

[HOWTO] Mount Windows Shares using Cifs

Tip us?
 
dascud
Old
(Last edited by dascud; 8th May 2011 at 05:47 PM.) Reason: Updated dropbox links
#1  
dascud's Avatar
Member - OP
Thanks Meter 24
Posts: 68
Join Date: Nov 2007
Location: Kalifornia
Post [HOWTO] Mount Windows Shares using Cifs

We now have a working cifs.ko and nls_utf.ko. I was able to mount my win7 shares using cifs_manager and stream a few movies using mvideoplayer from the mounted share.

My initial problem seemed to be that I used the android ndk toolchain and the nook kernel is compiled with the codeSourcery toolchain.
After I re-compiled using the codeSourcery toolchain everything works (at least for now)

For those who want to try this.
Download the cifs.ko and nls_utf8.ko modules.
http://dl.dropbox.com/u/16190398/Noo...%201.0/cifs.ko
http://dl.dropbox.com/u/16190398/Noo....0/nls_utf8.ko

Mount /system as read write and create a directory under /system/lib called modules. Copy the cifs.ko and nls_utf8.ko modules under this directory.

Type the following from your windows or linux console

adb shell
#mount -o remount,rw /dev/block/mmcblk0p5 /system
#su
#cd /system/lib
#mkdir modules
#exit
#exit
Now you are back in your windows or linux command prompt
adb push cifs.ko /system/lib/modules
adb push nls_utf8.ko /system/lib/modules

adb shell
#su
#insmod /system/lib/modules/cifs.ko
#insmod /system/lib/modules/nls_utf8.ko
if everything went well you should see no errors.
#lsmod
(THis should give you a list of running modules)
You should see something like
nls_utf8 1856 0 - Live 0xbf153000
cifs 240060 0 - Live 0xbf113000

#exit
#exit

Download cifs_manager from the android market and follow the instructions from
http://forum.xda-developers.com/showthread.php?t=756158

If you have Astro file manager installed then tapping on the mounted share from cifs_manager will automatically launch Astro and list the folder/files under that share.

BTW, you can copy the modules anywhere you like even under /sdcard/modules but the default path used by cifs_manager is /system/lib/modules. You can edit the path from cifs manager to point to the location of your cifs.ko module.



---- 05/06/2011 Update ------------
New version of cifs.ko, slow-work.ko for the 1.2 update. This is for kernel version 2.6.32.9
Note, cifs.ko requires some symbols from slow-work.ko so you will need to load slow-work.ko first. If you use cifs-manager, under advanced settings
you can check load modules at startup via insmod and put the path to multiple modules for e.g /system/lib/modules/slow-work.ko:/system/lib/modules/cifs.ko.

Everything seems to be working fine for me. Let me know if you run into issues.

http://dl.dropbox.com/u/16190398/Noo...2/slow-work.ko
http://dl.dropbox.com/u/16190398/Noo...%201.2/cifs.ko
http://dl.dropbox.com/u/16190398/Noo....2/nls_utf8.ko
The Following 10 Users Say Thank You to dascud For This Useful Post: [ Click to Expand ]
 
isolated_epidemic
Old
(Last edited by isolated_epidemic; 20th December 2010 at 08:43 AM.) Reason: Looked in the... OMG... settings panel...
#2  
Senior Member
Thanks Meter 23
Posts: 215
Join Date: Sep 2007
Location: Spokane, WA
Alright! This is fantastic! I can even play my SNES roms over wifi. Thanks for sharing.

The only issue I have noticed is that you need to run the insmod commands every time you reboot the device, and I reboot a lot. For now I'm just using gScript to run the 2 commands whenever I need, but it would be great to have them run when the program starts. I know you're just sharing and this has been mentioned in the app thread, just wanted to make my observations known.

Edit: Found a nifty toggle in the settings of cifs managaer that runs the insmod command at startup. I guess I should look before I complain...
 
thetoady
Old
#3  
Senior Member
Thanks Meter 0
Posts: 125
Join Date: Mar 2008
any chance you can provide your build environment, so that the rest of us can work on hacking the kernel.
 
dascud
Old
#4  
dascud's Avatar
Member - OP
Thanks Meter 24
Posts: 68
Join Date: Nov 2007
Location: Kalifornia
Quote:
Originally Posted by thetoady View Post
any chance you can provide your build environment, so that the rest of us can work on hacking the kernel.
Setting up the environment is ridiculously easy esp if you have access to a linux box. There is a very well documented wiki page which outlines the process of building your own custom kernel for the nook color.
http://nookdevs.com/NookColor:_Build...riginal_Kernel

I downloaded the codesourcery tool chain and did the minimum install as I did not care about the IDE and added the path to my environment. THat was about it. Everything else I followed the wiki page.
Here is my .config file if you like. When you run "make menuconfig" you can choose to load an alternate config file instead of the default. Just put this .config (after renaming it to .config_myconfig or something) under your distro/kernel directory.

Let me know if you need anything specific and I'll try to help. I had to add the .txt extension to the config file for xda upload but you can rename it to anything you want.
Attached Files
File Type: txt myconfig.txt - [Click for QR Code] (43.6 KB, 94 views)
 
pezhore
Old
#5  
Member
Thanks Meter 11
Posts: 75
Join Date: Jun 2009
Hrm, couldn't get that working on my system.

I'm getting this error:

Mountingthe share has failed with an error.
mount: Invalid argument

Thoughts?
 
dascud
Old
#6  
dascud's Avatar
Member - OP
Thanks Meter 24
Posts: 68
Join Date: Nov 2007
Location: Kalifornia
Quote:
Originally Posted by pezhore View Post
Hrm, couldn't get that working on my system.

I'm getting this error:

Mountingthe share has failed with an error.
mount: Invalid argument

Thoughts?
Seems more like an error in configuring CIFS_Manager.
If the module doesnt load you get a different error from Cifs_Manager
"No such device".
Can you try using adb shell and use insmod to load the module manually.
CHeck with lsmod if the module is loaded.

Can you post you cifs_manager screen for the share that you are trying to mount.
 
madrascafe
Old
#7  
madrascafe's Avatar
Senior Member
Thanks Meter 23
Posts: 207
Join Date: Feb 2006
Location: New York
Quote:
Originally Posted by pezhore View Post
Hrm, couldn't get that working on my system.

I'm getting this error:

Mountingthe share has failed with an error.
mount: Invalid argument

Thoughts?
I'm sure you noticed that there's an error in dascud instructions... the 2nd insmod command has a filename typo..

its should read
HTML Code:
#insmod /system/lib/modules/nls_utf8.ko
Nokia Lumia 920 from Rogers (Red) on T-Mobile
 
madrascafe
Old
#8  
madrascafe's Avatar
Senior Member
Thanks Meter 23
Posts: 207
Join Date: Feb 2006
Location: New York
dascud.. thanks a ton... as mentioned in my previous post can you please make the change in your post
Nokia Lumia 920 from Rogers (Red) on T-Mobile
 
dascud
Old
#9  
dascud's Avatar
Member - OP
Thanks Meter 24
Posts: 68
Join Date: Nov 2007
Location: Kalifornia
Quote:
Originally Posted by madrascafe View Post
dascud.. thanks a ton... as mentioned in my previous post can you please make the change in your post
Done. Were you able to mount the CIFS shares ?
 
madrascafe
Old
#10  
madrascafe's Avatar
Senior Member
Thanks Meter 23
Posts: 207
Join Date: Feb 2006
Location: New York
Quote:
Originally Posted by dascud View Post
Done. Were you able to mount the CIFS shares ?
Yes. No problem at all. I even opened files from root explored & played some music. Thank you for this
Nokia Lumia 920 from Rogers (Red) on T-Mobile

Tags
cifs, mount windows shares
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes