• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How To Mac OS X Droid Tethering (USB/Wired)

On this note- keep in mind there are new mac users like myself and while I want to tether, no way I would attempt this "simple" procedure. Looks like I shall be shopping for the PDANET option.

Absolutely. I disclaimered this "I assume you know your way around a BASH prompt here (if you don't, this is decidedly not the right solution for you)." And that's for real - it's "simple" to the extent that you find VPN shell scripts to be simple. For 99% of users, that's not very simple at all; the (relative) simplicity for the average user is what PDANet's purchase price gets you, and for many people it's probably worth it.
 
Upvote 0
On this note- keep in mind there are new mac users like myself and while I want to tether, no way I would attempt this "simple" procedure. Looks like I shall be shopping for the PDANET option.

FWIW, I downloaded the Mac version today and it worked like a charm on my desktop Mac, have to do the install and test no the Macbook Pro which is where I
 
Upvote 0
after using this, I have to reboot my computer because it creates a bunch of different network adapters and my computer gets confused. anyone else experience this? solutions?

Make sure you hit control-c in the terminal window when you're done with the azilink connection, so that it cleans up properly after itself, or run "azilink.sh down" to manually clean it up if you exited improperly.
 
Upvote 0
why go through all this when PDAnet is download, then plug and play.

Well, for one thing I wrote this guide before the PDANet OS X client was released. At that point the only option for PDANet on Macs was Bluetooth DUN, which is a battery killer and sporadically wonked out on me.

The trial of PDANet eventually expires, and will stop working for HTTPS connections after that until you shell out the $29 for it.
 
Upvote 0
Make sure you hit control-c in the terminal window when you're done with the azilink connection, so that it cleans up properly after itself, or run "azilink.sh down" to manually clean it up if you exited improperly.

Great post!!!

I had tried CTRL+c and also "azilink.sh down" but i still have still unable to connect to internet via Wifi or ethernet after that.
 
Upvote 0
A few notes:

You do NOT need to run Mac Internet Sharing.
You may need to run Tunnelblick to have it in the background, but don't use Tunnelblick's icon to connect. Run the azilink.sh script to do the actual connection.

Also, the azilink script *should* set your DNS settings appropriately. If not, you can try poking around the script's settings to use a different name server (by default it uses the phone's DNS settings, i think).

I'm not sure about Leopard, but you don't need Tuntap on Snow Leopard - just Tunnelblick running.

Thank you all. I followed the original post. Also, I installed the TunTap application as mentioned above. Lastly, as quoted above, I made sure Tunnelblick ran in the background when running the androidtether script.

Now everything works. Perfect, thank you all! I've been waiting for something like this.
 
Upvote 0
ok I am new to mac and am trying to learn my way around the bash prompt. I have downloaded and installed azlink to my droid. I have downloaded android-sdk-mac to my mac and put abd in usr/local/bin. I have downloaded and installed tunnelblick to my mac to intall openvpn. I am having trouble with the script from christie. first I tried highlighting it and saving but it will only save as a webpage. I the copied the script in applescript script editor and when I tried to save it to a folder I could come back to from the terminal it kept disappearing and also would not let me save it as azlink.sh. when I tried to run it from the script editor it said the script had syntax errors i.e. in the first line "{ cannot follow ()". when I copied it to a folder and just labeled it azlink and then try to change the name to azlink.sh the terminal window said no such file existed.
please tell me how to get this script on my mac and saved as ~/azlink,sh so I can run the chmod 744 command on it. azlink is up and running on the droid. tunnelblick is up and running on the mac. also I have OS X 10.6 running on the mac so if I have to use the above TunTap drivers do I just install them and then run the script or do they have to go to a specific folder.
I know this all seems simple to you guys but you've got to start somewhere to learn something different i.e. mac and unix vs. windows.
thanks in advance for any help.

Dude, you get this to work? The easiest way I see is to open your terminal and type 'nano -w ~/azilink.sh' after that, you can copy/paste the text from the browser directly into your terminal. ctrl-x will exit and ask you to save. Once completed, 'sudo chmod 744 ~/azilink.sh' should get your permissions set right... then... ~/azilink.sh should work for you. Best of luck haus.
 
Upvote 0
I've spent several hours trying to get everything in place and working, but to no avail. I have a hunch it's on the Tunnelblick side of things... all I have right now is its self-generated sample configuration file. What do I need to do to give it a real configuration file/where can I get it?

