TUN, NTFS, CIFS, usbserial, fuse kernel modules (and more) for 2.6.39.4, attached

abactor_xda

Member
Mar 26, 2011
38
26
0
Hi there,
I've attached the tun and ntfs kernel modules, let me know if you're unable to download/use them

tun.ko
md5sum: 08956c574f72929f3c831e834ff9860d *tun.ko

ntfs.ko
md5sum: 5bbfa6ce8ddd66f7dda885a333fdf027 *ntfs.ko

to use them move them to a persistent folder like /data/local/lib
you may have to chmod them and then from a root shell run:
insmod /data/local/lib/tun.ko
or whatever module you want to install.
To ensure this runs at boot you'll likely have to add a script to init.d, I assume.

This is for the Sony ICS build of kernel 2.6.39.4
Let me know if people would like additional modules and I can build and upload them.

I hope this helps.
A
 

Attachments

Last edited:

abactor_xda

Member
Mar 26, 2011
38
26
0
installing kernel modules, init.d

Sure thing! Here's how to install the modules and make them work persistently.

I'm going to have to assume you have root and a terminal emulator (and utilities like busybox).
To simply install the kernel modules, you'll have to download that tarball I posted, unpack it, ensure you have the right permissions on the files, and run the install command from a root prompt (we'll assume you've downloaded the tarball to /sdcard/download, though if you've used /sdcard2/download or some other directory use that instead):

mkdir /data/local/kmods
cd /data/local/kmods
chmod 775 /data/local/kmods
cp /sdcard/download/tun_and_ntfs_modules_2.6.39.4.tar /data/local/kmods/
tar -xvf tun_and_ntfs_modules_2.6.39.4.tar


(if you're not yet in a root prompt at this point type: su)

chmod 775 ntfs.ko
chmod 775 tun.ko
insmod ntfs.ko
insmod tun.ko


to check to see if the module loaded properly, at the prompt type:

lsmod | grep tun
lsmod | grep ntfs


and check to see if anything is printed, with "Live" on the line.

And that should be that, but at this point you'll have to load it manually every time you want to use it.
A better way is to create a script that will run at startup every time you boot by placing it in /system/etc/init.d. To do this, first ensure that you've followed the above steps and placed the modules in /data/local/kmods (you can use any name you want for the kmods folder, as long as you're consistent. Using the /data/local/ directory ensures the modules persist after reboot); also, you'll need to use condi's all-in-one tool to enable the init.d support --- it's option 4 -> 4 (using version 4.1).

ok, so using vi or a text editor create the following file, we'll call it "kmodboot" (it doesn't need a file extension!)
so the file should contain the following lines:

#!/system/bin/sh
insmod /data/local/kmods/ntfs.ko
insmod /data/local/kmods/tun.ko


You can run this script at this point to ensure that it works (insmod will throw an error if the module is already loaded):

chmod 775 kmodboot
./kmodboot


Next you're going to need to remount /system as writeable, you can use ghost commander or ES File Explorer. (To do this manually, at a root prompt type:
mount -o remount,rw -t ext4 /dev/block/mmcblk0p2 /system
But be careful! You've just made your system directory writable! type
mount -o remount,ro -t ext4 /dev/block/mmcblk0p2 /system
to remount it back to read only, when you're done!

mv kmodboot /etc/init.d
cd /etc/init.d
chmod 775 kmodboot


That's it! reboot and see if it the modules have loaded, using lsmod.

I hope this helps, remeber to be careful when you have your /system directory writeable! I can't help you if you mess up.
Take care,
A

Could you please write step by step installation tutorial for dummies like me?
 
Last edited:
  • Like
Reactions: kulen

kulen

Senior Member
Jun 27, 2008
472
31
0
Zagreb
thank you for quick and detailed response

I tried what you said to do but this is what I got.

