Here’s how to use an Android phone’s Internet connection on Mac OS X. It uses only free and open source software. I’m using a Droid with Mac OS X Snow Leopard (10.6.7), but this approach should work with any Android device and any recent version of OS X.
This howto is based on these instructions, with a few tweaks.
Installation
- On the phone, enable USB debugging (under Settings > Applications > Development, check “USB Debugging”) and allow third-party applications (under Settings > Applications, check “Unknown Sources”).
- Install AziLink on the phone (most recent version: 2.0.2).
- Download the Android SDK (most recent version: r10). Open the zip file, go to the “tools” folder, and run the “android” application. In the window that opens, select “Available packages” in the left column. Expand the “Android Repository” list to the right, check “Android SDK Platform-tools, revision 3,” click “Install Selected,” and then in the window that appears, click “Install” again.
- Go back to the Android SDK folder. Find the program called “adb” in the folder “platform-tools.” Copy this program to /usr/local/bin/ (this folder is under Macintosh HD, and you may need to show hidden files in Finder to see it).
- Install Tunnelblick (most recent version: 3.1.6).
- Install TunTap (most recent version: 20090913).
- Create a new text file called “azilink.sh” in your home directory (that’s the “yourname” folder in OS X; you can also find it at Macintosh HD/Users/yourname). Copy and paste this code and save the file. If you’re using Mac OS X Lion, use this code instead.
- Open Terminal and type “chmod 744 ~/azilink.sh” (without the quotation marks) and press enter.
Connecting
- Connect the phone to the computer via USB.
- Turn off AirPort (click the AirPort icon in the menu bar and select “Turn AirPort Off”).
- Open AziLink on the phone and check “Service active.”
- Open Terminal and type “~/azilink.sh” (without the quotation marks) amd press enter.
If it’s successful, you should see something like this:
You should now be online! To quit, return to return to the Terminal window and type “Ctrl-c” and press enter.


I followed this to the letter, but when I type ~/azilink.sh into terminal and press enter, nothing happens, it just waits for another command.
FYI, I had to create usr/local/bin. It did not exist already.
OK, turns out I was missing the last few lines of code, but now after incorporating them I get:
Tue Apr 12 13:15:57 2011 TCP: connect to 127.0.0.1:41927 failed, will try again in 5 seconds: Connection refused
Max,
Do any warnings appear in the terminal output above that line?
If not, I’d check the connection between the phone and the computer, make sure USB debugging is enabled and that AziLink is running, and that AirPort is off.
This is the output:
Tue Apr 12 21:01:04 2011 OpenVPN 2.1.4 i386-apple-darwin10.7.1 [SSL] [LZO2] [PKCS11] built on Mar 1 2011
Tue Apr 12 21:01:04 2011 NOTE: the current –script-security setting may allow this configuration to call user-defined scripts
Tue Apr 12 21:01:04 2011 ******* WARNING *******: all encryption and authentication features disabled — all data will be tunnelled as cleartext
Tue Apr 12 21:01:04 2011 ROUTE: problem writing to routing socket
Tue Apr 12 21:01:04 2011 ROUTE: problem writing to routing socket
Tue Apr 12 21:01:04 2011 TUN/TAP device /dev/tun0 opened
Tue Apr 12 21:01:04 2011 /sbin/ifconfig tun0 delete
ifconfig: ioctl (SIOCDIFADDR): Can’t assign requested address
Tue Apr 12 21:01:04 2011 NOTE: Tried to delete pre-existing tun/tap instance — No Problem if failure
Tue Apr 12 21:01:04 2011 /sbin/ifconfig tun0 192.168.56.2 192.168.56.1 mtu 1500 netmask 255.255.255.255 up
Tue Apr 12 21:01:04 2011 /Users/Max/azilink.sh up tun0 1500 1502 192.168.56.2 192.168.56.1 init
Tue Apr 12 21:01:04 2011 ROUTE: problem writing to routing socket
add net 0.0.0.0: gateway 192.168.56.1
Tue Apr 12 21:01:04 2011 WARNING: potential route subnet conflict between local LAN [192.168.56.0/255.255.255.0] and remote VPN [128.0.0.0/128.0.0.0]
add net 128.0.0.0: gateway 192.168.56.1
Tue Apr 12 21:01:04 2011 Attempting to establish TCP connection with 127.0.0.1:41927 [nonblock]
Tue Apr 12 21:01:04 2011 TCP: connect to 127.0.0.1:41927 failed, will try again in 5 seconds: Connection refused
The last 2 lines just repeat. The connection is fine and USB debug is on (EasyTether works), and Azilink just waits for a connection. Airport is off because my Airport card died a while back, which is why I’m trying this (I’m trying to use my Nexus One as a WiFi USB key)
I’m not sure what’s causing this, but you might get lucky if you post an issue at AziLink’s Google Code page: https://code.google.com/p/azilink/issues/list.
“FYI, I had to create usr/local/bin. It did not exist already.”
That should be /usr/local/bin which surely exists. In term try:
echo $PATH
/usr/local/bin should be in your path (~/usr/local/bin won’t be).
[...] OS X application Tunnelblick, and a shell script to configure the tether correctly. There is also a great blog post from March of this year that is a bit more user friendly than the forum post in describing how to [...]
Just FYI, OS X Lion requires a newer version of Tunnelblick which breaks the shell script. I fixed the issue and wrote up a little post about it.
Updated. Thanks!