• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[REQUEST]Internet via USB

Search This thread

ZED_pt

Senior Member
Feb 20, 2008
246
0
Linda-a-Velha
Hi all!

My request is to share my PC internet connection to use it in my android with the USB connection.

I only found software to do the reverse(tethering),and im pretty sure talented developers in here can do this without much effort.
Hope im right.

Thanks in advance!
 

ZED_pt

Senior Member
Feb 20, 2008
246
0
Linda-a-Velha
The reason why im requesting this is because i dont have WiFi connections avaiable ,both at home and work...

At home i could spend some money and buy a wireless router(i shouldnt have to do that...specially in a mobile OS design to use internet alot) at work i cant do that.
 

k-zik

Member
Sep 27, 2009
41
0
Casablanca
Well it's possible via Linux [Seen on Connect-UTB!],what you need is your USB-plug and a linux machine connected to your LAN and a running DHCP-server on your lan.

Just connect your HTC to your linux machine and boot up android. This will create a usb network connection between your PC and your mobile.

Then create a bridge between the usb-network (most likely usb0) and your network adapter connected to your lan (for me it is eth2) using brctl:

ifconfig eth2 down
ifconfig usb0 down
ifconfig eth2 0.0.0.0 promisc up
ifconfig usb0 0.0.0.0 promisc up
brctl addbr br0
brctl addif br0 eth2
brctl addif br0 usb0



You might assign a network address to the bridge to use networking on your computer as well:

dhclient br0 (might be dhcpcd as well)

After that, fire up a console on your android device. You can use tty0 or the virtual terminal of the dev-tools. Execute


dhcpcd usb0


Dhcpcd will complain about a file that could not be opened or something like this. The reason for this is a missing directory. Just create the directory where the file should be placed in and execute dhcpcd again:


mkdir [directory]
dhcpcd usb0


This should assign a IP address to your android device and set up the gateway information. From now on, networking should work on your device.

If it does not work, something of your configuration might be wrong. Most likely it would mean, that your bridge is not working as expected. There might be a network manager running or your network card does not support bridging.

You can also access your device via telnet on default telnet port. Finding the right ip address of the device might be tricky somehow as the device has a fixed ip on 192.168.0.206 that is the only address shown by busyboxe's ifconfig. One option is looking into your dhcp-servers dhcp-leases. I used wireshark on my linux system instead to sniff the dhcp ack.

There is one thing about security:
The current android image runs an open telnet server, so make sure, that you only connect your mobile to a trusted network. Otherwise any bad guy could steal or deleta all information from your internal phone storage.

Just one thing about proxy servers:
I tried to get it running with a proxy server, but I could not manage it. I added the proxy to the settings.db as described in a android emulator proxy how-to, but it did not work. I would be grateful about any hint.
 

ZED_pt

Senior Member
Feb 20, 2008
246
0
Linda-a-Velha
Thanks for your reply man,very usefull and well explained...too bad i dont use Linux but thanks anyway. :)

PDAnet tethering software from what i read is to connect your pc to the internet using your PDA...i want to connect my PDA using my pc connection with USB
 

lostsoul

Senior Member
Feb 8, 2007
248
17
www.inspectorgadgets.net
Hi all!

My request is to share my PC internet connection to use it in my android with the USB connection.

I only found software to do the reverse(tethering),and im pretty sure talented developers in here can do this without much effort.
Hope im right.

Thanks in advance!

I'm looking for the same thing. Coming from WM, I CANNOT understand why this isn't available on Android.
 

grunf

Member
Jan 24, 2005
37
0
evilkorn at least be respectfull to others.

some of us heave problematic isp configurations and/or can not use wifi in office. only reason to use reverse tethering over usb is such situations.

i still heave to try solution for linux given by k-zik. i heave old pIII laptop with ubuntu on it so i can experiment. as for windows unfortunately there is no solution.
 

michi123

Senior Member
Feb 18, 2007
292
0
Because it's the dumbest idea ever. Spend the $20 and get a router. If you can't afford the router, then you obviously don't need a smart phone.

Maybe to you, not so for others....

I´m looking for the same thing....spending many days and nights a month in different hotels in the US, Canada, China, India etc., not all of which have WIFI in the room.....I´d still like to browse and use the market connecting via the wired internet connection of my laptop.....

Don´t always judge others by your own standards.....;)
 

Sevensix9

Member
May 21, 2009
16
0
Because it's the dumbest idea ever. Spend the $20 and get a router. If you can't afford the router, then you obviously don't need a smart phone.

...Or maybe there are some people in the XDA community that are deployed, like my self, and the only access they have to the internet is on a USB internet stick, unless you can find a better way to get games and what not to play on my phone while I'm in the sand box...

-Alex
 

cyberavner

Member
Nov 25, 2010
5
0
Thanks for your reply man,very usefull and well explained...too bad i dont use Linux but thanks anyway. :)

PDAnet tethering software from what i read is to connect your pc to the internet using your PDA...i want to connect my PDA using my pc connection with USB

There may be a way for Windows too:
blog.mycila.com/2010/06/reverse-usb-tethering-with-android-22.html

I hope some developer will pick up the glove and automate the process because there seems to be an interest in such an application.

I for one, will be very grateful.

Avner.
 
Last edited:

brooon

Senior Member
May 11, 2009
852
155
I just "flew" over the threads content...uhm...so I hope I´m not posting unappealing things...

But: I´m with MDJs Desire HD Rom (4.3) now and Internet via USB works fine here! Give it a try...I was blown away when I saw this function after plugging in the USB cable...
 

cyberavner

Member
Nov 25, 2010
5
0
Thanks,
but we are not talking about a USB tether. We are talking about "reverse USB tether"; connecting a phone without an internet connection with a USB cable to a PC with one.
 
0

00Ghz

Guest
Hi all!

My request is to share my PC internet connection to use it in my android with the USB connection.

I only found software to do the reverse(tethering),and im pretty sure talented developers in here can do this without much effort.
Hope im right.

Thanks in advance!

Get an HDDesire Rom, has this feature already, they call it Internet Passtrough