[Q] OpenVPN on Motorola Droid 2 2.2 - Android

To make a long story short, here's the info:
Motorola Droid 2
Droid 2.2.20
Kernel 2.6.32.9g59f0395
OpenVPN is installed using the OpenVPN installer on market place, trying launch the VPN connection via the app OpenVPN settings (also on market place). I'm using this method because the error messages on this app are more verbose than other methods.
Problem I'm having is that when trying to connect, I get an error message stating "Fatal: Unable to allocate tun/tap dev dynamically." I've done a ton of scouring on forums and others have been able to get around this problem on versions 2.1 and prior by changing the version of the tun.ko module that they use or adjusting permissions on the directories. I've tried every combination of tun.ko module out on the net with permissions, methods, and the whole shebang. Nothing I try has been able to get around this error message. Presently, the tun.ko file is located in /system/lib/modules. Running insmod tun.ko manually returns the error "insmod: init_module 'tun.ko' failed (Exec format error).
I've dug through the forums on this error as well and all remedies I've come across seem to be for 2.1 and prior (tried them anyway). Do I simply need to recompile the tun.ko module on my own? I suspect that my headache is caused by this module running in a unsupported kernel. Any help would be appreciated.

Related

[Q] xperia x10 cifs

I want to mount some cifs or even better nfs mounts. I Found the cool cifs app, but I'm having no luck loading the cifs driver.
I have a rooted x10a
firmware 1.6
Kernel 2.6.29-rel semc-android semc 2
Build r1fa014
so what do I have to do? I have looked high and low for a x10 cifs.ko, and tried a ton of others with the app and insmod. Do I need to upgrde the kernel? build?
Current links to what I have to do would be apreciated.
Thanks
check the kernel compiling topic, I posted cifs kernel module for X10 there.
Thanks for the info
I have found your main post: # 716360, Compiling X10 kernel sources.
And I have downloaded your cifs.zip, put it on my x10. I can insmod or use the cifsmanager gui to load the module, and it appears to be running with no errors, lsmod even shows it.
But when I go to mount I still get the "No Such Device" error. Do i need to upgrade my phone first from the above specs?
I don't want to hijack the other post, so ill reply here.
Thanks
bango123 said:
Thanks for the info
I have found your main post: # 716360, Compiling X10 kernel sources.
And I have downloaded your cifs.zip, put it on my x10. I can insmod or use the cifsmanager gui to load the module, and it appears to be running with no errors, lsmod even shows it.
But when I go to mount I still get the "No Such Device" error. Do i need to upgrade my phone first from the above specs?
I don't want to hijack the other post, so ill reply here.
Thanks
Click to expand...
Click to collapse
use the same command line i used on the kernel topic,
also the destination directory must exists.
last but not least, busybox mount instead of the native android mount
if you succeed, please provide compiled module
After some work, I got it to work, and in the end it was not to complicated at all.
1. Get the CIFS module (driver) for the X10, I have attached a copy I am now using for version 1.6. It was compiled by alx5962 and put on these forums in another thread "Compiling X10 kernel sources". There is more info there. I just added "X10" to the name of his file to avoid confusion and posted it here in case of a search engine brought others here for help.
Unpack and save the file somewhere on your SD card, write down where it is at.
2. Install the CIFS Manager from apps, it will need root access to load the cifs module ("Superuser Permissions" app manages this very well), there is lots of info and this is a easy fix. Should be easy to find.
In settings:
Check "Load cifs module"
Check "Load via insmod"
the under path point it to where you saves the cifs modile (something like /sdcard/cifsx10/cifs.ko)
Then setup your share, for example:
Share Path:
192.168.0.1/Share
Mount Point:
/mnt/cifs/Share
Username"
me
Password:
mepassword
Don't worry about any of the options
And that should do it. I did try the command line mounting in the shell, that worked well too, I even made some scripts with a script app. But the CIFS Manager once i figured out my problem(read my note below), worked very well and very easy.
*NOTE* My big problem was an error when mounting "invalid argument". What I found is even if I have the share open to anyone with no password, it will spit out an error if you leave the username and password blank. I just put in "me" and "pw" (or anything really) and i was up and running in one foul swoop!
can i ask what is the point to all this?
mootmaina said:
can i ask what is the point to all this?
Click to expand...
Click to collapse
CIFS also called SMB is the network file sharing used by windows mostly, this would then let you share a folder on you sdcard over you wifi to your home pc leting you copy files to and from your phone without connectinig USB
I haven't tried to share any folders on the sdcard, but I use it to mount shares that are on the network on my pc. ES File Explorer is a nice app to browse the network, but some files wont open well using this.
My main use is to play media, mainly DIVX movies that are stored on my pc. By mounting a share on cifs ( smb - samba, or windows file sharing, both more or less same thing) I can open my DIVX movies with rockplayer and they play like a charm. I have heard of some other apps that have the same issue.
But now I can have access to all of my media stuff when i want.
you can also use webdrive - windows program for mounting ssh filesystems, and launch ssh daemon on android.
Anyone tried this on 2.1? Do we need a new cifs.ko?
Bump.
Anyone got any info on cifs and 2.1? Id like to upgrade but don't want to lose this use.
[sorry] Bump [/sorry]
I tries some of the cifs.ko files i found trying to use the same kernel version (2.6.29), but insmod gave me errors.
Please, if anyone found a working version of cifs.ko for X10 2.1 kernel, post it - or give us a hint ...
(yes i know, compiling it myself would be a way, ... - i promise i will try, but why reinvent the wheel?)
THANKS,
Bax
Bumpito
Still no news about the new cifs.ko ?
Thanks !
Sony Ericsson haven't released the sources for 2.1 yet, so no "cifs.ko" until then. (It seems SE are breaking the GPL license by not releasing their Linux kernel source code)
And is there a way without using cifs.to to play files (such as mp3 or avi) directly from a samba share on 2.1 or we have to wait ?
Bump
Anyone have any luck with 2.1 yet?
hhave we gotten this yet?
cifs.ko experia x10 2.1 rooted
dutchschultz said:
hhave we gotten this yet?
Click to expand...
Click to collapse
In this thread,
http://forum.xda-developers.com/showthread.php?t=716360&highlight=cifs&page=12
Many thanks to alx5962
goto page 1 for instruction, or just use cifsmanager for market

