[Desire Android Development] Serrano:
Indeed, quoting OpenVPN Connect at Google Play :

More information in the release notes:

If I've understood well, one of the issues is that all your traffic will be tunneled through the VPN, even if you have set explicit routes through other local interfaces.

---------- Post added at 06:07 PM ---------- Previous post was at 05:58 PM ----------

I can't see anything related to the tun driver. A couple of lines such as these should appear right after the driver has been initalized. In this ROM, after loading it via modprobe/insmod:

<6>[ 10.617889] tun: Universal TUN/TAP device driver, 1.6
<6>[ 10.618103] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>

The /dev/tun (or /dev/net/tun) device file should exist, at least after the first connection attempt.

Could you try to get the dmesg log right after issuing modprobe (or insmod)? It could also get automatically loaded as part of the boot process. I took a quick look and didn't find a specific init script for loading the tun driver module in this ROM, but it could have been loaded in some other script pertaining to the boot process.

So:

1. Reboot your phone.

2. Try to issue a modprobe or insmod (better insmod, so we can see if it fails or not because of the tun driver module being already loaded).

3. Check if the tun module is loaded with lsmod.

4. Get the dmseg log (I guess we should see there the module initialization lines and any related issue kernel message).

The strange thing is that you still get the error " tun.ko kernel module is not loaded" after having checked with lsmod that it's indeed loaded ... The only problem with the tun driver module in this ROM (if any), is that it _may_ not be loaded automatically (I haven't thoroughly checked all boot & init scripts, and some kernel modules may be autoloaded when the system tries to open a specific device... anyway this can be solved manually with insmod/modprobe or adding an init script as described before).

Anyway, you may experience additional higher level problems after solving this (see discussion above).

UPDATE: I've tested OpenVPN Connect with a free OpenVPN server (http://www.vpnbook.com/freevpn). Seems that OpenVPN properly connects to the server and performs the authentication, but after that it fails when creating the Tun interface, showing a dialog with the message: Problem creating TUN interface. Possible the tun.ko kernel module is not loaded in your Android kernel.

And the additional error message: Error creating tun interface: cannot acquire tun interface socket.

No apparent kernel issues with the driver in dmesg.

The logcat shows the connection process detail, and the issue at the end when trying to bring up the tun interface.

D/OpenVPNService( 6143): SERV: client attach n_clients=1

D/OpenVPNClientBase( 6143): CLI: submitConnectIntent: 93.115.84.195 [vpnbook-euro1-tcp80]

D/OpenVPNService( 6143): SERV: onStartCommand action=net.openvpn.openvpn.CONNECT

D/OpenVPNService( 6143): SERV: profile file len=3913

D/PrefUtil( 6143): get_boolean: enable_notifications=false

D/PrefUtil( 6143): get_boolean: tun_persist=false

D/PrefUtil( 6143): get_boolean: google_dns_fallback=true

D/PrefUtil( 6143): get_boolean: force_aes_cbc_ciphersuites=true

I/OpenVPNService( 6143): SERV: CONNECT prof=93.115.84.195 [vpnbook-euro1-tcp80] user=vpnbook proxy=undef serv=null proto=adaptive to=60 resp=null epki_alias=null comp=yes

D/PrefUtil( 6143): set_string: autostart_profile_name='93.115.84.195 [vpnbook-euro1-tcp80]'

I/OpenVPNService( 6143): EVENT: CORE_THREAD_ACTIVE

D/PrefUtil( 6143): set_string: profile='93.115.84.195 [vpnbook-euro1-tcp80]'

D/PrefUtil( 6143): get_boolean: auto_keyboard=true

D/OpenVPNService( 6143): SOCKET PROTECT: fd=65 protected status=true

I/OpenVPNService( 6143): LOG: UNUSED OPTIONS

I/OpenVPNService( 6143): 4 [resolv-retry] [infinite]

I/OpenVPNService( 6143): 5 [nobind]

I/OpenVPNService( 6143): 6 [persist-key]

I/OpenVPNService( 6143): 7 [persist-tun]

I/OpenVPNService( 6143): 10 [verb] [3]

I/OpenVPNService( 6143): 12 [fast-io]

I/OpenVPNService( 6143): 13 [pull]

I/OpenVPNService( 6143): 14 [route-delay] [2]

I/OpenVPNService( 6143):

I/OpenVPNService( 6143): LOG: LZO-ASYM init swap=0 asym=0

I/OpenVPNService( 6143): EVENT: RESOLVE

I/OpenVPNService( 6143): LOG: Contacting 93.115.84.195:80 via TCP

I/OpenVPNService( 6143): EVENT: WAIT

I/OpenVPNService( 6143): LOG: Connecting to 93.115.84.195:80 (93.115.84.195) via TCPv4

I/OpenVPNService( 6143): EVENT: CONNECTING

I/OpenVPNService( 6143): LOG: Tunnel Options:V4,dev-type tun,link-mtu 1560,tun-mtu 1500,proto TCPv4_CLIENT,comp-lzo,cipher AES-128-CBC,auth SHA1,keysize 128,key-method 2,tls-client

I/OpenVPNService( 6143): LOG: Creds: Username/Password

I/OpenVPNService( 6143): LOG: Peer Info:

I/OpenVPNService( 6143): IV_GUI_VER=net.openvpn.connect.android 1.1.13-53

I/OpenVPNService( 6143): IV_VER=3.0

