Skip to main content


Showing posts from June, 2011

Compiling tun.ko for Android - OpenVPN

I have a Xoom, and a Galaxy S, and need to be able to compile my own tun.ko for the kernel version I have. As you all know, if the kernel version of the module you are trying to insert isn't the same, it won't insert, and will give you errors like:

<3>[95175.874872] tun: version magic ' SMP preempt mod_unload ARMv7 ' should be ' SMP preempt mod_unload ARMv7 '

in dmesg. We need to compile the module for the right version of the kernel

Download the Kernel source - normally from The Xoom can be found at, and the Galaxy S can be found at Use

$ pwd
$ git clone to clone the Xoom kernel sourceCopy your old kernel config from your device

$ pwd
$ adb pull /proc/config.gz
$ gunzip config.gz
$ mv config.gz tegr…