Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
riverzhou
Old
#1  
Senior Member - OP
Thanks Meter 62
Posts: 193
Join Date: Dec 2006
Location: Shanghai

 
DONATE TO ME
Default [drivers] cifs and tun

They passed the test on my KindleFire.
Let me know if they work fine on your device.
Attached Files
File Type: zip mod.zip - [Click for QR Code] (1.46 MB, 1514 views)
The Following 5 Users Say Thank You to riverzhou For This Useful Post: [ Click to Expand ]
 
Ectoplasmic
Old
#2  
Senior Member
Thanks Meter 43
Posts: 187
Join Date: Dec 2011
Thanks! I have this working partially. So far I can mount my remote share from ADB. Still trying to get CifsManager to work. I'll post my notes when I have it all figured out.
 
damianarnold
Old
#3  
Senior Member
Thanks Meter 18
Posts: 212
Join Date: Feb 2008
Quote:
Originally Posted by riverzhou View Post
They passed the test on my KindleFire.
Let me know if they work fine on your device.
I couldn't get tun.ko to establish a VPN connection, the module loads fine but nothing
 
SwingBlade
Old
#4  
Member
Thanks Meter 5
Posts: 32
Join Date: Aug 2008
How fortunate that this comes up the day I'm looking into OpenVPN for my KF! Could I get a little assistance in setting this up? Would I need to install these drivers before OpenVPN and, if so, how?
 
riverzhou
Old
#5  
Senior Member - OP
Thanks Meter 62
Posts: 193
Join Date: Dec 2006
Location: Shanghai

 
DONATE TO ME
Quote:
Originally Posted by damianarnold View Post
I couldn't get tun.ko to establish a VPN connection, the module loads fine but nothing
Are you using openvpn ?

After the driver insmoded ,you will find a file named tun in /dev/ .

Maybe you need a guild about openvpn on android.
 
riverzhou
Old
(Last edited by riverzhou; 18th December 2011 at 02:00 AM.)
#6  
Senior Member - OP
Thanks Meter 62
Posts: 193
Join Date: Dec 2006
Location: Shanghai

 
DONATE TO ME
Quote:
Originally Posted by SwingBlade View Post
How fortunate that this comes up the day I'm looking into OpenVPN for my KF! Could I get a little assistance in setting this up? Would I need to install these drivers before OpenVPN and, if so, how?
I do not use OpenVpn. I have tested the driver by a tool written myself, the tun.ko work fine.
I think you can find a guild about OpenVpn on Android from google.

A difference between android and linux is , the devices file is /dev/tun in Androind and is /dev/net/tun in Linux.
 
Ectoplasmic
Old
#7  
Senior Member
Thanks Meter 43
Posts: 187
Join Date: Dec 2011
Cifs.ko works great with CifsManager:
http://forum.xda-developers.com/show....php?t=1397461
 
alchemyst
Old
(Last edited by alchemyst; 18th December 2011 at 04:32 AM.)
#8  
Member
Thanks Meter 5
Posts: 58
Join Date: Nov 2008
Couldnt get OpenVPN working either, but dont know if its because of the tun.ko

It just goes from auth to 'get config' and doesnt connect. I cant get logcat working on my device for some reason to check the logs.

Tell a lie, gotthe logs, telling me EXITING, auth-failure

Definitely right user/pass
 
riverzhou
Old
(Last edited by riverzhou; 18th December 2011 at 06:33 AM.)
#9  
Senior Member - OP
Thanks Meter 62
Posts: 193
Join Date: Dec 2006
Location: Shanghai

 
DONATE TO ME
Quote:
Originally Posted by alchemyst View Post
Couldnt get OpenVPN working either, but dont know if its because of the tun.ko

It just goes from auth to 'get config' and doesnt connect. I cant get logcat working on my device for some reason to check the logs.

Tell a lie, gotthe logs, telling me EXITING, auth-failure

Definitely right user/pass
/data/local/tmp # insmod tun.ko

/data/local/tmp # dmesg |tail -n5
[13042.453582] TIWLAN: 3276.841719: connInfra , CONSOLE:****************************************
[13042.464141] TIWLAN: 3276.852248: ****************************************
[13053.277160] tiwlan0: no IPv6 routers present
[13083.014495] tun: Universal TUN/TAP device driver, 1.6
[13083.019775] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>

/data/local/tmp # ls /dev/tun -l
crw-r----- 1 1016 1016 10, 200 Dec 18 06:16 /dev/tun

/data/local/tmp # ./testtun
tun_name is icevpn. tun_fd is: 3

tun_setip interface icevpn ip 192.168.0.2 netmask 255.255.255.0 MTU 1460 TXQ 1000

TUN_FD 3

tun_read , len is 84

tun_read , len is 84

tun_read , len is 84

tun_read , len is 84

tun_read , len is 84

tun_read , len is 84


After testtun start,in another ssh console:

/data # ifconfig
icevpn Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.0.2 P-t-P:192.168.0.2 Mask:255.255.255.0
UP POINTOPOINT RUNNING MTU:1460 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:13002 errors:0 dropped:0 overruns:0 frame:0
TX packets:13002 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3484632 (3.3 MiB) TX bytes:3484632 (3.3 MiB)

tiwlan0 Link encap:Ethernet HWaddr F0:A2:258A:48
inet addr:192.168.1.108 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::f2a2:25ff:fed8:da48/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:28903 errors:0 dropped:0 overruns:0 frame:0
TX packets:27964 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:8814147 (8.4 MiB) TX bytes:1956943 (1.8 MiB)

/data # ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
^C
--- 192.168.0.1 ping statistics ---
8 packets transmitted, 0 packets received, 100% packet loss


/data # ifconfig
icevpn Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.0.2 P-t-P:192.168.0.2 Mask:255.255.255.0
UP POINTOPOINT RUNNING MTU:1460 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:672 (672.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:13002 errors:0 dropped:0 overruns:0 frame:0
TX packets:13002 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3484632 (3.3 MiB) TX bytes:3484632 (3.3 MiB)

tiwlan0 Link encap:Ethernet HWaddr F0:A2:258A:48
inet addr:192.168.1.108 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::f2a2:25ff:fed8:da48/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29136 errors:0 dropped:0 overruns:0 frame:0
TX packets:28105 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:8859490 (8.4 MiB) TX bytes:1996726 (1.9 MiB)



So, I think it's the problem of OpenVpn setting.
Attached Files
File Type: zip testtun.zip - [Click for QR Code] (6.2 KB, 28 views)
 
damianarnold
Old
#10  
Senior Member
Thanks Meter 18
Posts: 212
Join Date: Feb 2008
Update, changed from OpenVPN to one of the others and it works fine, many thanks RiverZhou!

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Nandroid Manager Receives Major Update

Do you find yourself obsessively jumping from ROM to ROM? And do you hate having to restore a full … more

Careers in Android: Recruiter Reveals How Resumes are Chosen – XDA Developer TV

XDA Developer TV Producer Jayce released a video a … more

HttpClient Tutorial to Upload and Download with Your App

Developers wanting to interact with the Internet need to choose a package to do the … more

Profile Flow: A Tasker Alternative

By now, we’re all quite familiar with Tasker, the personal automation app that seems to be able to … more