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.
- 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.
- Download AziLink:
- Install AziLink to your phone:
with the sdk installed:
adb install azilink.apk
or on the phone: http://lfx.org/azilink/azilink.apk
- Enable USB debugging on the phone. From the home screen, this is under Settings>Applications>Development>USB debugging.
- Install the Android USB driver (if you don’t already have one installed). See http://developer.android.com/guide/developing/device.html for more information. The driver is included in the ADB download if you don’t want to get the full SDK.
- Create a script (I called it androidtether) and make it executable:
touch androidtether chmod 755 androidtether
- copy bash script from http://jimcortez.com/code/androidtether into that file
This file (credited below) will take care of all the setup and tear down of the tethering
- On the phone, run AziLink and make sure “Service active” is checked.
- run the script
- 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!
- 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 (http://code.google.com/p/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!
- TUN/TAP issue:
- some stolen instruction steps:
- script from mochabyte post: