How to set up reverse tethering over USB? My HTC G2 phone is rooted and running Cyanogenmod 7
I don't have a data plan.
Sometimes I want to connect the phone to the Internet when there isn't Wi-Fi, to update Market apps, backup SMS messages to Gmail, sync new contacts from Gmail, etc.  Things I can't do with USB mass storage mode.
I have a Windows 7 Professional computer connected to the Internet, but I'm not allowed to set up an ad-hoc Wi-Fi network.  (If I do, they will notice and hunt me down.)


Is there a way for the phone to access the Internet through the USB connection to the computer?  If so, how do I set it up?
I recently discovered SimpleRT which works very well with Linux (and apparently OSX as well).  Simply enable USB Debugging on your device (no root required), install the APK linked from that page on your device and connect it to your PC via USB, and then run the binary on your PC.

It will set up the connection as a VPN tunnel (tun0 by default) and your device should prompt you to (a) allow SimpleRT to create/oversee the VPN connection as well as (b) whether to run it when the device is configured as a particular USB accessory (which is what the binary does).

The project does not include a pre-built binary, so I've uploaded one I built for Ubuntu.



Below is a manual method that should work on Linux or Windows: http://blog.mathieu.carbou.me/post/60454997009/reverse-usb-tethering-with-android-2-2


  STEP 1:
  
  For Windows: Install USB drivers from Android SDK
  
  For Linux: Nothing to do
  
  STEP 2:
  
  On Nexus One: Connect USB cable and activate USB Tethering. You should see on linux or windows a new network interface.
  
  STEP 3:
  
  On Linux Computer, setup a bridge:

# usb0 is the new network interface
# eth0 is the main interface connected to internet (or a gateway)

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

  
  See https://help.ubuntu.com/community/NetworkConnectionBridge to setup bridges
  
  On windows, Bridge the 2 network interfaces
  
  STEP 4:
  
  Setup usb0 interface of your phone. You have to options:
  
  
  From your computer, execute:  

./adb shell netcfg usb0 dhcp
  Or in a root terminal on your phone, type:

su
netcfg usb0 dhcp
  
  
  You should now be able to connect to Internet on your phone using your computer’s Internet connection.
  
  Try to do a ping www.google.com to be sure !
  
  STEP 5: 
  
  To shut down the reverse-tethering, first unbridge interfaces on your computer:

sudo ifconfig eth0 down  
sudo ifconfig usb0 down  
sudo ifconfig br0 down  
sudo brctl delbr br0  
sudo ifconfig eth0 up  
sudo dhclient eth0
  
  Then on your phone, uncheck the USB Tethering option !


You can also use Windows to create a WiFi network (using Connectify) and connect your device to that: http://www.nexusoneforum.net/forum/nexus-one-faq-how-tos/3133-reverse-tether-getting-internet-your-phone.html