well. If you now check the duplicate post on the XDA forum's you will see that some one has finally done it, but not provided any docs.
I tried to create an account there to follow up, but for some reason I am not getting the verify email from them, but here it works, so here I will post the step by step that I did to get it working.
First off, I gotta say, the modaco 2.2 rom for my HTC hero is great. Oh... and keep tun.ko present. its used with this.
2ndly, this is my first post, and hope it helps some one, feed back in thread would be nice.
... ok on with the openVPN.
Firstly I will describe that what I did with what tools/equip, so no assurances it will work on others the same way. TRY AT OWN RISK!!!! Lots of typing, no gui to start it up yet.
version of software OS used:
Android HTC Hero Build number 2.73.405.5 146733 (MCR2.2e)
Android system recover boot loader Build: CyanogenMod v1.4 + JF
(what ever android terminal program you prefer, I use connectbot)
PC - Asus 900 EEE (winXP)
Andriod SDK 1.5r3 (for ADB)
OpenVPN server - Astaro 7.4 home license. (I only have a wireless router in open access, connected in the DMZ port. Only way to connect internally is via OpenVPN [ssl] client - this is installed and confirmed working on my XP client - This is important as we will be using files from this install)
from the site:
http://github.com/fr...envpn/downloads
down load the file openvpn-android-2.1.tar.bz2 and up zip it some where. (location used in step 3)
Step 1 - Take back and secure externally - optional, but always a good idea.
Step 2 - Reboot phone into recovery mode.
Powerdown Android. Power up holding Home and Power until recovery screen is displayed.
Have USB cable connected
Step 3 - Perform the following bold text commands at a command prompt
ADB shell mount /system
ADB shell
cd /system/lib
cp libcrypto.so libcrypto-orig.so
cp libssl.so libssl-orig.so
These last 2 entries are just a 2ndary backup. you can skip if you like
exit
From the unzipped fries download find all the files (should be 5 in total) and do
adb push libcrypto.so /system/lib/
adb push liblzo.so /system/lib/
adb push libssl.so /system/lib/
adb push openssl /system/bin/
adb push openvpn /system/bin/
adb shell chmod 4755 /system/bin/openssl
adb shell chmod 4755 /system/bin/openvpn
These last 2 commands I added at the time, but I am unsure if they are actually needed.
Now for some reason (as I spent 8 hours working all this out) the openvpn client doesn't have the correct path to the busy box tools, and tries to use /system/xbin/bb/ifconfig and route commands. on my Hero, this path doesn't exist its just /system/xbin/ifconfig. rather than stuff around trying to debug this, I instead did the following commands.
adb shell
cd /system/xbin
ln -s /system/xbin /system/xbin/bb
exit
if before you exit, you do a ls of bb you should see the same directory listing as xbin.
reboot back to the hero.
Step 4 - copy over the vpn config files
now, you will need your open ssl vpn/certs/etc, and since I know my openvpn client on my XP works, I use those. from the local PC (for the Astaro installation) C:\Program Files\Astaro\Astaro SSL VPN Client\config\<whatever>\* (should be 2 .crt files, 1 .key file, and 1 .ovpn file). Copy these over to your android all in the same place, I used /sdcard and copied them via USBmount process. keep them in the same location
Step 5 - Create the username/password file
Yeah, I dont like storing passwords in clear text, but I still havent figured out how to prompt for the password
create a text file (using what ever method you prefer) with your openvpn user name on the first line, and your openvpn password on the second line. save it in the same location as step 4 on your android and note down the name.
Step 6 - Edit the ovpn file on your Android.
I am not sure if this is needed, but through my 8 hours of trying to get this to work, I made this change.
Find the line and change it so that it reads (you may need to remove comment characters).
dev-node /dev/tun
Save this change.
You can unplug the USB cable now (to insure no false positives occur)
Step 7 - start your network connection on your Android
This can be your wireless, or your roaming data. your choice. Just try to remember, this should be the same way your vpn is known to work with your config file from earlier (ie, if you use astaro VPN via public internet - use roaming, if you are connecting via DMZ/private subnet - use wireless).
Step 8 - Open the android console for starting up the VPN
I use connectbot in local mode, but its your choice. Now at this point, I am going to do things the long way (short way is you should be able to figure out) to show one of the errors and how to fix it.
peform the following bolded commands.
su -
cd /sdcard
or cd to where ever you stored your certs/key/ovpn and password file.
openvpn --config <yourconfigfilename>.ovpn --auth-user-pass <your password file filename>
for me this resulted in error:
<date/time> Cannot open TUN/TAP dev /dev/tun: no such file or directory (errno=2)
To fix this enter the following command
insmod /system/lib/modules/tun.ko
Then try this command again
openvpn --config <yourconfigfilename>.ovpn --auth-user-pass <your password file filename>
This then results in a success message (and for some reason no return to command prompt) of:
Mon Sep 28 23:52:14 2009 TUN/TAP device tun0 opened
Mon Sep 28 23:52:14 2009 TUN/TAP TX queue length set to 100
Mon Sep 28 23:52:14 2009 /system/xbin/bb/ifconfig tun0 10.242.2.6 pointopoint 10.242.2.5 mtu 1500
Mon Sep 28 23:52:14 2009 /system/xbin/bb/route add -net 10.242.2.1 netmask 255.255.255.255 gw 10.242.2.5
Mon Sep 28 23:52:14 2009 /system/xbin/bb/route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.242.2.5
Mon Sep 28 23:52:14 2009 Initialization Sequence Completed
As you can see above, it tries to use the xbin/bb path... dont know why.
To test this, I used AndroidVNC to remote control one of my internal Guest VM's I used for development. This worked perfectly.
This concludes the 8 step program..
Now if only some one would (a) write a nice app/GUI front end for this to save the typing, and (b) write a nice GUI app to allow you to set the proxy for browsing. So far I havnt found any such free app in the store, but I only have had my HTC Hero for under 5 weeks.
- Randy