My username is derrickrohl and in that folder I have adb and azilink.sh

Here's what I get:

Derrick-Rohls-MacBook-Pro:~ derrickrohl$ ~/azilink.sh
/Users/derrickrohl/azilink.sh: line 17: adb: command not found
Tue Jun 29 22:05:48 2010 OpenVPN 2.1.1 i386-apple-darwin10.2.0 [SSL] [LZO2] [PKCS11] built on Feb 24 2010
Tue Jun 29 22:05:48 2010 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Tue Jun 29 22:05:48 2010 ******* WARNING *******: all encryption and authentication features disabled -- all data will be tunnelled as cleartext
Tue Jun 29 22:05:48 2010 TUN/TAP device /dev/tun0 opened
Tue Jun 29 22:05:48 2010 /sbin/ifconfig tun0 delete
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
Tue Jun 29 22:05:48 2010 NOTE: Tried to delete pre-existing tun/tap instance -- No Problem if failure
Tue Jun 29 22:05:48 2010 /sbin/ifconfig tun0 192.168.56.2 192.168.56.1 mtu 1500 netmask 255.255.255.255 up
Tue Jun 29 22:05:48 2010 /Users/derrickrohl/azilink.sh up tun0 1500 1502 192.168.56.2 192.168.56.1 init
Tue Jun 29 22:05:48 2010 WARNING: potential route subnet conflict between local LAN [10.0.1.0/255.255.255.0] and remote VPN [0.0.0.0/128.0.0.0]
add net 0.0.0.0: gateway 192.168.56.1
add net 128.0.0.0: gateway 192.168.56.1
Tue Jun 29 22:05:48 2010 Attempting to establish TCP connection with 127.0.0.1:41927 [nonblock]
Tue Jun 29 22:05:48 2010 TCP: connect to 127.0.0.1:41927 failed, will try again in 5 seconds: Connection refused
 
Upvote 0
This method works very well. Thank you droppedd.

For those getting this error.
/Users/derrickrohl/azilink.sh: line 17: adb: command not found

This means the azlink.sh script can not find adb in your path. You need to go back and re-read the instructions on installing the Android sdk and the adb tools on your mac. Specifically pay attention to the instructions here Android SDK | Android Developers.

Here are a couple quick tips. If you type "echo $PATH" into the osx terminal and do not see something like /Applications/android-sdk-mac_86/tools in the results. Then you probably do not have it set up right. Of course this assumes you have installed the sdk into the top level harddrive Applications folder Not an application folder in the user directory.

Also If you are getting an error about tun not connecting then you can try a couple of things.
1) make sure you click on tunnelblick in menu bar and hit connect at least once.
2) from tunnelblick click on details and then edit configuration and put a semi-colon in front of the line "persist-tun".

This seemed to get me going after a few false starts.
 
Upvote 0
First time poster.

Send a big thanks for the posters and people responsible for getting this info out there.

I wanted to ask about the 2.2 Froyo update that has just been released. Does anyone know if this update breaks this tethering functionality as talked about in this thread? While I would like a faster phone, etc....tethering come first.

If anyone knows or has tested this, it would be great to know. For now, I need to figure out how to fend off this auto update. =)

-b
 
Upvote 0
Before we start: [[insert usual disclaimers about this technically violating the Verizon TOS]]. With that out of the way :)...

PDANet looks like a good solution for battery-chewing Bluetooth DUN tethering, but their $30 proprietary desktop app is for wired tethering on Windows only. Where does that leave us OS X folks who want a straightforward wired tethering solution, or something open source?

I've tried Tetherbot + Foxyproxy, but that's Firefox-only and I never could get the DNS to resolve properly through the phone's connection.

