[XPERIA X10 Android Development] munsternet:
Hi again !

This time i've been able to have working modules !

Thanks to SE or releasing the sources :)

OpenVPN works fine, but you'll have to use busybox commands to get it fully working (like pushing routes, ip addresses etc...) on the phone :

tun.ko

# busybox insmod tun.ko
# dmesg | tail
<4>[124575.527499] Enter - streamType=5, status=1
<4>[124575.527514] DHCP ACK received start A2DP
<6>[124596.742040] request_suspend_state: sleep (0->3) at 124595469477917 (2010-
12-10 13:39:53.724178372 UTC)
<4>[124597.335314] save exit: isCheckpointed 1
<3>[124598.390789] ipv6: exports duplicate symbol inet6_unregister_protosw (owne
d by kernel)
<6>[124615.785562] NTFS driver 2.1.29 [Flags: R/O MODULE].
<4>[124618.839527] AR6000 Neighbor Report Event
<4>[124618.839579] bssid 00:1b:2b:36:b9:90
<6>[124629.019680] tun: Universal TUN/TAP device driver, 1.6
<6>[124629.019725] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>

# openvpn client.ovpn
openvpn client.ovpn
Fri Dec 10 14:45:51 2010 OpenVPN 2.1.1 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] bu
ilt on Feb 2 2010
Fri Dec 10 14:45:51 2010 NOTE: OpenVPN 2.1 requires '--script-security 2' or hig
her to call user-defined scripts or executables
Fri Dec 10 14:45:51 2010 WARNING: file '/sdcard/openvpn/herve.key' is group or o
thers accessible
Fri Dec 10 14:45:51 2010 WARNING: file '/sdcard/openvpn/ta.key' is group or othe
rs accessible
Fri Dec 10 14:45:51 2010 Control Channel Authentication: using '/sdcard/openvpn/
ta.key' as a OpenVPN static key file
Fri Dec 10 14:45:51 2010 Outgoing Control Channel Authentication: Using 160 bit
message hash 'SHA1' for HMAC authentication
Fri Dec 10 14:45:51 2010 Incoming Control Channel Authentication: Using 160 bit
message hash 'SHA1' for HMAC authentication
Fri Dec 10 14:45:51 2010 LZO compression initialized
Fri Dec 10 14:45:51 2010 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:
0 EL:0 ]
Fri Dec 10 14:45:56 2010 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:
0 EL:0 AF:3/1 ]
Fri Dec 10 14:45:56 2010 Local Options hash (VER=V4): '504e774e'
Fri Dec 10 14:45:56 2010 Expected Remote Options hash (VER=V4): '14168603'
Fri Dec 10 14:45:56 2010 Socket Buffers: R=[108544->131072] S=[108544->131072]
Fri Dec 10 14:45:56 2010 UDPv4 link local: [undef]
Fri Dec 10 14:45:56 2010 UDPv4 link remote: xxxxxx:53
Fri Dec 10 14:45:57 2010 TLS: Initial packet from xxxxx:53, sid=dc972e04
b776c541
Fri Dec 10 14:45:58 2010 VERIFY OK: depth=1, xxx
Fri Dec 10 14:45:58 2010 VERIFY OK: nsCertType=SERVER
Fri Dec 10 14:45:58 2010 VERIFY OK: depth=0, xxx
Fri Dec 10 14:46:02 2010 Data Channel Encrypt: Cipher 'BF-CBC' initialized with
128 bit key
Fri Dec 10 14:46:02 2010 Data Channel Encrypt: Using 160 bit message hash 'SHA1'
for HMAC authentication
Fri Dec 10 14:46:02 2010 Data Channel Decrypt: Cipher 'BF-CBC' initialized with
128 bit key
Fri Dec 10 14:46:02 2010 Data Channel Decrypt: Using 160 bit message hash 'SHA1'
for HMAC authentication
Fri Dec 10 14:46:02 2010 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES2
56-SHA, 2048 bit RSA
Fri Dec 10 14:46:02 2010 [server] Peer Connection Initiated with xxx:5
3
Fri Dec 10 14:46:04 2010 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Fri Dec 10 14:46:04 2010 PUSH: Received control message: 'PUSH_REPLY,redirect-ga
teway def1 bypass-dhcp,dhcp-option DNS 208.67.222.222,dhcp-option DNS 208.67.220
.220,route xxxx,topology net30,ping 20,ping-restart 120,ifconfig xxxx
xxxx'
Fri Dec 10 14:46:04 2010 Options error: Unrecognized option or missing parameter
(s) in [PUSH-OPTIONS]:4: route (2.1.1)
Fri Dec 10 14:46:04 2010 Options error: Unrecognized option or missing parameter
(s) in [PUSH-OPTIONS]:8: ifconfig (2.1.1)
Fri Dec 10 14:46:04 2010 OPTIONS IMPORT: timers and/or timeouts modified
Fri Dec 10 14:46:04 2010 OPTIONS IMPORT: --ifconfig/up options modified
Fri Dec 10 14:46:04 2010 OPTIONS IMPORT: route options modified
Fri Dec 10 14:46:04 2010 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options
modified
Fri Dec 10 14:46:04 2010 ROUTE default_gateway=xxxxxx
Fri Dec 10 14:46:04 2010 TUN/TAP device tun0 opened
Fri Dec 10 14:46:04 2010 TUN/TAP TX queue length set to 100
Fri Dec 10 14:46:04 2010 NOTE: unable to redirect default gateway -- VPN gateway
parameter (--route-gateway or --ifconfig) is missing
Fri Dec 10 14:46:04 2010 Initialization Sequence Completed

usb-storage.ko

# busybox insmod usb-storage.ko
# dmesg | tail
<4>[126164.376767] DHCP ACK received start A2DP
<4>[126164.377630] Enter - streamType=5, status=1
<4>[126164.377678] DHCP ACK received start A2DP
<4>[126164.378518] Enter - streamType=5, status=1
<4>[126164.378566] DHCP ACK received start A2DP
<4>[126164.379071] Enter - streamType=5, status=1
<4>[126164.379114] DHCP ACK received start A2DP
<6>[126166.806037] Initializing USB Mass Storage driver...
<6>[126166.807757] usbcore: registered new interface driver usb-storage
<6>[126166.807830] USB Mass Storage support registered.

Here are the modules I compiled (I didn't have a chance to test all modules)

- tun.ko

- ntfs.ko (with write support)

- usb-storage.ko

Cheers !