Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a linux box, without any network interface, only usb. I have my andorid phone, and the USB cable. I would like to connect from my android device to the linux box,and execute shell commands on the linux box, via usb. there is not wifi, ethernet, oer any other interfaces.

Any idea? I tried ConnectBot, but could not make it work over USB.

share|improve this question

Reverse USB Tethering

adb shell netcfg usb0 up
adb shell netcfg usb0 dhcp
adb shell route add default gw X.X.X.X dev usb0
adb shell setprop 2
adb shell setprop net.dns1
adb shell setprop net.dns2
adb shell setprop "net.gprs.http-proxy" ""
adb shell setprop net.usb0.dns1
adb shell setprop net.usb0.dns2

Do not copy and paste these commands. Read them and see if you can understand what they are accomplishing and modify them to suit your needs. You are routing over USB.

ifconfig eth0
ifconfig usb0
brctl addbr br0 
brctl addif br0 eth0
brctl addif br0 usb0
ifconfig br0 up
dhclient br0

Do not copy and paste these commands. Since you don't have network access on your PC, you will not need to make a bridge, but if you ever add a NIC, then you may want to create a bridge.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.