How to get internet on your phone via USB

shoemeistah

Senior Member
Jul 29, 2009
312
12
0
Netherlands, The
You may also call this reversed USB tether.
This might come in handy if you're near a computer (Win XP/Win7) and there's no Wifi to connect to etc..
So after some research and trying I've found some information on how to do this.

Requirements:
* Android 2.2 (or an older version with a root tethering app)
* ADB from Android SDK, or a rooted Android 2.2 with terminal in root mode

STEP 1:
Install USB drivers from Android SDK.

STEP 2:
Connect USB cable and activate USB Tethering.
You should see a new network interface. (On XP you might need to install the RNDIS driver manually, see below)
If you're also missing RNDIS driver on Win7, look here.

Win XP manual driver install Android USB Ethernet/RNDIS: (You can skip this if you're on Win 7)
1. Download the following configuration file inside the *.zip attached to this post (tetherxp.inf) to your Windows XP computer.
2. Use the USB cable that came with your phone to connect your phone to your computer.
3. On the Android phone, press Home > Menu > Settings to open the Settings application.
4. Press Wireless & networks > Tethering & portable hotspot.
5. Check USB tethering.
6. When Windows XP’s New Hardware Wizard opens, select No, not at this time and click Next.
7. Select Install from a list or specific location and click Next.
8. Click Browse to browse to the directory where you installed the configuration file you downloaded in Step 1 and click Next. Windows XP uses the configuration file to configure itself to support USB tethering with the Android phone. (This might take a while)
9. When Windows XP finishes installing the software for Android USB Ethernet/RNDIS, click Finish.

STEP 3:
Bridge the 2 network interfaces.

STEP 4:
Setup usb0 interface of your phone. You have to options:
1. From your computer, execute:
./adb shell netcfg usb0 dhcp
2. 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.


Quote...

It is working now. After setting up ICS type in console emulator on your phone:
ifconfig usb1 192.168.2.2 netmask 255.255.255.0 up
route add default gw 192.168.2.1 dev usb0
iptables -F
iptables -F -t nat
setprop net.dns1 8.8.8.8
setprop "net.gprs.http-proxy" ""
Hope this helps some one who wants this to the right direction. :)
And maybe we're able to create an app to do this all automated.

Known issues but does not apply to all users:
1. Internet in browser application does not work.
2. Can't ping domain name.

For a little more info check out the sources, this includes the Linux version too.

Sources: Google android, Mycila
 

Attachments

Last edited:

pulser_g2

Admin Emeritus / Senior Recognized Developer
Nov 27, 2009
19,538
11,591
113
Nice info :)

Going to post a link on the hero forum where someone was wanting to do this. I wonder if this will work on a froyo hero too...
 

jsannn

Member
Sep 23, 2010
8
2
33
Thank you for the guide, It worked fine. There are several things not working though:
- can't download apps from market, they stuck on "downloading"
- my google account don't sync
- other apps don't update themselves. For example my twitter app won't show any new tweets until I open it and manually press "refresh"
 
Last edited:

irkan

Senior Member
Nov 26, 2009
761
64
0
I searched for this long time ago, even created a thread about it awhile back, didnt have luck like you did though :)

I gave up on it eventually, it would be nice to make an app out of it.

mind asking how did you confirm the net to be working on browser? by pinging google.com?

since i saw the last line you put "Internet in browser application does not work."
 

sherifelshazly

New member
Nov 18, 2007
1
1
0
[U][B] Internet connection on your Android phone via your PC [/B][/U]

I think I found the best solution. Check it out connectify.me

I wanted to use my PC wired internet & I was astonished that this wasn't available in my HTC Desire & 1st Android device!. I looked over the net, I found many options but most asked for a rooted device! I didn't want to root my brand new Desire.

Connectify is an easy to use software router for Windows 7 computers. After downloading and installing the lightweight application, Connectify utilizes your computers' built in Wi-Fi card to wirelessly share any available Internet connection: a cable modem, a cellular card, or even another Wi-Fi network. Other Wi-Fi enabled devices including laptops, smart phones, music players, and gaming systems can see and join your Connectify hotspot just like any other Wi-Fi access point and are kept safe and secure by password-protected WPA2 Encryption.

I tried it & it's working perfectly for me .. It's a free app.

-----------
Phone: HTC Desire (SIM Free)
Type: Desire
Build: HTC Desire 2.2, 2.10 (kernel: htc 2.6.32.15)
Baseband: 5.09.05.30
Network: UMTS auto (EGY)
 
  • Like
Reactions: wallac3

GhostOfTheNet

Senior Member
Dec 29, 2008
166
123
0
Graz
By me it didn't work. Using OpenDesire with Froyo 2.2
So I made it work, by edititng the .inf file.

Here the file for USB\VID_0BB4&PID_0C02.


For all which still have a problem(USB TETHERING ON DEVICE MUST BE ACTIVE, ALSO THE IDs DIFFERS BETWEEN CONNECTED WITH ADB OR NOT), go into the device manager -> open the device -> goto tab details -> choose device id
look at it, you see somewhere vid_XXXX and further pid_XXXX
open my file -> goto line 31 -> change vid_YYYY and pid_YYYY with what you see in your device dialog. the same you do on line 35. be careful with 0 or o.


Regards
Ralph
 

Attachments

alienjazzcat

New member
Feb 22, 2011
1
0
0
browser & webviews

Any idea why browser won't work?

I'm interested in testing against internal sites (of course no WAP here.. cuz they be scared i guess).. both Browser and embedded webviews.
 

mmcluke

Member
Jul 16, 2008
40
1
28
Connectify doesn't work correctly with my Galaxy 5. It keeps connected for a short time then disconnects and then, connects again, connect, disconnect...
Does anyone know how to fix it?
 

rockking1994

New member
Mar 16, 2011
4
0
0
small proble plz solve it

hi
I have a small problem in it when my device is not in usb tethering mode

i can see it in my adb devices
as soon as is start usbtethering it say no device found

plz help me