From MEPIS Documentation Wiki

Jump to: navigation, search



Android is a mobile operating system based on Linux that includes an operating system, middleware and key applications and is used on various portable devices such as Google's Nexus or Motorola's Droid.




In the context of cell phones, tethering is connecting your phone to a laptop or similar data device using a data cable, usually for the purpose of connecting to the Internet on the laptop using the cell phone network. This article provides the instructions to allow the Android device's internet connection to be used on a PC via USB tethering.

Android Device Settings

Install Proxoid from the Android marketplace. Once installed, in the Android based phone go into Settings > Applications > Development and be sure to check USB debugging box.

Linux PC Settings

Open up a terminal and follow these commands (replace nano with your favorite text editor) as root user, su

NOTE: Have your android device plugged in via USB to the PC.

nano /etc/udev/rules.d/09-android.rules

ADD line and save

SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"

chmod 755 /etc/udev/rules.d/09-android.rules

cd /usr/local/bin



tar -zxvf android-sdk_r05-linux_86.tgz

cd android-sdk-linux_86/tools/

./adb kill-server

./adb start-server

./adb devices // Ensure that your device is listed

./adb forward tcp:8080 tcp:8080

Now here are the instructions on setting up so everything goes through tethering.

cd /home/username/ // change username to yours

mkdir .tethering

nano /.tethering/

Paste what's below into the file

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

/usr/local/bin/android-sdk-linux_86/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."

nano /.tethering/

copy what's below into the file

#! /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."

chmod 755 -R /home/username/.tethering // change username to yours

nano /home/username/.bashrc

look where it says #alias and paste these two lines below:

alias on='/home/username/.tethering/'
alias off='/home/username/.tethering/'

Save and restart your terminal.


To turn on the tethering, be sure you connect your android phone via usb, havethe proxoid app running, and wifi must be off or disabled.

Then open your terminal and type on to start tethering to be able to access the internet through your phone's internet connection. Type off to disable it.

Additional Links

Proxoid wiki

Personal tools