I stumbled on azilink, which works by running a vpn tunnel through your phone. But azilink is strongly biased towards Windows users, to the point that the author says "if you're using linux, or god forbid, OS X..." in his directions. And the preferred client for azilink, OpenVPN 2, is a headache to install directly on OS X (you can install Macports or build it by hand from source, but that's a nonstarter for most users).

That said, with a little setup work, you can get everything to tether by running one shell script. I assume you know your way around a BASH prompt here (if you don't, this is decidedly not the right solution for you).


  • - Enable USB debugging and 3rd-party app installation (System Settings -> Applications -> check Unknown Sources; Development -> check USB debugging).
  • - Install azilink on the phone.
  • - Install the Android SDK to get the adb tool
    • - Either add the SDK's tools folder to your PATH or copy adb to /usr/local/bin/
  • - Install Tunnelblick, a nice OS X VPN GUI that runs on OpenVPN2. Just copy it to your Applications folder, and run it to set up your system. (I used Tunnelblick 3.0b22).
  • - Get the activate/deactivate shell script from #701122 - Pastie and save it as, for example, ~/azilink.sh
  • - Make the script runnable (e.g. "chmod 744 ~/azilink.sh" at the Terminal)

Phew! But once that initial setup is done, all you have to do to tether your phone is:


  • - Run azilink on the phone and check the box to start the service.
  • - Run the script ("~/azilink.sh") on your Mac from Terminal.
When you're done, ctrl-c tears down the connection.

To make it even easier in the future: Right-click the shell script in the Finder, choose Get Info, and Open With -> Applications/Utilities/Terminal (DON'T apply that to all; that could be risky). Then you can run the script by just double-clicking it in the Finder without having to go through manually starting a Terminal session.

That pre-first-run setup's a bit of a hassle, but it should be *much* more friendly on the batteries than BT or Wifi-based solutions, and this runs using entirely free open-source tools.

Big thanks to Mochabyte on the xda-developers Dream forum for doing most of the hard work; I just streamlined the process to not require macports and openvpn2 from source, and added (hopefully) straightforward directions for the whole setup process.

hey dude, i really don't know how to work the terminal on my macbook, could anyone help me out
like this: "Either add the SDK's tools folder to your PATH or copy adb to /usr/local/bin/" what the heck is path!? hahaha

.D
 
Upvote 0
I just wanted to thank droppedD for posting this. Everything works on my MacBookPro once TunTap was added (thanks to rrgrs). Except...

I can't get Cisco VPN to work when tethered with the Droid (it works fine when connected through Airport WiFi). I get the following error when trying to run the VPN Client:
"Error 51: Unable to connect with the VPN subsystem. Please make sure that you have at least one network interface that is currently active and has an IP address and start this application again"

One of the Mac forums suggested: sudo SystemStarter restart CiscoVPN, but this had no effect. It seems that the Cisco VPN software does not recognize my tethered droid as an "active" connection. I'm at my limits of knowledge here. Does anyone have any suggestions? Thanks, Tom
 
Upvote 0
I switched over to PDAnet. It sets up a valid IP address that is visible in the Mac Network preferences and they provided a workaround in the help docs for the Cisco VPN (which is not supported on the Droid). For $15.95, I thought it was a good deal. Thanks again for this thread. It was fun to do some "BASHing" again. I even got to dust off some old vi commands :) --Tom
 
Upvote 0
First time poster.

Send a big thanks for the posters and people responsible for getting this info out there.

I wanted to ask about the 2.2 Froyo update that has just been released. Does anyone know if this update breaks this tethering functionality as talked about in this thread? While I would like a faster phone, etc....tethering come first.

If anyone knows or has tested this, it would be great to know. For now, I need to figure out how to fend off this auto update. =)

-b

Also a first time poster,

I attempted this method months ago and was unsuccessful. However I more than likely missed something then. I also have this question about 2.2 possibly breaking this method. Since I still am unsuccessful at getting traffic through I feel as though I may be doing something incorrectly.

Output of my script:
Thu Nov 4 20:09:31 2010 OpenVPN 2.1.1 i386-apple-darwin10.2.0 [SSL] [LZO2] [PKCS11] built on Feb 24 2010
Thu Nov 4 20:09:31 2010 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Thu Nov 4 20:09:31 2010 ******* WARNING *******: all encryption and authentication features disabled -- all data will be tunnelled as cleartext
Thu Nov 4 20:09:31 2010 TUN/TAP device /dev/tun0 opened
Thu Nov 4 20:09:31 2010 /sbin/ifconfig tun0 delete
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
Thu Nov 4 20:09:31 2010 NOTE: Tried to delete pre-existing tun/tap instance -- No Problem if failure
Thu Nov 4 20:09:31 2010 /sbin/ifconfig tun0 192.168.56.2 192.168.56.1 mtu 1500 netmask 255.255.255.255 up
Thu Nov 4 20:09:31 2010 /Users/nathanberry-chaney/Azilink.command up tun0 1500 1502 192.168.56.2 192.168.56.1 init
Thu Nov 4 20:09:31 2010 WARNING: potential route subnet conflict between local LAN [10.0.0.0/255.255.255.0] and remote VPN [0.0.0.0/128.0.0.0]
add net 0.0.0.0: gateway 192.168.56.1
add net 128.0.0.0: gateway 192.168.56.1
Thu Nov 4 20:09:31 2010 Attempting to establish TCP connection with 127.0.0.1:41927 [nonblock]
Thu Nov 4 20:09:31 2010 TCP connection established with 127.0.0.1:41927
Thu Nov 4 20:09:31 2010 TCPv4_CLIENT link local: [undef]
Thu Nov 4 20:09:31 2010 TCPv4_CLIENT link remote: 127.0.0.1:41927
Thu Nov 4 20:09:32 2010 Peer Connection Initiated with 127.0.0.1:41927
Thu Nov 4 20:09:32 2010 Initialization Sequence Completed

This appears to be successful, however any traffic I try and push through just hangs. i.e. google.com in browser just thinks for as long as I'll let it sit but won't load the page nor return an error.
 
Upvote 0
First time poster.

Send a big thanks for the posters and people responsible for getting this info out there.

I wanted to ask about the 2.2 Froyo update that has just been released. Does anyone know if this update breaks this tethering functionality as talked about in this thread? While I would like a faster phone, etc....tethering come first.

If anyone knows or has tested this, it would be great to know. For now, I need to figure out how to fend off this auto update. =)