I/OpenVPNService( 6143): IV_PLAT=android

I/OpenVPNService( 6143): IV_NCP=1

I/OpenVPNService( 6143): IV_LZO=1

I/OpenVPNService( 6143):

I/OpenVPNService( 6143): LOG: VERIFY OK: depth=1

I/OpenVPNService( 6143): cert. version : 3

I/OpenVPNService( 6143): serial number : A4:6D:A6:3B:08:BD:E9:35

I/OpenVPNService( 6143): issuer name : C=CH, ST=Zurich, L=Zurich, O=vpnbook.com, OU=IT, CN=vpnbook.com, 0x29=vpnbook.com, emailAddress=admin@vpnbook.com

I/OpenVPNService( 6143): subject name : C=CH, ST=Zurich, L=Zurich, O=vpnbook.com, OU=IT, CN=vpnbook.com, 0x29=vpnbook.com, emailAddress=admin@vpnbook.com

I/OpenVPNService( 6143): issued on : 2013-04-24 04:07:48

I/OpenVPNService( 6143): expires on : 2023-04-22 04:07:48

I/OpenVPNService( 6143): signed using : RSA+SHA1

I/OpenVPNService( 6143): RSA key size : 1024 bits

I/OpenVPNService( 6143):

I/OpenVPNService( 6143): LOG: VERIFY OK: depth=0

I/OpenVPNService( 6143): cert. version : 3

I/OpenVPNService( 6143): serial number : 01

I/OpenVPNService( 6143): issuer name : C=CH, ST=Zurich, L=Zurich, O=vpnbook.com, OU=IT, CN=vpnbook.com, 0x29=vpnbook.com, emailAddress=admin@vpnbook.com

I/OpenVPNService( 6143): subject name : C=CH, ST=Zurich, L=Zurich, O=vpnbook.com, OU=IT, CN=vpnbook.com, 0x29=vpnbook.com, emailAddress=admin@vpnbook.com

I/OpenVPNService( 6143): issued on : 2013-04-24 04:07:51

I/OpenVPNService( 6143): expires on : 2023-04-22 04:07:51

I/OpenVPNService( 6143): signed using : RSA+SHA1

I/OpenVPNService( 6143): RSA key size : 1024 bits

I/OpenVPNService( 6143):

I/OpenVPNService( 6143): LOG: SSL Handshake: TLSv1.0/TLS-DHE-RSA-WITH-AES-256-CBC-SHA

I/OpenVPNService( 6143): LOG: Session is ACTIVE

I/OpenVPNService( 6143): EVENT: GET_CONFIG

I/OpenVPNService( 6143): LOG: Sending PUSH_REQUEST to server...

D/OpenVPNService( 6143): BUILDER: add_address 10.12.1.62/30 ipv6=false

I/OpenVPNService( 6143): LOG: OPTIONS:

I/OpenVPNService( 6143): 0 [redirect-gateway]

I/OpenVPNService( 6143): 1 [redirect-gateway] [def1]

I/OpenVPNService( 6143): 2 [dhcp-option] [DNS] [195.60.76.114]

I/OpenVPNService( 6143): 3 [dhcp-option] [DNS] [195.60.76.115]

I/OpenVPNService( 6143): 4 [route] [10.12.0.1]

I/OpenVPNService( 6143): 5 [topology] [net30]

I/OpenVPNService( 6143): 6 [ping] [5]

I/OpenVPNService( 6143): 7 [ping-restart] [30]

I/OpenVPNService( 6143): 8 [ifconfig] [10.12.1.62] [10.12.1.61]

I/OpenVPNService( 6143):

I/OpenVPNService( 6143): LOG: LZO-ASYM init swap=0 asym=0

D/OpenVPNService( 6143): BUILDER: reroute_gw serv=93.115.84.195 serv_ipv6=false ipv4=true ipv6=false flags=275

D/OpenVPNService( 6143): BUILDER: add_dns_server 195.60.76.114 ipv6=false

D/OpenVPNService( 6143): BUILDER: add_dns_server 195.60.76.115 ipv6=false

D/OpenVPNService( 6143): BUILDER: set_remote_address 93.115.84.195 ipv6=false

D/OpenVPNService( 6143): BUILDER: set_session_name 93.115.84.195

D/OpenVPNService( 6143): BUILDER: establish

D/Vpn ( 444): setting state=CONNECTING, reason=establish

D/VpnJni ( 444): Address added on tun0: 10.12.1.62/30

I/OpenVPNService( 6143): EVENT: ASSIGN_IP

D/Vpn ( 444): setting state=FAILED, reason=establish

W/Netd ( 121): No subsystem found in netlink event

W/Netd ( 121): No subsystem found in netlink event

E/NetlinkEvent( 121): Unknown ifindex 14 in RTM_DELADDR

D/NetlinkEvent( 121): Unexpected netlink message. type=0x11

D/OpenVPNService( 6143): BUILDER_ERROR: tun_builder_establish java.lang.IllegalStateException: command '92 interface fwmark rule add tun0' failed with '400 92 Failed to add fwmark rule (No such process)'

I/OpenVPNService( 6143): LOG: TUN Error: cannot acquire tun interface socket

I/OpenVPNService( 6143): EVENT: TUN_IFACE_CREATE info='cannot acquire tun interface socket'

I/OpenVPNService( 6143): EVENT: DISCONNECTED