Friday, March 12, 2010

tethering droid to ubuntu hardy

I don't know why nowhere on the web I can find this information. For the record, here are the steps:
  1. Download azilink from http://code.google.com/p/azilink/. There are two files: the apk file and the zip file. Apk is to be downloaded on the phone. The zip file is to be downloaded to the Linux host.


  2. Install openvpn on linux

  3. % sudo apt-get install openvpn


  4. Install adb on linux, if you haven't done so. Go to android sdk download page, download the one for linux, then extract the executable named adb.

  5. Unpack azilink.zip. You'll need just one file, azilink.ovpn. Edit this file and add the following line

    proto tcp-client


    The overall file should look something like below:


    dev tun

    proto tcp-client
    remote 127.0.0.1 41927 tcp-client
    ifconfig 192.168.56.2 192.168.56.1
    route 0.0.0.0 128.0.0.0
    route 128.0.0.0 128.0.0.0
    socket-flags TCP_NODELAY
    #keepalive 10 30
    ping 10
    dhcp-option DNS 192.168.56.1


  6. Start azilink on the phone. It's an icon that looks like a small moth. Check "Service active" checkbox.

  7. On linux, issue the following commands:


    % adb forward tcp:41927 tcp:41927
    % rm /etc/resolv.conf
    % echo "nameserver 192.168.56.1" >xxx
    % sudo cp xxx /etc/resolv.conf
    % sudo openvpn azilink.ovpn


Saturday, February 16, 2008