-b
There's no need to use the terminal. Just install PDANet (June Fabrics PDA Technology Group) on your phone & your Mac. I successfully tethered my phone with the USB cable and with Bluetooth. I'm using Froyo with Motorola Droid, Mac OS X 10.6.4 (snow leopard).
 
Upvote 0
Whoa this all looks like a bit too much to chew...

Download Easytether lite from the market, install drivers from the app to your mac, plug usb cable into mac, select ETHERNET ADAPTOR (en3)... And that is it... You are online. Enable internet sharing via airport and you now have wifi for additional devices ie: PS3, Xbox, other computers...

I did this on my Powerbook G4 in 5 minutes and was playing Black Ops online in 5 more...
 
Upvote 0
i did all the steps and it says on my phone
connected to host
but on the terminal it keeps restarting process :/
plz tell me what to do i feel so close to make it work xD

Code:
Sun Nov 27 14:08:15 2011 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Sun Nov 27 14:08:15 2011 ******* WARNING *******: all encryption and authentication features disabled -- all data will be tunnelled as cleartext
Sun Nov 27 14:08:15 2011 TUN/TAP device /dev/tun1 opened
Sun Nov 27 14:08:15 2011 /sbin/ifconfig tun1 delete
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
Sun Nov 27 14:08:15 2011 NOTE: Tried to delete pre-existing tun/tap instance -- No Problem if failure
Sun Nov 27 14:08:15 2011 /sbin/ifconfig tun1 192.168.56.2 192.168.56.1 mtu 1500 netmask 255.255.255.255 up
Sun Nov 27 14:08:15 2011 /Users/ahmedabouelnour/azilink.sh up tun1 1500 1502 192.168.56.2 192.168.56.1 init
add net 0.0.0.0: gateway 192.168.56.1
Sun Nov 27 14:08:15 2011 WARNING: potential route subnet conflict between local LAN [192.168.1.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
Sun Nov 27 14:08:15 2011 Attempting to establish TCP connection with 127.0.0.1:41927 [nonblock]
Sun Nov 27 14:08:16 2011 TCP connection established with 127.0.0.1:41927
Sun Nov 27 14:08:16 2011 TCPv4_CLIENT link local: [undef]
Sun Nov 27 14:08:16 2011 TCPv4_CLIENT link remote: 127.0.0.1:41927
Sun Nov 27 14:08:20 2011 Connection reset, restarting [0]
delete net 128.0.0.0: gateway 192.168.56.1
delete net 0.0.0.0: gateway 192.168.56.1
Sun Nov 27 14:08:20 2011 /Users/ahmedabouelnour/azilink.sh down tun1 1500 1502 192.168.56.2 192.168.56.1 init
Sun Nov 27 14:08:20 2011 SIGUSR1[soft,connection-reset] received, process restarting
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones