This guide explains how to tether your android phone to a OSX machine over USB. It supports Android 1.5 Cupcake. I have only tested this on an Android Development phone (HTC Magic aka Google Ion), but it should work on others.

UPDATE 1/21/10: Confirms works on Nexus One.

This guide assumes several things. You must have macports, be able to install apps on your phone (IE android SDK), be familiar with the terminal, and be aware what your cell carrier’s position on tethering is.

Lets get started.

  1. Install the openvpn port for OSX:
    sudo port install openvpn2

    This may take a while depending on your connection speed and processor speed. It will build several dependencies, including openvpn2.

  2. Download AziLink:
  3. Install AziLink to your phone:
    with the sdk installed:

    adb install azilink.apk

    or on the phone:

  4. Enable USB debugging on the phone. From the home screen, this is under Settings>Applications>Development>USB debugging.
  5. Install the Android USB driver (if you don’t already have one installed). See for more information. The driver is included in the ADB download if you don’t want to get the full SDK.
  6. Create a script (I called it androidtether) and make it executable:
    touch androidtether
    chmod 755 androidtether
  7. copy bash script from into that file
    This file (credited below) will take care of all the setup and tear down of the tethering
  8. On the phone, run AziLink and make sure “Service active” is checked.
  9. run the script
  10. If all goes well, you are now tethered! AziLink should have a connected status and network stats should start flowing.
    And yes, it does work, I am posting from a tethered MacBook Pro!
  11. When you are done, hit contrl+c and the tear down will be triggered

Problems and Notes

  • I had a problem running the script, I got this error message:
    Cannot allocate TUN/TAP dev dynamically

    There are many theories about why this happens. The range from co-installation of Cisco VPN to faulty TUN/TAP drivers. I fixed it by simply installing tunnelblick ( I think it included some helpful drivers.

  • If you do a network connect/disconnect/switch on the computer or phone (ie wifi to 3G, ethernet to wifi). You must restart all the services.
  • This is NOT a secured connection, the above does not utilize the encryption capabilities!


I cobbled this guide together from so many sources, it was hard to keep track. Feel as though I didn’t give you credit? Please let me know!

Be Sociable, Share!