Tethering Script for Android Phones and Gnome

Update: If you want to use _real_ tethering (without proxy), install CyanogenMod - a tutorial is in the Wiki !

Just a small shell script to get an internet connection on a standard gnome desktop (e.g. Ubuntu) via a proxy on an android phone (no root access needed!).
First you have to download the proxoid application, then follow the installation instructions and activate proxoid.

Now you can use the following scripts, to activate and deactivate proxy settings for the whole gnome desktop. This has the advantage, that it's not necessary to configure a proxy in each application manually.

Script to start the proxy (adjust the path to your system settings):

#! /bin/sh
# Routes network traffic to the phone and switches the GNOME proxy on

# adjust the following path to your system
/path/to/your/android/sdk/tools/adb forward tcp:8080 tcp:8080

echo "Enabled forwarding."

# activate proxy
gconftool-2 -t string -s /system/proxy/mode "manual"
gconftool-2 -t bool -s /system/http_proxy/use_http_proxy true
# http settings
gconftool-2 -t string -s /system/http_proxy/host "localhost"
gconftool-2 -t int -s /system/http_proxy/port "8080"
# https settings
gconftool-2 -t string -s /system/proxy/secure_host "localhost"
gconftool-2 -t int -s /system/proxy/secure_port "8080"

echo "Enabled proxy."

Script to stop the proxy:

#! /bin/sh
# Switches the GNOME proxy off

gconftool-2 -t string -s /system/proxy/mode "none"
gconftool-2 -t bool -s /system/http_proxy/use_http_proxy false

echo "Disabled proxy."

Have fun with mobile internet Wink

I am new to Linux OS. Can you

I am new to Linux OS. Can you please post the detailed instructions on how to execute those two scripts mentioned in this thread?
I appreciate your help.
Thanks....

Maybe you should try to

Maybe you should try to install CyanogenMod (http://www.cyanogenmod.com/) on your phone, then you don't have to use any scripty on your computer for tethering ...
Instructions are here: http://wiki.cyanogenmod.com/

Post new comment

The content of this field is kept private and will not be shown publicly.
Syndicate content