Δευτέρα, 15 Φεβρουαρίου 2010

Android internet tethering through cable without rooting your phone.

Well, you want to have internet access to your laptop from your Android phone, but without passing through the painful process of rooting your phone?

The solution is easy, fast but unfortunately not flexible enough. It is not a full tethering application, but it creates a Sock5 proxy on your phone, your browser can use to surf the internet.

You have to download and install the android SDK tools, and especially the adb program. If you do not know how to do it, download the necessary files from here and visit this link on how to install them. You do not have to download or install eclipse or the ADT plugin.

Supposing you have successfully installed the adb tool, and the "adb devices" command returns the id of your phone, you are ready to continue.

Visit http://graha.ms/androidproxy/ and download this file.

Install it to your phone with the following command: "adb install Tetherbot.apk".

Open the Tetherbot application, make sure you're connected to a Wireless or a Mobile network (GPRS or 3G) and press the "Start Socks" button.

Now you have to tell your adb to forward all the connections from your pc to your phone.
This can be done by entering the following command: "adb forward tcp:1080 tcp:1080".

My .bashrc has now one more line: "alias tetherG1='adb forward tcp:1080 tcp:1080'".

The final step is to configure Firefox to make use of the Sock proxy we just created.
Go to Firefox (or Iceweasel you Debian fans) Edit -> Preferences -> Advanced -> Connection Settings -> Manual Proxy Configuration and at the SOCKS Host enter "localhost" and 1080 as port number.

Now you have to tell Firefox not to use the /etc/resolv.conf to resolve the ip addresses but to use the Socks proxy. Go to the address bar, enter "about:config" search for "dns", find the "network.proxy.socks_remote_dns" key and set it to true.

Enjoy internet to your laptop through your Android Phone!

God how much I love that piece of plastic <3