[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ mkdir /data/local/kmods//
mkdir failed for /data/local/kmods//, Permission denied
255|[email protected]:/ $ su
[email protected]:/ # mkdir /data/local/kmods
[email protected]:/ # cd /data/local/kmods
[email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar /data/local/kmods
failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link
255|[email protected]:/data/local/kmods #

So, what am I doing wrong?

in this other part, which I don't intend to do for now because it seems complicated to me, system needs to be writable just to copy script to init.d?

in this post are two other modules for other kernel:
http://forum.xda-developers.com/showthread.php?t=1557868

it would be great if you could make them for this kernel also.

Thank you
 
  • Like
Reactions: abactor_xda

abactor_xda

Member
Mar 26, 2011
38
26
0
Hi there,
I'll look into posting those other modules when I get a chance (so the serial and cifs modules, any others?)

As for that cross-link error, try doing a copy (cp) instead of a move (mv) and ensuring thr permissions of the kmods directory are correct. I've edited the tutorial above to reflect this.

As for the init.d stuff, I think that's the way to go: in order to copy the script to the startup directory you need to make the whole system mount writeable.

Let me know if this helps.
A
 
  • Like
Reactions: kulen

kulen

Senior Member
Jun 27, 2008
472
31
0
Zagreb
I just continued last session and this is what I got now:

[email protected]:/ $ export PATH=/data/local/bin:$PATH [email protected]:/ $ mkdir /data/local/kmods//mkdir failed for /data/local/kmods//, Permission denied 255|[email protected]:/ $ su [email protected]:/ # mkdir /data/local/kmods [email protected]:/ # cd /data/local/kmods [email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link 255|[email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link 255|[email protected]:/data/local/kmods # chmod 775 /data/local/kmods [email protected]:/data/local/kmods # cp /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods [email protected]:/data/local/kmods # tar -xvf tun_and_ntfs_modules_2.6.39.4.tar ntfs.ko tun.ko [email protected]:/data/local/kmods # chmod 775 ntfs.ko [email protected]:/data/local/kmods # chmod 775 tun.ko [email protected]:/data/local/kmods # lsmod ntfs.ko ath6kl_sdio 190837 0 - Live 0xbf081000 cfg80211 155484 1 ath6kl_sdio, Live 0xbf04c000 compat 4748 1 ath6kl_sdio, Live 0xbf044000 quick_tp 9806 0 - Live 0xbf03f000 (P) cyttsp_i2c 1347 0 - Live 0xbf039000 cyttsp_core 4862 1 cyttsp_i2c, Live 0xbf032000 hid_sony 1573 0 - Live 0xbf02c000 stuid 159606 0 [permanent], Live 0xbf000000 (P) [email protected]:/data/local/kmods # lsmod tun.ko ath6kl_sdio 190837 0 - Live 0xbf081000 cfg80211 155484 1 ath6kl_sdio, Live 0xbf04c000 compat 4748 1 ath6kl_sdio, Live 0xbf044000 quick_tp 9806 0 - Live 0xbf03f000 (P) cyttsp_i2c 1347 0 - Live 0xbf039000 cyttsp_core 4862 1 cyttsp_i2c, Live 0xbf032000 hid_sony 1573 0 - Live 0xbf02c000 stuid 159606 0 [permanent], Live 0xbf000000 (P) [email protected]:/data/local/kmods # lsmod | grep tun 1|[email protected]:/data/local/kmods # lsmod | grep ntfs 1|[email protected]:/data/local/kmods #

When I connect my hard drive with 2 ntfs and 1 fat32 partitions only fat32 is recognized.

What did I do wrong this time?

Well I would like to make my usb 3g modem to work with this tablet and usb to serial is needed for that as I understood.
Cifs I don't need for now but I plan to buy network hard drive so it's good to be prepared and maybe there are some others that want it but stay silent.

So if it's not a problem for you it would be nice if you post it here also. If it's a problem it's ok.

If this is messy I can post it again from computer but not sooner than tomorow

Sent from my Sony Tablet S using xda app-developers app
 

abactor_xda

Member
Mar 26, 2011
38
26
0
Hi,
it looks like you're trying to install the modules using the list function (lsmod) instead of the install function: insmod.
It's hard to tell as there are no line breaks, but try
insmod tun.ko
insmod ntfs.ko

i'm going to attach the cifs and usbserial modules to my first post, so look out for an edit coming soon.
let me know if this resolves anything.
a

Sent from my Sony Tablet S using xda app-developers app
 

kulen

Senior Member
Jun 27, 2008
472
31
0
Zagreb
It seems it is installed now but I still can see only fat32 partition

[email protected]:/ $ export PATH=/data/local/bin:$PATH [email protected]:/ $ mkdir /data/local/kmods//mkdir failed for /data/local/kmods//, Permission denied 255|[email protected]:/ $ su [email protected]:/ # mkdir /data/local/kmods [email protected]:/ # cd /data/local/kmods [email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link 255|[email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link 255|[email protected]:/data/local/kmods # chmod 775 /data/local/kmods [email protected]:/data/local/kmods # cp /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods [email protected]:/data/local/kmods # tar -xvf tun_and_ntfs_modules_2.6.39.4.tar ntfs.ko tun.ko [email protected]:/data/local/kmods # chmod 775 ntfs.ko [email protected]:/data/local/kmods # chmod 775 tun.ko [email protected]:/data/local/kmods # lsmod ntfs.ko ath6kl_sdio 190837 0 - Live 0xbf081000 cfg80211 155484 1 ath6kl_sdio, Live 0xbf04c000 compat 4748 1 ath6kl_sdio, Live 0xbf044000 quick_tp 9806 0 - Live 0xbf03f000 (P) cyttsp_i2c 1347 0 - Live 0xbf039000 cyttsp_core 4862 1 cyttsp_i2c, Live 0xbf032000 hid_sony 1573 0 - Live 0xbf02c000 stuid 159606 0 [permanent], Live 0xbf000000 (P) [email protected]:/data/local/kmods # lsmod tun.ko ath6kl_sdio 190837 0 - Live 0xbf081000 cfg80211 155484 1 ath6kl_sdio, Live 0xbf04c000 compat 4748 1 ath6kl_sdio, Live 0xbf044000 quick_tp 9806 0 - Live 0xbf03f000 (P) cyttsp_i2c 1347 0 - Live 0xbf039000 cyttsp_core 4862 1 cyttsp_i2c, Live 0xbf032000 hid_sony 1573 0 - Live 0xbf02c000 stuid 159606 0 [permanent], Live 0xbf000000 (P) [email protected]:/data/local/kmods # lsmod | grep tun 1|[email protected]:/data/local/kmods # lsmod | grep ntfs 1|[email protected]:/data/local/kmods # insmod ntfs.ko [email protected]:/data/local/kmods # insmod tun.ko [email protected]:/data/local/kmods # lsmod | grep tun tun 12984 0 - Live 0xbf0e4000 [email protected]:/data/local/kmods # lsmod | grep ntfs ntfs 196520 0 - Live 0xbf0b2000 [email protected]:/data/local/kmods #



P.S. I use ES file explorer to check this and fat32 shows as usbdisk1. Usbdisk2 - 8 are empty


Sent from my Sony Tablet S using xda app-developers app
 
Last edited:

abactor_xda

Member
Mar 26, 2011
38
26
0
Hey kulen,
I'm glad to hear the module is loaded. I haven't tried to access an ntfs drive yet, I'll be able to test that in a couple weeks.
However, have you ensured that the drive is even mounted? I'm not sure ES file explorer can mount a device. So you'll need to mount it before accessing it.
you can check the current mounts with the command
mount

Additionally, you might be able to use fuse: forum.xda-developers.com/showthread.php?t=1724078
I've just compiled the fuse.ko module, but it should be included in the standard sony kernel. I'll post that too.

take care,
a

It seems it is installed now but I still can see only fat32 partition

[email protected]:/ $ export PATH=/data/local/bin:$PATH [email protected]:/ $ mkdir /data/local/kmods//mkdir failed for /data/local/kmods//, Permission denied 255|[email protected]:/ $ su [email protected]:/ # mkdir /data/local/kmods [email protected]:/ # cd /data/local/kmods [email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link 255|[email protected]:/data/local/kmods # mv /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods failed on '/sdcard/xda_download/tun_and_ntfs_modules_2.6.39.4.tar' - Cross-device link 255|[email protected]:/data/local/kmods # chmod 775 /data/local/kmods [email protected]:/data/local/kmods # cp /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods [email protected]:/data/local/kmods # tar -xvf tun_and_ntfs_modules_2.6.39.4.tar ntfs.ko tun.ko [email protected]:/data/local/kmods # chmod 775 ntfs.ko [email protected]:/data/local/kmods # chmod 775 tun.ko [email protected]:/data/local/kmods # lsmod ntfs.ko ath6kl_sdio 190837 0 - Live 0xbf081000 cfg80211 155484 1 ath6kl_sdio, Live 0xbf04c000 compat 4748 1 ath6kl_sdio, Live 0xbf044000 quick_tp 9806 0 - Live 0xbf03f000 (P) cyttsp_i2c 1347 0 - Live 0xbf039000 cyttsp_core 4862 1 cyttsp_i2c, Live 0xbf032000 hid_sony 1573 0 - Live 0xbf02c000 stuid 159606 0 [permanent], Live 0xbf000000 (P) [email protected]:/data/local/kmods # lsmod tun.ko ath6kl_sdio 190837 0 - Live 0xbf081000 cfg80211 155484 1 ath6kl_sdio, Live 0xbf04c000 compat 4748 1 ath6kl_sdio, Live 0xbf044000 quick_tp 9806 0 - Live 0xbf03f000 (P) cyttsp_i2c 1347 0 - Live 0xbf039000 cyttsp_core 4862 1 cyttsp_i2c, Live 0xbf032000 hid_sony 1573 0 - Live 0xbf02c000 stuid 159606 0 [permanent], Live 0xbf000000 (P) [email protected]:/data/local/kmods # lsmod | grep tun 1|[email protected]:/data/local/kmods # lsmod | grep ntfs 1|[email protected]:/data/local/kmods # insmod ntfs.ko [email protected]:/data/local/kmods # insmod tun.ko [email protected]:/data/local/kmods # lsmod | grep tun tun 12984 0 - Live 0xbf0e4000 [email protected]:/data/local/kmods # lsmod | grep ntfs ntfs 196520 0 - Live 0xbf0b2000 [email protected]:/data/local/kmods #



P.S. I use ES file explorer to check this and fat32 shows as usbdisk1. Usbdisk2 - 8 are empty


Sent from my Sony Tablet S using xda app-developers app


Sent from my Sony Tablet S using xda app-developers app
 
Last edited:

kulen

Senior Member
Jun 27, 2008
472
31
0
Zagreb
I just tried USB OTG helper that I found in post you linked. And it did work but mounted all partitions under sdcard/usb***

strange thing is that when I reboot tablet and ntfs module is not mounted this also works?!

Thanks for all of this stuff


Sent from my Sony Tablet S using xda app-developers app
 
  • Like
Reactions: abactor_xda

abactor_xda

Member
Mar 26, 2011
38
26
0
Glad to hear it's working. I think the reason this works without the ntfs module is that the fuse.ko module is compiled into the kernel by default and it takes care of this for you.

I just tried USB OTG helper that I found in post you linked. And it did work but mounted all partitions under sdcard/usb***

strange thing is that when I reboot tablet and ntfs module is not mounted this also works?!

Thanks for all of this stuff


Sent from my Sony Tablet S using xda app-developers app
 
Last edited:
  • Like
Reactions: kulen

kulen

Senior Member
Jun 27, 2008
472
31
0
Zagreb
I might be going a little off topic here.

It seems I need some more modules to make my usb modem work.
I found an app PPPWidget which should make my modem work with tablet, but I can't make it work.

This is what app creator said to somebody with same problem as mine, but other tablet:

"Make sure you have "usbserial.ko", "option.ko" and "usb_wwan.ko". The "option" module is depending on the others, at least in more recent kernel versions."

so I guess I need option.ko and usb_wwan.ko

could you provide those too?
I would be very thankful.

i don't know much about this so I don't know if you already have sources or you need me to try to find them?

thank you
 

abactor_xda

Member
Mar 26, 2011
38
26
0
Hi Kulen,
I've updated the first post to include those other modules (option.ko and usb_wwan.ko). Hopefully this will work, but let me know if there are other dependencies. Can you post a link to the thread you were referring to (where they mention those kernel modules) in case others want to know what you can do with them. Are you going to tether your tablet to a 3G device over USB? I'd like to give that a shot myself as I feel like tethering over wifi is doubly inefficient.

take care,
a

p.s. actually compiling the modules is pretty simple once the toolchain is in place. All the kernel sources are available from samsung. I'm actually compiling the modules by running make/gcc on my tablet within a debian chroot.

I might be going a little off topic here.

It seems I need some more modules to make my usb modem work.
I found an app PPPWidget which should make my modem work with tablet, but I can't make it work.

This is what app creator said to somebody with same problem as mine, but other tablet:

"Make sure you have "usbserial.ko", "option.ko" and "usb_wwan.ko". The "option" module is depending on the others, at least in more recent kernel versions."

so I guess I need option.ko and usb_wwan.ko

could you provide those too?
I would be very thankful.

i don't know much about this so I don't know if you already have sources or you need me to try to find them?

thank you
 
  • Like
Reactions: walsera and kulen

kulen

Senior Member
Jun 27, 2008
472
31
0
Zagreb
this is working!!!


here are the links:

this is software in general - http://www.draisberghof.de/usb_modeswitch/

this is android version - it includes all necessary things except kernel modules - http://www.draisberghof.de/android/pppwidget.html

this is problem I had - http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=6&t=1019

and this is my 3g modem - not important but for you to know with which modem this works for sure - http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=368

If posting this links is against some rules somebody please warn me or mods please delete this.

all you need is download pppwidget from market instal usbserial.ko, usb_wwan.ko and option.ko.
and of course you need to know your operator apn, username and password.

hope this can help somebody else also.

I'm "getting wings" now. I would like to make my usb dvb-t tuner work if possible :)

and about this modules building, it may be easy to somebody who is into linux and programming, but it still sounds as science fiction to me :(
 

abactor_xda

Member
Mar 26, 2011
38
26
0
hey, I've added more dvb tuner modules. Sorry about the .tar.bz2.zip file extension. XDA has a higher limit on .zip files and this file was > 8MB.
 
Last edited:

nikor4

Member
Aug 17, 2009
28
1
0
38

Attachments

Last edited:

VenbergV

New member
Oct 3, 2012
2
0
0
I have Sony Tablet S
kernel 2.6.39.4 unrooted
Android 4.0.3 (release5)
current module tun.ko not suitable!

Code:
insmod: init_module '/data/local/kmods/tun.ko' failed (Exec format error)
Need new modules.

Big thanks.
 

abactor_xda

Member
Mar 26, 2011
38
26
0
I'm away cureently but will look into the axis stuff when I can (2+ weeks).

As for the insmod issue, you mention you have an unrooted device? You need root to load kernel modules.

Sent from my T-Mobile G2 using xda app-developers app
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone