FORUMS

Hauwei’s Rapid Rise to Third Place in the Smartphone Race

Huawei has quickly grown to become one of the world’s biggest … more

OnePlus 2 Bares All in New Tear Down Gallery

Last year, the launch of the OnePlus One, dubbed ‘the flagship killer’, visibly … more

Focus – An Attractive But Raw Gallery Replacement

Focus is an attractive new app built by XDA members Liam Spradlin … more

How to Root the LG G4 and Install TWRP Recovery – XDA TV

A rooting method has finally been found for the flagship LG G4. In this … more

SMB/CIFS/NFS Network Shares with CifsManager

241 posts
Thanks Meter: 448
 
By succulent, Senior Member on 4th February 2012, 09:44 PM
Post Reply Subscribe to Thread Email Thread
Hello,

WARNING: Perform at your own risk. This won't brick your Nook Tablet

I've added NFS modules.

I've compiled cifs, nls_utf8, slow-work, and tun modules for CM7 Alpha. They're down in the attachment. Stock modules are also in the attachment.

If you have audio lag while streaming 720p/1080p, it's because of software encoding and didn't add CIFSMaxBufSize=130048 to option. I've tested videos in stock with hardware video decoding and there was no audio lag with HD movies. 1080p videos might have a few stutters. CM7 Alpha/Beta, in my test does not support H/W decoding yet.

I've been using cifs built in to the kernel for a while with CM7 beta, it's better than using modules. I've talked to Celtic, and Gonz will have cifs/tun built into the kernel in later release.

I've tested HW decoding in CM7 and both 720p/1080p struggled. CIFS transfer over wifi is slow and it's suggested that you use NFS.

*UPDATE in CM7: For 720p/1080p MP4 videos, streaming through ES File Explorer is perfectly fine. Through CIFS, the videos stutter. You can try to play around with options like rsize=130048,wsize=4096. 130048 (127x1024) is the max size.

HW Decoding is limited to 3GP, 3G2, MP4, M4V, MKV, WEBM, H.264 (Baseline/Main/High profile) up to 1920x1080, MPEG-4 Simple/Advanced Simple profile up to 1920x1080, & H.263


https://market.android.com/details?i...er.cifsmanager
Description
Access your CIFS/NFS network shares with your Android device. (root needed)

Manage your cifs/nfs network shares on your Android device (root access needed). This little app allows you to conveniently mount/unmount your network accessible file resources and access your data transparently via your favourite Android app (playing music / videos, accessing documents etc.).

credit - f3d0r

How to setup cifsmanager,
http://iamafanof.wordpress.com/2010/...h-cifsmanager/

In the settings,
path to cifs.ko -> /PATH/slow-work.ko:/PATH/cifs.ko:/PATH/nls_utf8.ko
change “PATH” to the location where you put your *.ko files. I'd recommend putting the modules on your sdcard root. It's much easier to enter the location.

When creating new share,
Options -> iocharset=utf8,directio,CIFSMaxBufSize=130048
*no spaces between comma

If you want your mount point to be on your sdcard,
Mount Point -> /sdcard/PATHNAME
change “PATHNAME” to your desired folder name.

I've attached tun.ko to the attachment. It load via insmod, but not tested.



For NFS modules, you can insmod them or use CIFSManager to load them.

By terminal insmod

Open up terminal

# su *give superuser access
# cd sdcard
# insmod exportfs.ko
# insmod sunrpc.ko
# insmod lockd.ko
# insmod auth_rpcgss.ko
# insmod rpcsec_gss_krb5.ko
# insmod nfs.ko

Alternatively using cifsmanager to load module

path to cifs.ko -> /sdcard/exportfs.ko:/sdcard/sunrpc.ko:/sdcard/lockd.ko:/sdcard/auth_rpcgss.ko:/sdcard/rpcsec_gss_krb5.ko:/sdcard/nfs.ko
change “PATH” to the location where you put your *.ko files. I'd recommend putting the modules on your sdcard root. It's much easier to enter the location.

I don't know if auth_rpcgss.ko and rpcsec_gss_krb5.ko are needed. I've never used NFS before. These modules loaded via insmod, but I can't test them.

-- specify the Share Path as <server>:<path> (e.g. 192.168.1.17:/mnt/Spajz)
-- Username and Password fields are ignored in this case

You can use terminal to mount NFS,
$ su
$ busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.x.x.x:/your/nfs/share /mnt/sdcard/share


cm7_mods_2.6.35.7-TEAM-B+.zip <- contains cifs, nls_utf8, tun, and slow-work modules for CM7 Alpha (NEW)
cm7_mods_2.6.35.7-ge8ff105.zip <- contains cifs, nls_utf8, tun, and slow-work modules for CM7 Beta (OLD)
cm7_mods_2.6.35.7 <- contains cifs, nls_utf8, tun, and slow-work modules for stock 1.4x.
nfs-cm7-2.6.35.7-TEAM-B+ <- contains exportfs, sunrpc, auth_rpcgss, rpcsec_gss_krb5, lockd, and nfs modules for CM7 Alpha (NEW)
nfs-cm7-2.6.35.7 <- contains exportfs, sunrpc, auth_rpcgss, rpcsec_gss_krb5, lockd, and nfs modules for stock 1.4x.
Last edited by succulent; 6th March 2012 at 12:55 AM. Reason: Update details
The Following 11 Users Say Thank You to succulent For This Useful Post: [ View ]
 
 
4th February 2012, 10:05 PM |#2  
succulent's Avatar
OP Senior Member
Thanks Meter: 448
 
