0

I want to view my localhost server over android (so I can do remote mobile debugging)

I enabled usb tethering, usb debugging, installed driver, all is set up. Here is what I get when I run ipconfig

Ethernet adapter Ethernet 2:

Connection-specific DNS Suffix  . :
Link-local IPv6 Address . . . . . : fe80::5cd2:fcaf:ccrb:9653%13
Autoconfiguration IPv4 Address. . : 169.254.150.83
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :

Windows Network And Sharing Center says "Access Type: No network access". I cannot access a webpage on my computer over the USB connection to my LTE phone.

It will not give me a normal IPv4 address. I tried unplugging my LAN cable and USB tether again but same. What am I missing to get my phone to connect to my computer via USB tethering?

TetraDev
  • 16,074
  • 6
  • 60
  • 61
  • a dhcp server.... if you get 169.254, that's an auto-config IP that the computer chooses randomly if it fails to get a response from a DHCP server (or if you have a static IP configured and the system detects an IP conflict). and note that tethering only goes one way: phone acts as a proxy for another device to use the phone's cellular data connection. using your PC to provide internet to the phone is "reverse proxy", and not supported by android directly. – Marc B Mar 10 '16 at 21:27
  • Good to know about the reverse proxy not supported by default. But I don't really need that, I just need to access my localhost on my computer. What is causing DHCP to fail to get a response? – TetraDev Mar 10 '16 at 21:46
  • your carrier may have disabled tethering. they tend to frown on people actually using their device. – Marc B Mar 10 '16 at 21:58
  • I'm using a rooted android with cyanogenmod 12 - usb tethering is successful (I'm not using wifi tethering). Computer sees the device and ADB can communicate. – TetraDev Mar 10 '16 at 22:09

2 Answers2

0

Try sudo dhclient -v

You can get your device name from this command ifconfig -a

Then look for the network adapter that has no inet address specified

-1

hope u got the problem fixed. if not here my solution: activate the usb debug mode on your phone. this solved my problem!

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 17 '22 at 10:02