Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Usb tether and debug at the same time

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?

like image 580
rocknow Avatar asked May 31 '12 10:05

rocknow


People also ask

Is USB debugging same as tethering?

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.

Should I have USB Debugging be on or off?

Trustwave recommends that mobile devices should not be set to USB Debugging mode. When a device is in USB Debugging mode, a computer connected to the device can read all data, run commands, and install or remove apps. The security of the device settings and data could be compromised.

What happens if USB Debugging is off?

Basically, leaving USB debugging enabled keeps the device exposed when it's plugged in over USB. Under most circumstances, this isn't a problem—if you're plugging the phone into your personal computer or you have the intention of using the debugging bridge, then it makes sense to leave it enabled all the time.

Can I use my phone while USB tethering?

If you plan to use a mobile hotspot all day, you will also need to keep your phone running constantly; this will not be a problem if you connect your phone to your computer while tethered since your phone will be charging while plugged in via USB.


2 Answers

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!

like image 102
Manjeet Brar Avatar answered Oct 08 '22 04:10

Manjeet Brar


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..

  • Device not detected in Eclipse when connected with USB cable

  • http://developer.android.com/tools/device.html

  • Eclipse not finding phone

  • PdaNet 3.5

  • Eclipse Juno Service Release 1; Build id: 20120920-0800

like image 26
CodeShane Avatar answered Oct 08 '22 03:10

CodeShane