Android Proxy (Tethering Android on Mac OS X)
Notes on connecting an Android (such as Google G1 phone) via a USB cable to a computer running Mac OS X, in order to browse the web.
This mechanism requires two independent pieces of software, namely Tetherbot on the Android device, and AndroidTether (or alternatively Terminal and the Android SDK) on the Macintosh.
The objective of this article is to clarify the installation and setup process for Mac OS X. It does not apply to other operating systems.
A general understanding the Tetherbot documentation may be helpful.
The screen shots relate to Tetherbot.apk 39.57KB” (in lieu of a better version) and Firefox 2.0.0.16 on Mac OS X 10.5.5.
This article is divided in 2 sections:
- Things to do every time
- Launch Tetherbot on the device
- Launch AndroidTether on the computer
(alternatively, launch Terminal on the computer) - Change some Firefox preferences
- Installation to be done just once
- Installation of Tetherbot on the device
- Installation of AndroidTether on the computer
(alternatively, install the Android SDK) - One-time Setup of the device
- One-time Firefox setup
1. Things to do every time
1.1. Launch Tetherbot on the device
Connect the computer to the device using a USB cable.
Launch Tetherbot and tap “Start Socks”.
If everything goes well, the proxy server will start on port 1080.
1.2. Launch AndroidTether on the computer
Starting AndroidTether will automatically setup the connection.

1.3. (alternatively, launch Terminal on the computer)
On the Macintosh, launch a Terminal window. Assuming here that you have installed the Android Software Development Kit. See step 2.3 for details.
In Terminal, type exactly “adb forward tcp:1080 tcp:1080“.
Note that the syntax is “adb forward tcp:{local port} tcp:{remote port}“.
The {local port} is the SOCKS host mentioned in section 1.4
The {remote port} must match Socks Proxy Server on: 1080 mentioned in section 1.1

1.4. Change some Firefox* preferences
On the computer, launch Firefox.
Go to “Firefox>Preferences…>Advanced>Network>Settings…”.
- “Manual proxy configuration:”
- “SOCKS Host:” to “localhost”, “Port:” 1080
- “SOCKS v5″
Note that “Port: 1080″ represents this time the {local port} parameter in “adb forward tcp:{local port} tcp:{remote port}”.
Firefox is now ready to browse the Internet.
Restore the original setting after you are done tethering the device or you won’t be able to browse the web with Firefox. For added security, restore item 2.5 as well.
(*) Safari does not provide preferences to manually change the proxy, which is a sine qua non condition for the entire mechanism to function. System Preferences must be changed instead, with various levels of success.
2. Installation to be done just once
2.1. Installation of Tetherbot on the device
2.1.1. Prior downloading Tetherbot on the G1, you must change the “Home>MENU>Applications>Unknown sources” setting and “Allow install of non-Market application”.
Warning, this is a dangerous and potentially unsafe action. Review the warning carefully.
2.1.2 Using the G1 Brower, go to http://graha.ms/androidproxy/Tetherbot.apk to download Tetherbot.
2.1.3. After download completes on the device, simply select the “.apk” Android Package to install.
2.2. Installation of AndroidTether on the computer
AndroidTether is a Macintosh OS X application that will setup the computer side of the communication automatically.
It runs in just one click, and does not require the download of the entire Android SDK.
AndroidTether is lightweight, flexible, free, and can be downloaded here.
2.3. (alternatively, install the Android SDK)
Install the Android Software Development Kit.
Once installed, follow the instructions on adding android-sdk-mac_.../tools to your PATH.
The alternative is to execute adb from the tools directory:
( cd .../android-sdk-mac_.../tools ; ./adb forward ...)
2.4. One-time setup of the device
To use Tetherbot, you will need to perform these operations:
On the device, turn on “USB debugging”
“Home>MENU>Settings>Applications>Development>USB debugging”
Additionally, you may want to turn on “Stay awake” as well.
2.5. One-time Firefox setup
This change allows Firefox to fetch DNS information from the proxy. You must allow it to tether the device.
For maximum security, restore it to false after each use.
- In Firefox, File>Open Location… about:config.
- Add the Filter: “dns” for clarity
- select the Preference network.proxy.socks_remote_dns and set it to
true(hit <enter> or right-click).
These changes have been tested on Firefox 2.0.0.16 and Firefox 3.0.5.
3. External links








drh628 said:
Feb 12, 09 at 3:52 amOK so I admit that I not a “geek” ; however I did follow the instruction and I can not get my Mac to see the world. The only thing that is different is that when I connect the G1 to the Mac, it asks if I want to Mount the device. I have tried it both ways to no avail. Any ideas??
Thanks
dev said:
Mar 09, 09 at 8:23 pmI found that step 2.5 (network.proxy.socks_remote_dns) is critical and may be overlooked. For example, it is not listed in the well documented how-to-tether-the-iphone-or-g1-to-your-laptop-for-free-3g-broadband article.
Tethering mit dem G1 « hep-cat.de said:
Oct 06, 09 at 7:22 pm[...] welchen dann vom Computer aus zugegriffen werden kann. Als Clients funktionieren Linux, Windows und Mac OS X, allerdings nur letzteres ohne zusätzliche Treiber. Auch SSH-Sessions sind möglich, wenn die
[...] which can then be accessed from a computer. As a client Linux, Windows and Mac OS X to work, but only the latter without any extra drivers. SSH sessions are also possible if the [...]