Archos 70IT OpenVPN Connection Issues

I'm in China, so a VPN is a mission critical kind of thing to get working on my tablet. I've installed the OpenVpn Settings/OpenVPN Installer from the Android Market and loaded all my certs and such. The connection will reach "Get Config" then throw an error. The error code is FATAL: Cannot Allocate Tap/Tun dev Dynamically. I've tried checking off the load tun kernel setting, i've tried the tun load using modprobe and insmod but it keeps throwing the same error code. I've done plenty of google searching but I can't find any sort of good instruction on how to fix this issue. I've even done a complete format of my system, then rerooted and reloaded the firmware and kernel but the error persists. I'm just about at wit's end and I was hoping that someone wiser than me in the lore of how open vpn's connect could help me out. Now that i've modded this tablet I think it's a fantastic deal for the amount that I paid for it but it would be heart breaking if I can't ever get Pandora radio working on it... any replies would be appreciated.

[Q] Has anyone compiled a tun.ko module for the EVO 3D yet?

I did some research and found that a linux box is required to compile a tun.ko module. I don't have access to a linux box that I can try this on. Has anyone else already done this or willing to do this? My kernel version is 2.6.35.10-gcb1cf83. Thanks in advance for any help you can provide.
megatron-g1 said:
I did some research and found that a linux box is required to compile a tun.ko module. I don't have access to a linux box that I can try this on. Has anyone else already done this or willing to do this? My kernel version is 2.6.35.10-gcb1cf83. Thanks in advance for any help you can provide.
Click to expand...
Click to collapse
great question. to respond to your first statement, a linux "box" is not required to compile a tun.ko module, but a linux OS is. if you had a windows box, you could run a VM of linux and compile a tun.ko module in the VM (virtualbox is free and ubuntu is popular and free distro of linux).
responding to the 2nd part, modules will need to match the kernel and it is generally easier to compile specific modules once proper kernel source has been released by the manufacturer. after HTC releases the kernel source for the evo 3d, i'm sure a few tun.ko modules will be compiled and posted.
if you wanted to compile a tun.ko module for the evo 3d and didn't want to wait for official kernel source to be released, it might take a bit more effort and tweaking, but definitely possible. i haven't seen any posted, but i could be wrong and hopefully somebody else can post up.
hopefully that gives a better picture and we are all hoping kernel source is released by htc soon!
I compiled it for my phone and insmod works...I just haven't had a chance to do anything with it yet. Let me know if this works for you.
Sent from my PG86100 using XDA App
Haven't figured out how it attach a file from my phone....will attach it later.
Sent from my PG86100 using XDA App
here ya go...just quickly tested it w/ vpnc and it works perfectly on my evo 3d.
OpenVPN works on EVO 3D
I used the tun.ko file provided by dethmetaljeff, combined with the EVO 4G instructions at http://forum.xda-developers.com/showthread.php?t=883021 and was able to get OpenVPN working on my 3D.
tun.ko build
Can someone build for version magic 2.6.35.13-g84f8edd
Thanks
if someone can tell me how to I will.
dethmetaljeff said:
here ya go...just quickly tested it w/ vpnc and it works perfectly on my evo 3d.
Click to expand...
Click to collapse
Where did you install the module to get vpnc to work? I just installed it, no problem in /system/lib/modules but VPNC gives the following errors:
Error: root access missing!
Error: no access to TUN device!
Error: TUN device missing!
I do have root access, all other root apps work without issue so I'm guessing it's claiming that because it can't access some directory.
Any help is very much appreciated, Thanks.
EDIT: Apparently I had not ran busybox installer yet, weird that didn't keep other things from working. Anyway, I get no errors when checking pre-requisites anymore.
In case it helps anyone out, i've posted the tun.ko module for the Stock UK GSM ROM (2.6.35.13) over at http://forum.xda-developers.com/showthread.php?t=1248842, along with an outline of the process and some useful links
+1 to the 2.6.35.13-g84f8edd tun module request. Or if you have instructions or where to find instructions to compile it, I am willing to give it a try and then share.
+1 to request for tun.ko supporting g84f8edd. I tried the ones by dalgibbard and synergy, but neither worked. I might try a hex editor to see if I can locate the kernel label in dlgibbard's tun.ko. Too lazy to install ubuntu and go through the compiler process. I did have OpenVPN running before unrooting and taking the hboot 1.5 update (had problems with hdmi).
I edited the tun.ko file created by dalgibbard with a hex editor to replace the kernel version with g84f8edd and after some route editing, OpenVPN worked. The steps were:
HTCDev to unlock evo 3d (hboot 1.5, 2.3.4, 2.6.35.13-g84f8edd)
fastboot Recovery with Clockworkmod 4.0.1.4
flash su-2.3.6.3-efgh-signed.zip
installed super manager
copied tun.ko to /system/lib/modules
created /sdcard/openvpn folder
copied crt, ovpn, and key files
installed busybox
installed openvpn installer
installed openvpn settings
bypassed the iproute-wrapper.sh steps
configured openvpn settings
load tun kernel checked
changed load using to insmod
path to tun /system/lib/modules/tun.ko
started openvpn and selected the config file
THEN
used adb shell and typed
ifconfig tun0 IPADDRESS netmask MASK
ip route (to see if tun0 had a new route added. I was using wifi as default so that it didn't use the vpn for all traffic, only for the intranet)
After that everything for my intranet was accessible. I had problems with the iproute-wrapper.sh hanging the openvpn startup, so I skipped it but still selected the Fix HTC Routes. Regardless, I still had to do the ifconfig step. I did a "netcfg" prior to the ifconfig and saw tun0 was still down with no address. After ifconfig, tun0 was up and had the address and the route was added to the wifi route.
tun.ko file attached.
Found a replacement file for OpenVPN to eliminate the need to do the adb shell steps.
Extract the OpenVPN file from the attached zip file and copy it into your /system/xbin folder. (I used Super Manager)
Be sure to change the security to 755 (in Super Manager, just highlight the file, select the 777 icon from the bottom list, and make sure you have checkmarks across the top-Owner).

[Q] OpenVPN problem with Pershoot's Kernel and "In Paris" v4 by Task650&Phantom

[Q] OpenVPN problem with Pershoot's Kernel and "In Paris" v4 by Task650&Phantom
So I've been having trouble getting openvpn up and running on my tab (p7510 version)
I've installed both the openvpn binary installer and the settings apps fine.
I know my certificates/key/conf are correct as I've tested them elsewhere.
When I try to connect I get the following error:
"FATAL:Cannot allocate TUN/TAP dev dynamically"
I was advised to reflash the latest kernel from Oct 18th and adb push tun.ko from pershoot's lib-2636.4.tar.gz file to /system/lib. That didn't work.
I managed to temporarily avoid it by using adb shell "insmod tun.ko". However every time I reboot the device it comes back because the module isn't loaded again.
Now, I get this error:
"FATAL:Linux ifconfig failed: external program for failed"
Which I cannot figure out how to solve.
Has anyone had these problems before while trying to set this up?
I am using "In Paris" v4 from Task650 & Phantom, and Pershoot's kernel from Oct 18th.
Any help would be appreciated
I'm using VPNC Widget rather than OpenVPN, but the tun.ko needs to be put in "/data/local/modules" then "insmod /data/local/modules/tun.ko" and it survives a reboot.
morkli said:
I'm using VPNC Widget rather than OpenVPN, but the tun.ko needs to be put in "/data/local/modules" then "insmod /data/local/modules/tun.ko" and it survives a reboot.
Click to expand...
Click to collapse
Thanks for the reply, but it didn't seem to work for me. I pushed the same tun.ko to that folder and issued insmod but it didn't stay after reboot.

[HELP] tun.ko - Module

Hi,
i have a Galaxy Ace with Gingerbread 2.3.3 and i would like to use Cisco VPN at my Phone.
When i start this App it appears a message
"This device does not meet the minimum requirements to run this Software. A TUN/TAP driver could not be located. Please ensure a TUN/TAP module is compiled with your kernel or located in /data/local/kernel_modules"
I copied this (http://forum.xda-developers.com/showthread.php?t=1207952) tun.ko into /data/local/kernel_modules and i tried insmod tun.ko but it appears the message:
"insmod: init_module 'tun.ko' failed (Exec format error)"
When i trie modprobe tun it appears the folowing Message:
"modprobe: chdir(2.6.35.7-perf-CL4846464): No such file or directory"
Can some help me to install/insert this module so that i can use Cisco VPN ?
flash this
http://www.multiupload.com/S1RZLFLKLM
thx, but first I want to have the orginal-firmware on my SD-Card if it don´t work so that i can recover it to factory state.
Can you give me a download-link to the orginal-firmware ? (Gingerbread 2.3.3)
I looked at the official Homepage but i didn´t found anything.
Go to Sammobile.com to get firmware.
U need to flash CFroot to get tun.ko function.
THX its working !

Categories

Resources