I'm running MyROM 1.2 and it doesn't have tun.ko which I need. I tried the installer from google play without success. I'm willing to change ROMS if necessary but I need to know which ones have it already integrated or how to install it. If I have to compile it please give details instructions.
go0 said:
I'm running MyROM 1.2 and it doesn't have tun.ko which I need. I tried the installer from google play without success. I'm willing to change ROMS if necessary but I need to know which ones have it already integrated or how to install it. If I have to compile it please give details instructions.
Click to expand...
Click to collapse
Module must be compiled exactly for your kernel version.
You have to download kernel sources, compile kernel and module, so vermagic of kernel and module will be the same.
I can try to compile this module for you, but you need to provide me content of your /proc/version file for spoof kernel version for verification.
Kostyan_nsk said:
Module must be compiled exactly for your kernel version.
You have to download kernel sources, compile kernel and module, so vermagic of kernel and module will be the same.
I can try to compile this module for you, but you need to provide me content of your /proc/version file for spoof kernel version for verification.
Click to expand...
Click to collapse
Hi Kostyan,
I'm not certain I know where to get the sources from and the next steps to compile the module. Is there a tutorial somewhere?
My /proc/version reads:
Linux version 3.0.8-00370-g3be8d90 ([email protected]) (gcc version 4.7 (GCC) ) #1 SMP PEEMPT Tue Sep 2 13:21:11 CST 2014
Click to expand...
Click to collapse
Create directory for module:
Code:
adb shell
su
mount -o rw,remount /system
cd /system/lib
mkdir modules
exit
exit
Copy module in /system/lib/modules
Set permission 644 for tun.ko
Try to load module:
Code:
adb shell
su
insmod /system/lib/modules/tun.ko
if insmod will fail, get error description by this command:
Code:
dmesg | grep insmod
P.S. All these operations requires full root access.
Related
Now that NI has released Adam kernel sources I have compiled tun.ko module, needed by VPNC and OPENVPN, but it not loads.
I followed this steps.
Obtain kernel sources from repository
git clone KERNEL GIT URL
Obtain config file from my Adam
adb pull /proc/config.gz
gunzip config.gz
Patch config file to include tun module
patch -b -i config.diff -p0 --verbose -Z
Create local build directory
mkdir modules
cd modules
Copy new config file
cp -a ../config .config
Patch Makefile
cp -a ../adam-kernel/Makefile .
patch -b -i Makefile.diff -p0 --verbose -Z
Rebuild tree
lndir ../adam-kernel
rm include/asm-arm
Compile tun module
../compilar_modulos.sh
Push module to Adam
adb push drivers/net/tun.ko /system/lib/modules/
Now, i connect to Adam
$ adb shell
# modprobe tun
modprobe: can't load module tun (tun.ko): invalid module format
#
Comparing the vermagic info from Adam kernel it looks as the processor type does not match:
# busybox modinfo tun
filename: tun.ko
...
...
...
vermagic: 2.6.32.9-00066-g16c1dec-dirty SMP preempt mod_unload modversions ARMv7
# uname -a
Linux localhost 2.6.32.9-00066-g16c1dec-dirty #1 SMP PREEMPT Thu Mar 24 10:03:47 IST 2011 armv7l GNU/Linux
#
Somebody knows what is wrong in my procedure?
Curious, which compiler are you using?
aorth said:
Curious, which compiler are you using?
Click to expand...
Click to collapse
Android NDK R5B.
This is the same compiler I used in the past to compile modules for HTC Hero.
albertogb said:
Android NDK R5B.
This is the same compiler I used in the past to compile modules for HTC Hero.
Click to expand...
Click to collapse
Did you ever get anywhere on this? I was thinking you should look in `dmesg`, as I'm not sure that architecture mismatch is the problem...
whats the progress with this? Any other detailed instructions on how to compile for specific adam kernels?
Hi there!
I hope, this is the correct subforum......
Have anyone installed OpenVPN on the Galaxy S Plus I9001 any have a
good discription for me to do this?
Hope, you can help me!
Thanks for this, maze-m
Q&A section is here, please don't post questions here in development section or they will either not be answered or deleted...
Here's how I did it:
1. Root your phone using KeksFlip's excellent supereasy guide
2. Install Busybox. I used BusyBox Installer by JRummy16 from the Market and installed the latest version in /system/xbin.
3. Install OpenVPN Installer and and OpenVPN Settings from the Market.
4. Run OpenVPN Installer and install into /system/xbin. When it asks you for the location of BusyBox, say /system/xbin/bb
5. Create symlinks of ipconfig and route inside /system/xbin/bb:
a) Enable USB debugging mode (Settings -> Applications -> Development) and connect your phone to your PC via USB. You will need the adb.exe commandline tool form KeksFlip's rooting guide.
b)
Code:
adb remount
adb shell
$ su
# mkdir /system/xbin/bb
# ln -s /system/xbin/ipconfig /system/xbin/bb/ipconfig
# ln -s /system/xbin/route /system/xbin/bb/route
6. Upload your OpenVPN configuration files and keys to your phone and put them in /sdcard/openvpn
7. You will need a TUN kernel driver module. I have attached the one I made for my kernel to this post. If your kernel version is 2.6.35.7-perf, you can use it otherwise you will need a different one. Put the tun.ko file in /sdcard/openvpn.
8. Run OpenVPN Settings and under Menu -> Advanced configure the following:
Code:
- Load tun kernel module ✓
- TUN module settings
- Load module using: insmod
- Path to tun module: /sdcard/openvpn/tun.ko
9. Start your VPN connection
Good luck!
dbx4 said:
Here's how I did it:
1. Root your phone using KeksFlip's excellent supereasy guide
2. Install Busybox. I used BusyBox Installer by JRummy16 from the Market and installed the latest version in /system/xbin.
3. Install OpenVPN Installer and and OpenVPN Settings from the Market.
.........
Good luck!
Click to expand...
Click to collapse
I have samsung Galaxy S Plus phone (firmware I9001XXKPF), I want to build a module tun.
tell me plz the link where to download the source code for kernel 2.6.35.7-perf (androind 2.3.5) to compile the module yourself.
Hi, I rooted my Galaxy S Plus using KeksFlip's guide. I then tried to install OpenVPN dbx4's method. However I got stuck at adb remount:
Code:
D:\temp\adb>adb remount
remount failed: Operation not permitted
D:\temp\adb>adb shell
$ su
su
# mkdir /system/xbin/bb
mkdir /system/xbin/bb
mkdir failed for /system/xbin/bb, Read-only file system
#
Is there anything I'm doing wrong?
Thanks!
You have to remount the system-filesystem on GT-i9001 yourself in adb shell:
mount -o rw,remount -t ext4 /dev/block/mmcblk0p15 /system
When you're done, mount read only again:
mount -o ro,remount -t ext4 /dev/block/mmcblk0p15 /system
Can anyone tell me why the module fails to insert even though it's the same kernel number?
"init_module tun.ko failed (exec format error).
I have the same problem with cifs.ko that is also built for my phone's kernel.
This is in response to this thread in the developers forum.
I have compiled the cifs.ko kernel module for the Droid 3 from the source code for build 5.5.1_84_D3G-20_TA-9 with kernel version 2.6.35.7-g790a33c found here. Slow-work.ko is not needed as it is built into the Droid 3 kernel.
Thanks, did it work for you?
I could insmod your cifs.ko, but the mount errored:
[email protected]_solana:/# insmod /system/lib/modules/cifs.ko
[email protected]_solana:/# busybox mkdir /sdcard/winshares
[email protected]_solana:/# busybox mount -t cifs //192.168.1.3/droid /sdcard/winshares
mount: mounting //192.168.1.3/droid on /sdcard/winshares failed: Invalid argument
Looks like my kernel version is the same: 2.6.35.7-g790a33c, but my Build# is slightly different: 5.5.1_84_D3G-55.
Could it be that?
Total noob question, but I thought we couldn't load cusom kernels with the phone being locked. What gives?
Well, it's only loading a module into the kernel, you can do that once you have root.
I think the mount needs a username. Please add "-o username=guest" to your mount command.
Yes, thanks, that did it. Looks like username is not optional.
do you have the .config from the stock rom?
It was posted here:
http://forum.xda-developers.com/showpost.php?p=17088489&postcount=10
can you provide loop and ext2 ext3 support ko? thanks
Hi
I'm a new owner to a Galaxy tab 8.9 and trying to make it able to mount NFS exports.
So I've rooted the device, installed SuperUser and terminal emulator. Then I downloaded the kernel source tree from Samsung, I compiled the NFS module on my desktop computer moved it to /system/lib/modules on the tab. But it doesn't work, when I do 'insmod nfs.ko' it gives back 'insmod: init_module nfs.ko failed (No such file or directory)'
Is it possible at all to add modules to the standard kernel that comes with the device?
Is my device completely rooted because when I try 'adb root' I get 'adbd cannot run as root in production builds'
me too...
I just encountered the exact same problem on my LG Revolution, except I'm trying to load nfsd.ko for server support.
I know I built it correctly because I've already succeeded in getting tun.ko working properly...
Code:
root # /system/bin/insmod /system/lib/modules/nfsd.ko
insmod: init_module '/system/lib/modules/nfsd.ko' failed (No such file or directory)
root # ls /system/lib/modules
... nfsd.ko
Very odd...
When you do the insmod are you actually in the /system/lib/modules directory? If not, you have to use the full path to the module.
The message with "adb root" is normal even on a rooted device. If you can do "adb shell" followed by "su" you should be ok.
edit...
Now that I think of it...that message usually means the module file was found but a dependency wasn't.
gtj0 said:
Now that I think of it...that message usually means the module file was found but a dependency wasn't.
Click to expand...
Click to collapse
Yep that was my problem. My nfsd.ko needed dependencies that didn't exist...
To the OP: try to insmod the nfs.ko module again and then look at the output of dmesg. You should see messages complaining about the dependencies required by the nfs module.
Then you ought to be able to either remove the requirement for them from your module (my nfsd.ko wanted posix_acl support so I just got rid of that option and rebuilt the module) or if it's something you need/want you might be able to add support for whatever it is as another module...
Good luck and I hope I didn't intrude upon your thread too much
Thanks, I had indeed a dependency problem. Now I managed to load nfs.ko and sunrpc.ko and lockd.ko that were needed because of dependency.
Although I'm still having problems at mounting an nfs export. Previously, before kernel module problem was solved, I got the error message 'No such device' when I tried to mount, now I get 'Invalid argument' instead.
I've tried commands like
busybox mount -t nfs 192.168.1.100:/mnt/raid/media /sdcard/nfs
and
busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.168.1.100:/mnt/raid/media /sdcard/nfs
Any thoughts?
NFS Share - Invalid Argument
Marlin79 said:
........... now I get 'Invalid argument' instead.
I've tried commands like
busybox mount -t nfs 192.168.1.100:/mnt/raid/media /sdcard/nfs
and
busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.168.1.100:/mnt/raid/media /sdcard/nfs
Any thoughts?
Click to expand...
Click to collapse
Seems like an Old thread, and I would assume you've gotten this fixed already, but in case it ISN'T fixed...
>Double check your NFS config (/etc/exports file) and confirm that you are sharing:
* /exports/mnt/raid/media *
If you specified something else in your /etc/exports file, check to make sure your Hard drive (I assume /mnt/raid/media) is soft-linked to the share name you wanted to give it, or that at least the subfolders/files you want shared are softlinked to the /exports/share directory.
**e.g.**
# ln -s /exports/media/ /mnt/raid/media
-OR-
# ln -s /exports/media/shared_media_1.mp4 /mnt/raid/media/actual_file.mp4
Hello,
As i had to Google and ask a lot about how to do this, I'm going to post here an easy and short guide to fixing your tun interface in case OpenVPN connect for example tells you that it failed to create a tun socket. Prerequisites : adb + root access.
First open cmd on Windows or terminal in linux. Navigate to your adb executable directory. Then try the following commands:
Code:
1. adb shell
2. su
3. cd /dev/tun
4. chown system tun
That's it! Now the tun should be working. If your kernel doesn't have tun.ko try TUN.ko installer on android market. It might find you tun.ko module for your kernel. If it doesn't and you are 100% sure your kernel doesn't support it try flashing a new rom with another kernel or recompile your kernel with tun support