yashsingh1/xdaforums huggingface dataset:
[Sony Tablet S] abactor_xda:
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
[Sony Tablet S] kulen:
thank you for quick and detailed response

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

app_66@android:/ $ export PATH=/data/local/bin:$PATH

app_66@android:/ $ mkdir /data/local/kmods//

mkdir failed for /data/local/kmods//, Permission denied

255|app_66@android:/ $ su

app_66@android:/ # mkdir /data/local/kmods

app_66@android:/ # cd /data/local/kmods

app_66@android:/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|app_66@android:/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://xdaforums.com/showthread.php?t=1557868

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

Thank you
[Sony Tablet S] abactor_xda:
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
[Sony Tablet S] kulen:
I just continued last session and this is what I got now:

app_66@android:/ $ export PATH=/data/local/bin:$PATH app_66@android:/ $ mkdir /data/local/kmods//mkdir failed for /data/local/kmods//, Permission denied 255|app_66@android:/ $ su app_66@android:/ # mkdir /data/local/kmods app_66@android:/ # cd /data/local/kmods app_66@android:/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|app_66@android:/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|app_66@android:/data/local/kmods # chmod 775 /data/local/kmods app_66@android:/data/local/kmods # cp /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods app_66@android:/data/local/kmods # tar -xvf tun_and_ntfs_modules_2.6.39.4.tar ntfs.ko tun.ko app_66@android:/data/local/kmods # chmod 775 ntfs.ko app_66@android:/data/local/kmods # chmod 775 tun.ko app_66@android:/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) app_66@android:/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) app_66@android:/data/local/kmods # lsmod | grep tun 1|app_66@android:/data/local/kmods # lsmod | grep ntfs 1|app_66@android:/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
[Sony Tablet S] abactor_xda:
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
[Sony Tablet S] kulen:
It seems it is installed now but I still can see only fat32 partition

app_66@android:/ $ export PATH=/data/local/bin:$PATH app_66@android:/ $ mkdir /data/local/kmods//mkdir failed for /data/local/kmods//, Permission denied 255|app_66@android:/ $ su app_66@android:/ # mkdir /data/local/kmods app_66@android:/ # cd /data/local/kmods app_66@android:/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|app_66@android:/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|app_66@android:/data/local/kmods # chmod 775 /data/local/kmods app_66@android:/data/local/kmods # cp /sdcard/xda_download/tun_and_ ntfs_modules_2.6.39.4.tar /data/local/kmods app_66@android:/data/local/kmods # tar -xvf tun_and_ntfs_modules_2.6.39.4.tar ntfs.ko tun.ko app_66@android:/data/local/kmods # chmod 775 ntfs.ko app_66@android:/data/local/kmods # chmod 775 tun.ko app_66@android:/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) app_66@android:/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) app_66@android:/data/local/kmods # lsmod | grep tun 1|app_66@android:/data/local/kmods # lsmod | grep ntfs 1|app_66@android:/data/local/kmods # insmod ntfs.ko app_66@android:/data/local/kmods # insmod tun.ko app_66@android:/data/local/kmods # lsmod | grep tun tun 12984 0 - Live 0xbf0e4000 app_66@android:/data/local/kmods # lsmod | grep ntfs ntfs 196520 0 - Live 0xbf0b2000 app_66@android:/data/local/kmods #

P.S. I use ES file explorer to check this and fat32 shows as usbdisk1. Usbdisk2 - 8 are empty
[Sony Tablet S] abactor_xda:
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: xdaforums.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
[Sony Tablet S] abactor_xda:
Kulen,