More
How to compile modules (cifs.ko, slow-work.ko, nls_utf8.ko, and tun.ko).

I am assuming you know how to install tools and dependency packages for compiling kernel source.

Toolchain: CodeSourcery compiler version Sourcery G++ Lite 2010q1-202 for ARM GNU/Linux
Build Host OS: Ubuntu 11.10 in Oracle VM Virtualbox
Source: nook_tablet_1-4.tar.gz

My toochain path -> /HOME/arm-2010q1/
My Nook Tablet source path -> /HOME/distro/


In Ubuntu terminal,
> export CROSS_COMPILE=$HOME/arm-2010q1/bin/arm-none-linux-gnueabi-
> export ARCH=arm
> cd $HOME/distro/kernel/android-2.6.35/
> make android_4430BN_defconfig
# Create a .config file
> make
# This can take a while, depending on your processor(s). It will compile your kernel, zImage.
# You can add “-j(cpu+1)”, -j3 or –j5

> cp kernel/slow-work.* fs/cifs
> gedit fs/cifs/slow-work.c
# Change the following two lines of code in slow-work.c and save.
Code:
round_jiffies(jiffies + SLOW_WORK_CULL_TIMEOUT)); 
->
jiffies + SLOW_WORK_CULL_TIMEOUT); 

round_jiffies(jiffies + SLOW_WORK_OOM_TIMEOUT)); 
->
jiffies + SLOW_WORK_OOM_TIMEOUT);
> gedit /fs/cifs/Makefile
# Add slow-work.o
Code:
obj-$(CONFIG_CIFS) += cifs.o slow-work.o
> make menuconfig
Code:
Device Driver ->[*] Network device support -> <M> Universal TUN/AP…
File systems ->[*] Network File Systems - > <M> CIFS support…
File systems ->[*] Network File Systems - > <M> NFS client support…
File systems -> -*- Native language support -> <M> NLS UTF-8
> make modules
# cifs.ko location -> fs/cifs/cifs.ko
# slow-work.ko location -> fs/cifs/slow-work.ko
# nls_utf8.ko location -> fs/nls/nls_utf8.ko
# nfs.ko location -> fs/nfs/nfs.ko
# tun.ko location -> drivers/net/tun.ko


# To reduce modules size, we need Android NDK.
> $HOME/NDKPATH/linux-x86/bin/arm-linux-androideabi-strip --strip-debug PATH/MODULE.ko
# Manual loading modules
> insmod /PATH/cifs.ko CIFSMaxBufSize=130048 cifs_mic_rcv=1 cifs_max_pending=20 forcedirectio=1
# Manual remove modules
> rmmod MODULENAME *ie rmmod cifs, rmmod slow-work
# View loaded modules
> lsmod

# Modify network throttling in Windows 7
# Open regedit
# HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile
# Edit entry “NetworkThrottlingIndex" (default value is 10); set it to FFFFFFFF
# Reboot

# Disable RDC in Windows 7
# Go to “Programs and features” > “Turn Windows features on or off” > Uncheck Remote Differential
Compression


# Loading NFS modules
> insmod /PATH/sunrpc.ko
> insmod /PATH/lockd.ko
> insmod /PATH/nfs_acl.ko
> insmod /PATH/nfs.ko
> busybox mount -t nfs -o nolock,ro,hard,intr,tcp,vers=3,rsize=32768 IP:/SHAREPATH /MOUNTPATH


Source credits,
http://forum.xda-developers.com/showthread.php?t=837170
Last edited by succulent; 6th March 2012 at 12:25 AM. Reason: errors
The Following 3 Users Say Thank You to succulent For This Useful Post: [ View ]
6th February 2012, 11:29 PM |#3  
Senior Member
Thanks Meter: 35
 
More
Thanks a ton for this!!! It works great.

However, I have trouble unmounting... Is there a trick to doing this? It says that it is unable to...

Also, how does the mounting work after your device goes to sleep? Does everything connect as it should?
6th February 2012, 11:48 PM |#4  
succulent's Avatar
OP Senior Member
Thanks Meter: 448
 
More
Quote:
Originally Posted by slgooding

Thanks a ton for this!!! It works great.

However, I have trouble unmounting... Is there a trick to doing this? It says that it is unable to...

Also, how does the mounting work after your device goes to sleep? Does everything connect as it should?

Hey,

Un-mounting work when the file from the share is no longer access. If the file is still being used, it will not un-mount, so you have close the app you're using. I do have problem un-mounting when viewing image with PerfectViewer. For some reason the image is still being used even if you close the app but I've had that problem even with NC. To un-mount, just press menu and un-mount all or long press on the share you want to un-mount.

When your NT sleeps, the Wi-Fi get disabled. It will reconnect once Wi-Fi get reestablish.

Everything work, I can stream videos, books, images, apps, musics. etc..
7th February 2012, 12:09 AM |#5  
Senior Member
Thanks Meter: 35
 
More
Fantastic. I was able to get it to unmount after rebooting (after mounting again after boot). I must have had an app that was stubborn.

I'm surprised that more people aren't interested in this app. I guess they don't understand what they can do with it?

7th February 2012, 06:45 AM |#6  
lavero.burgos's Avatar
Senior Member
Flag Guayaquil
Thanks Meter: 1,327
 
Donate to Me
More
Omg I just realized about this, im interested in the tun.ko. module so I can set up a vpn ill test tomorrow. Can someone confirm is working?

Edit1: I confirm that the .ko files work with cifsmanager flawlesly , testing tun.ko now first with DroidVPN and OpenVPN after, will report back.
Edit2: tun.ko WORKS!!! woohoo, eather if i put it in /sdcard/modules/ or /system/lib/modules/ works and cifsmanager does the job loading all the .ko files via insmod . Tested with DroidVPN and im using Pandora right now.

~ Veronica

Sent from XDA premium using my Nook Tablet :P
Last edited by lavero.burgos; 8th February 2012 at 01:15 AM.
9th February 2012, 08:40 PM |#7  
lavero.burgos's Avatar
Senior Member
Flag Guayaquil
Thanks Meter: 1,327
 
Donate to Me
More
Ok im all setup via LAN for stream my media succesfully but now i want to stream my media anywhere with a wireless connection (WAN).
I have been doing my research for 2 days and so far i have tried setting up a FTP filezilla server with a no-ip host ip on windows pc but it doesn't work neather with cifsmanager nor ES file explorer FTP tab, vpn is not a go for me because stream videos can be choppy, anyway what i want is to find a reliable way to do this at list for music and videos, i have been searching but all i find is how to do it "local" which i already have setup and running. So big question here is does anybody know a reliable way to reach this - Windows to Android media streaming?

~ Veronica
9th February 2012, 08:57 PM |#8  
Senior Member
Thanks Meter: 35
 
More
Choppy is a generic term. The video player could cause it to play choppy (VPlayer is choppy for me, while MX Player is smooth).

Unfortunately there are a LOT of variables that will affect the performance. The VPN itself shouldn't really have an impact on how smooth the video plays (at least not on the tablet). The issue is most likely related to your internet connection and the software you are using to stream the video.

We would need a lot more details to determine what is going on, and you should probably create a new thread for this question.



Quote:
Originally Posted by lavero.burgos

Ok im all setup via LAN for stream my media succesfully but now i want to stream my media anywhere with a wireless connection (WAN).
I have been doing my research for 2 days and so far i have tried setting up a FTP filezilla server with a no-ip host ip on windows pc but it doesn't work neather with cifsmanager nor ES file explorer FTP tab, vpn is not a go for me because stream videos can be choppy, anyway what i want is to find a reliable way to do this at list for music and videos, i have been searching but all i find is how to do it "local" which i already have setup and running. So big question here is does anybody know a reliable way to reach this - Windows to Android media streaming?

~ Veronica

9th February 2012, 09:38 PM |#9  
lavero.burgos's Avatar
Senior Member
Flag Guayaquil
Thanks Meter: 1,327
 
Donate to Me
More
Quote:
Originally Posted by slgooding

Choppy is a generic term. The video player could cause it to play choppy (VPlayer is choppy for me, while MX Player is smooth).

Unfortunately there are a LOT of variables that will affect the performance. The VPN itself shouldn't really have an impact on how smooth the video plays (at least not on the tablet). The issue is most likely related to your internet connection and the software you are using to stream the video.

We would need a lot more details to determine what is going on, and you should probably create a new thread for this question.

Thanks but your answer does not help my question is explicit, anyways im going to try with VLC and report back, i know in the end i will figure it out. I could probably make a tutorial once i figure it out if anyone is interested.

~ Veronica
The Following User Says Thank You to lavero.burgos For This Useful Post: [ View ]
9th February 2012, 09:50 PM |#10  
Senior Member
Flag San Antonio
Thanks Meter: 10
 
More
Quote:
Originally Posted by lavero.burgos

Thanks but your answer does not help my question is explicit, anyways im going to try with VLC and report back, i know in the end i will figure it out. I could probably make a tutorial once i figure it out if anyone is interested.

~ Veronica

I'd be interested once you figure it out.

Sent from my Nexus S 4G using Tapatalk
9th February 2012, 11:08 PM |#11  
Senior Member
Thanks Meter: 35
 
More
Have you looked into NeoRouter? It's sort of like a vpn (like Hamachi) and may have less overhead than the VPN you tried. I have it running on my windows machine along with my android devices.

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes