Promo

Short Explanation

Some Linux kernel parts can be configured to be built into the kernel or to be loaded later as a kernel module file. File extension is usually .ko. On Android systems kernel modules usually are located in /system/lib/modules. Kernel modules are configured with a set of tools, the most important are lsmod, insmod and rmmod.

Because kernel modules are dynamically loaded into a running kernel they are very much dependant on the Application Binary Interface (ABI), that's the internal kernel interfaces and structures layout and even the build tools used to build the kernel. The ABI information is stored in the "vermagic" field inside the .ko file. This is used to check the kernel module for compatibility when loading, and this is where the problems start.

It is nearly impossible to create a kernel module that is exactly matching an existing kernel, so the strategy is to build (or get) a working kernel module and then patch the "vermagic" information to make the module load.

Important

If you patch an incompatible kernel module to force it to load, your system will crash!

 

Howto Build a Kernel Module

  • Get matching kernel sources
  • Initialize standard configuration
  • Run make menuconfig and set "PPP support for async serial ports" to be built as module

Please check documentation on the internet for more details about setting up a build environment and starting build commands.

Howto Patch a Pre-built Module

to be continued...

Pre-built Kernel Modules

Phone ROM/Version "vermagic" File Comments
Galaxy Nexus Stock IMM76I 3.0.8-gda6252b
SMP preempt mod_unload ARMv7
ppp_async.ko patch for earlier ICS versions
Galaxy S III Stock IMM76D 3.0.15 SMP preempt mod_unload modversions ARMv7 p2v8 ppp_async.ko  
Stock JRO03C 3.0.31 SMP preempt mod_unload modversions ARMv7 p2v8 ppp_async.ko  
Go to top