I've uploaded the fuse.ko, cifs.ko, and usbserial.ko modules to the first post.
[Sony Tablet S] kulen:
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
[Sony Tablet S] abactor_xda:
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.
[Sony Tablet S] kulen:
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
[Sony Tablet S] abactor_xda:
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.
[Sony Tablet S] kulen:
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 :(
[Sony Tablet S] abactor_xda:
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.
[Sony Tablet S] nikor4:
Can anyone compile ASIX AX88772B .ko module for tablet s on 2.6.39.4 ? I want to run USB-Ethernet adapter

ASIX AX88772B

Original thread (compile for Asus tf101) http://xdaforums.com/showthread.php?t=1224660

Driver source attached (latest 4.4.0)
[Sony Tablet S] VenbergV:
I have Sony Tablet S

kernel 2.6.39.4 unrooted

Android 4.0.3 (release5)

current module tun.ko not suitable!

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

Need new modules.

Big thanks.
[Sony Tablet S] abactor_xda:
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.
[Sony Tablet S] VenbergV:
MY Mistake! Device is ROOTED!

But modules not work.
[Sony Tablet S] walsera:
Using release 5, you probably do not need to load a tun.ko module. Support for the tun device seems to be compiled into the kernel.
[Sony Tablet S] iczer3:
Hi there,

Is there a way to compile the usb lan modules ?

I have only wired lan in office.

Thx in advance !

iczer3.
[Sony Tablet S] abactor_xda:
Iczer, did you try the usb_wwan tarball that's posted? What is the specific kernel module you need?
[Sony Tablet S] iczer3:
Dear abactor_xda,

No, not wwan. I need usb WIRED lan modules to connect to the wired lan in office.

br,::o
[Sony Tablet S] abactor_xda:
I just uploaded net.tar to the OP.

perhaps that will help, but if you need other modules, please be specific.

good luck.

a
[Sony Tablet S] iczer3:
Dear abactor,

Thx. My office network broke down so I have no internet for a few days.

Will test now.

Thx again.

btw, if not too troublesome, can I ask for usbaudio modules to connect the tablet to my USB DAC ?

br,

iczer3:laugh:
[Sony Tablet S] abactor_xda:
I've just uploaded snd_usb.tar to the OP.

Let me know if that helps.

Good luck,

a
[Sony Tablet S] iczer3:
Dear abactor,

the usb lan worked. thx again.

will try the usb audio tonight.

If all goes well I shall have a good music frontend!

Br,

iczer3:good:
[Sony Tablet S] cthulu:
Cifs

Hi, I was trying to get cifs working, but I am getting No such device when using the mount manager or cmd line. The tun.ko works fine and the kernel version is correct. The module is also inserted and Live. Any suggestions?

Dmesg:

<3>[13857.776078] CIFS VFS: mdfour: Crypto md4 allocation error -2

<3>[13857.776084]

<3>[13857.783741] CIFS VFS: Error -2 during NTLM authentication
[Sony Tablet S] abactor_xda:
Hey,

i uploaded md4.tar which contains md4.ko to the OP. try installing that module first, perhaps it will help. I took a look here for that: https://dev.openwrt.org/ticket/10055

good luck.

a
[Sony Tablet S] cthulu:
Cool, that worked. Probably it has to do with the security settings of the samba server.

Do you think it'll be possible to build nfs modules as well? I'd like to see the performance in comparison to samba.
[Sony Tablet S] abactor_xda:
I just uploaded fs.tar.gz to the OP. It contains nfs (as well as fuse, ntfs, cifs. looking at the stock kernel config, it seems that nfs is actually built in, for the client side (though not all the options are built in). Let me know if you want me to compile the client side as a module, the included module should be the server side.

good luck.

a
[Sony Tablet S] cthulu:
You were right, the NFS is built in, no additional modules required for the client. I used terminal to mount, hint is:

do not `mount .... -t nfs ...` but `busybox mount ... -t nfs ...`

cheers
[Sony Tablet S] abactor_xda:
i'm attaching the 4.4.0 version...i'm not sure if this will work or if it's any newer than the version that I uploaded to the OP, but just in case anyone wants to try, here it is.

a
[Sony Tablet S] cthulu:
I'll give a try as soon as my AX88772A will arrive. Hopefully no prob because of A instead of B revision...
[Sony Tablet S] bit-driver:
It is possible to upload a module für utf8 support?
[Sony Tablet S] abactor_xda:
Done! Check the OP for nls_utf8.ko.tar

Enjoy!

a
[Sony Tablet S] bit-driver:
It works, thank you so much :)
[Sony Tablet S] nikor4:
Hi.

Many thanks for your work.

How can i insmod this module?

On rooted tablet I get error: init_module 'axis.ko' failed (Device or resource busy)

with both 4.4 and 4.1 asix compiled versions.

(Rooted tablet 4.0.3a kernel 2.6.39.4 integ-build@duild10#1, SU treminal emulator, chmodded 775 folders and files)
[Sony Tablet S] abactor_xda:
Yeah, I had a feeling this might be problematic, as the asix modules is built-in to the kernel itself (i.e. you shouldn't need to install a modules)...though if it's a version thing, that would be another issue (i.e. the built-in version is let's say 2.0 and you need 4.4, for instance). If you type the command

dmesg

into the terminal right after trying

insmod axis.ko

then you'll likely see something like "Driver "asix" already registered, aborting"

So, one way to get around this is to rebuild the whole kernel with the new version built in, or without any driver built in and just use modules. I'm not a linux expert, but maybe somebody on the dev forum can help you out in trying to "unload" a built-in driver and then load a kernel module...but i have a feeling that you would need to recompile the kernel itself. But before doing that, are you sure the built-in driver doesn't work for your device?

a
[Sony Tablet S] cthulu:
I think I have the same issue. The device doesn't show up in the ifconfig output, so I'm not sure how to configure it.
[Sony Tablet S] cthulu:
I didn't need the axis.ko in the end, just plugged my adapter in, netcfg eth0 up, dchcpd eth0 and it worked.
[Sony Tablet S] minakong:
Cifsmanager on Rooted Xperia Tablet S

Hi, I've gotta Xperia Tablet S Rooted running on kernel build of 2.6.39.4.(Japanese ver.)

I've been trying Cifsmanager to work on my tablet using your modules(cifs.ko, md4.ko, and nls_utf8), and got no good results so far. (It keeps shutting the system down when I try to mount NAS volumes.)

Modules are loaded as I could see them in lsmod command as "live".

Are these modules for Sony Tablet S only? or works on Xperia Tablet S as well?

Please help.

minakong
[Sony Tablet S] abactor_xda:
Hey there,

First, these modules were built from the tablet S sources, as the modules are built with the assumption that other drivers are built-in to the kernel, and I'm using the config from my tablet S, they're really meant for the Tablet S and have not been tested with the xperia tablet.

As the kernel version is the same, the modules should load as you've shown. One issue might have been the dependencies, as the xperia might need special options due to hardware differences, but if it loaded them without complaint that's fine, though no guarantee. I might suggest contacting the 'cifsmanager' app makers/users about debugging your issue, to see if it's a kernel issue and where exactly.

The best bet is to compile the modules yourself on your tablet or cross compile using your config file and xperia sources, then you an be sure it's not a module issue.

Good luck,

A
[Sony Tablet S] nogo8888:
Module for Galaxy Tab

Hi sir can you do usbserial.ko and pl2303.ko for Galaxy Tab (p1000)?

Thanks
[Sony Tablet S] abactor_xda:
I'm afraid I can't. I'm compiling the modules natively on my tablet S, and I think i'd have to cross compile for the galaxy tab. As well, I don't have the sources for it.

Good luck,

A
[Sony Tablet S] tonyalba81:
Hi. You are great and doing a great job. Continue. Big thanks!

Inviato dal mio Sony Tablet S usando XDA Premium HD app
[Sony Tablet S] nogo8888:
hi sir, I would like to compile modules for my device any hints on how should I start?

thanks in advance and happy holidays!

i9100

XXLSJ NeatROM lite v4.0
[Sony Tablet S] nogo8888:
Happy new year 2013 to all.

Greetings from the Philippines
[Sony Tablet S] abactor_xda:
Hi,

First you need a rooted device. Then you need your kernel sources/headers. Then you need a build environment, either native (as in on the device itself, as I'm doing with a debian chroot), or cross compile on another linux box. From there you need your current config.gz from your device and you can use that with menuconfig to select which modules you want to compile. Then you just do: make modules

For each of those steps there are pages of documents on the web written by more competent and knowledgeable people than me. One suggestion, though, use an external keyboard or ssh, it'll make everything easier if you're compiling things natively on the device.

Let me know if you need more help as you progress.

A
[Sony Tablet S] glenn077:
Hello minakong,

i have a rootet Xperia Tablet S to and i have the same problem. If i try to mount a share with cifsmanager the tablet crashes. Did you solved the problem???

I'm very interested in a solution for the problem!!!
[Sony Tablet S] glenn077:
Hello abactor_xda,

i have a rootet Xperia Tablet S. Your cifs and md4 modules didn't work with my tablet. If i try to mount a share with shell or cifsmanager the tablet crashes. I can't find the modules for the xperia tablet at the internet so i have to compile it myself.

Can you tell me step by step how you compiled the modules??? Thanx!
[Sony Tablet S] abactor_xda:
The modules I poated work for sony tablet s kernel version 2.6.39.4, and likely nothing else.

The first step is to find the kernel sources for your device/kernel version.

Let me know when you've found them.

The next steps are broadly found here: http://xdaforums.com/showthread.php?p=36758659

Good luck,

A
[Sony Tablet S] glenn077:
Hello abactor_xda,

i already found the kernel sources for the xperia tablet s at the sony homepage.

So please tell me what to do...
[Sony Tablet S] abactor_xda:
Next you have to set up a debian chroot:

www.mayrhofer.eu.org/debian-on-android

So you'll need a linux box for this and a spare sdcard to dd a filesystem. Let me know if you have any trouble with this.

A
[Sony Tablet S] twfox:
I was able to load the cifs module without issues, and lsmod show that it's active. I still can't get cifsmanager to work, however. I have shares configured the same as another tablet, where cifsmanager works correctly. Any ideas? The error I get is: mount: no such file or directory.

Thanks!
[Sony Tablet S] twfox:
I found out I had to load the md4 library as well. That works, so now to figure out how to get them both to load automatically.