Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I currently have a custom kernel and ROM installed on my android device. The kernel I'm using comes with a separate download with kernel modules that you are to install yourself if you want. However no instructions are given on how to do it, also I cannot find any tutorial on-line how to do it.

So I have a bunch of .ko files, Android SDK and my rooted android device. How do I install these kernel modules?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Use adb to push them to /system/lib/modules, then reboot. Android should load them at boot as long as they're in that directory, I believe.

shell> adb push module.ko /system/lib/modules/
shell> adb reboot

If you get a "read-only filesystem" error then remount /system as read/write first, then push them. Usually you can do this with adb remount. You could probably also put them onto an SD card and then use a file manager to copy them over if you want.

You can also use insmod to manually load a module into the kernel at runtime, but it wouldn't be reloaded if you reboot. This would allow you to skip the initial reboot, though, since you should be able to insmod all of the modules after you push them onto the device.

share|improve this answer
    
I don't have the folder /system/lib/modules/ is it ok to create it or does that mean the modules might be loaded elsewhere? –  Brady Sep 15 '11 at 16:44
    
I've tried creating the folder modules and putting a module in there and rebooted and the module hasn't loaded. The module only seems to work if I insmod it. –  Brady Sep 15 '11 at 16:59
1  
@Brady: Hm, haven't seen that one before. I suppose you could add a bunch of insmod statements to your /init.rc, though that's kind of ugly. What kind of device is this? –  eldarerathis Sep 15 '11 at 17:26
    
galaxy tab 10.1 16GB wifi. I don't mind editing init.rc. If I am though do I simply edit init.rc in a text editor and at the end add: insmod /path/to/module.ko? –  Brady Sep 15 '11 at 17:29
    
@Brady: That should be all you need to do, as far as I know. Here's a mailing list reference where someone mentions it (he also apparently couldn't get it to work when the modules were in /etc for some reason, but he says /lib/modules was fine). –  eldarerathis Sep 15 '11 at 17:38
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.