12

I need network connection on my Android device to test apps. My notebook WiFi adapter is broken, so after 2 hours I've set connection via USB. But! Eclipse doesn't see the device when I start "Wired Tether" on it to get connection and I can't debug my apps.

Does anybody know how to solve this issue? Use USB tethering to get internet connection on phone and debug apps at the same time?

Peter O.
  • 28,965
  • 14
  • 72
  • 87
rocknow
  • 1,928
  • 2
  • 26
  • 55
  • What exactly do you mean? Do you want internet connection on your netbook, via your phone? Or internet connection on your phone, via your netbook. Answers to both of these cases are below. – NickL Nov 02 '12 at 13:05

10 Answers10

9

I don't know of a way to simultaneously use USB debugging and tethering. Here are some workarounds, though:

I know these solutions involve some cost, effort, or inconvenience, but hopefully one will work for you.

EDIT:

As noted in answers from @shkschneider and @CodeShane, Internet sharing via Bluetooth is possible. CodeShane's answer mentions PdaNet (which apparently also allows for simultaneous USB tethering and debugging), and includes a link. Another solution is OpenGarden. These solutions provide access to the Internet for the computer via the phone. If the reverse is desired (and this is not entirely clear from the question), reverse tethering seems to be the answer (see the answer from @NickL).

Community
  • 1
  • 1
hBrent
  • 1,628
  • 1
  • 17
  • 36
3

Long story short: you can't. Android simply does not supports it (that is more because of the USB standard and tethering action than AOSP's fault).


So to go around the problem, you should either:

  1. Get internet form another source

    Maybe you could have ethernet connection?

  2. Tether internet from your phone to your netbook in another way

    You can't use wireless tether since your wifi adapter is broken, but maybe you could tether using bluetooth?

  3. Debug your phone in another way

    Maybe you could use an android application like aLogCat or similar?


But in the hand, sorry, you can't tether usb from phone to netbook while usb debugging from the netbook. Your success will depend on your ability to find an alternative solution.

Community
  • 1
  • 1
shkschneider
  • 16,338
  • 12
  • 55
  • 107
  • Short story it bit longer: You can, see my answer. – NickL Nov 02 '12 at 07:39
  • @NickL your answer does not propose how to tether and debug from netbook (read the question: his wifi adapter is broken) – shkschneider Nov 02 '12 at 11:53
  • Hmm the first sentence confuses me then. He needs connection on his phone, which means he does not currently have connection on his phone. So tethering your PC with your phone to get connection on your pc, will not work since he does not have connection on his phone? I asumed: PC connects to internet with ethernet, he needs connection on phone -> reverse tether with PC so phone has connection. The wifi part could be: wifi tethering not possible, so HAS to be USB or bleutooth. – NickL Nov 02 '12 at 12:45
  • 1
    @NickL you're right it is confused. Depending on what he meant, yours or mine is best I think. – shkschneider Nov 02 '12 at 12:47
  • "Use USB tethering to get internet connection on phone" sounds like reverse tethering to me.. could OP be a bit more clear? – NickL Nov 02 '12 at 12:48
  • Also, note that the OP and the person offering the bounty are 2 different people, and that the original question goes back to May, so who knows what's really needed at this point! I assumed that the phone was providing Internet access to the computer, but I agree that some of the content in the question definitely suggests the reverse. – hBrent Nov 02 '12 at 21:08
2

I would like to point out that I am using PDANet for USB-tethered internet to type this reply while I am also debugging an android application on the same phone via Eclipse Juno. Not sure which side fixed this, but it is awesome!

As for why Eclipse isn't seeing your device, standard troubleshooting tips apply .. make sure to enable USB debugging and unknown sources/3rd party apps, try restarting, check usb drivers, update drivers/eclipse..

Community
  • 1
  • 1
CodeShane
  • 6,350
  • 1
  • 16
  • 23
  • It works. After installing the app I can use simultaneously usb tethering and usb debugging with the native enabling options of android. I didn't need to use the app options to enable tethering, actually I I have logged out the desktop app and still works. – Ruben Jan 21 '21 at 00:41
1

You can use bluetooth tethering to get internet connection and debug using USB.

Code Word
  • 356
  • 2
  • 9
0

Yes, its possible. There's a hack available at below links !

Source: HowToGeek , StackOverFlow

Community
  • 1
  • 1
Gaurav Arora
  • 16,016
  • 5
  • 31
  • 42
0

If I understand your question correctly, you want to tether your phone to the PC via USB, and use the (internet)connection of your PC + still get logcat output?

Then yes, this certainly is possible.Tethering is when your PC uses the internet of your phone, the other way around is called reverse tethering. Your device has to be rooted, then you can use this application for reverse tethering.

When you connect your phone to the computer via USB, you press 'connect' in the application. It then installs an app on your phone, which handles the reverse tethering connection. It works, I sometimes have to press 'check DNS' while it is connecting to make it working.. but it works! Also debugging via USB works the usual way.

NickL
  • 4,132
  • 2
  • 19
  • 38
0

You can actually connect the adb to the phone via TCP. You may need a rooted phone for this to work, though

Joe Plante
  • 5,952
  • 2
  • 27
  • 23
0

Step 1. Turn off USB tethering Step 2. Turn on Wireless USB Debugging

  • Connect to your device via USB
  • Enter "adb tcpip 5555"
  • Unplug your device
  • Look up your device's IP in the system settings
  • Enter "adb connect [ip address]:5555"

Step 3. Turn on USB tethering

Now you can use internet via USB cable and debug app in wireless mode That's it!

Manjeet Brar
  • 894
  • 1
  • 10
  • 27
0
  • First you need to debug your device using USB cable then type adb tcpip 5555 it will allow debugging via TCP/IP protocol.

  • After that turn on your USB tethering, now your computer get internet connection but lost the USB debugging.

  • Now you must know your phone IP address so you can debug via TCP/IP. You can use command arp -a in terminal and look at the gateway address.

  • The last is connect to your phone using adb connect yourphoneip:5555 for example adb connect 192.168.42.129:5555

Now you get debug and tether at the same time

ANKsite
  • 1
  • 2
-2

You can use

  1. WiFi Tethering - For Internet connection
  2. Connect USB for adb.
venkatvb
  • 673
  • 1
  • 9
  • 23