5

I have problems with unreliable debugging with my S5 device on one USB port. I had no similar problem with my Nexus. I can work around the problem by switching USB port, but I really want to know what is going on. One day both USB ports starts to behave this way; and then I will have no clue if I don't fix it now.

Here is what I do to produce the problem.

  1. I Connect phone to USB

This is what the ADB log says at that point

PropertyFetcher: AdbCommandRejectedException getting properties for device c9c2d39f: device offline PropertyFetcher: AdbCommandRejectedException getting properties for device c9c2d39f: device unauthorized. Please check the confirmation dialog on your
device. DeviceMonitor: ExecutionException getting info for device
c9c2d39f

Please not that the phone actually connects -and that I can see the logcat etc on my device after I connect. I have tried to revoke debugging rights from the developer menu, and re-authorized the computer.

  1. Start my app, that I want to debug
  2. Press the "Attach debugger to process" icon (to the right of the regular "debug" icon)

At this point, the "Choose process" dialog appears with no running processes. The phone also disconnects the debugging session, and do not show up when running

Adb devices

At this point a restart of adb has no effect. The only way to get debugging back is to reconnect the phone to the USB port.

As I said, this only happens on one of my USB ports, it works on another. Does anyone have an Idea of what is going on here?

Glenn Bech
  • 6,103
  • 4
  • 39
  • 56

3 Answers3

0

I had a similar issue on an older computer when the computer's motherboard was on its way out. Just as a precaution, you should back-up all of your work and try to determine if this is hardware or software related. From my experience, when USB ports start acting weird, it is usually hardware related.

When mine started to act up, it would connect and acknowledge a connected device, but the computer would throw all sorts of errors regarding reading the device files and even allowing the connection to remain. I tried re-installing software, resets, firmware re-installs, etc. I could not figure out what was going on, so I had my friend check it out (he has around 30+ years experience in computer engineering) and he determined it was my computer's motherboard that was on its way out. He said the only thing that would correct it was to replace the motherboard or get a new computer.

Yistorian
  • 49
  • 10
  • My Nexus 5 worked just fine on any USB for adb debugging – Glenn Bech Feb 17 '15 at 11:29
  • Sorry, didn't see that statement. At this point, it seems to be some sort of software corruption. If not that, then it sounds like the computer is not making itself visible to the S5, which would explain the phone connecting and then disconnecting, which can sometimes happen if there is an issue regarding devices having the rights to view the computer contents. Almost sounds like a Knox issue... – Yistorian Feb 17 '15 at 23:45
0

I had a similar issue too.

Try these steps:

  1. Unplug the usb cable. Reboot your computer and samsung s5

  2. In S5' Developer options, click "Revoke USB debugging authorizations" and press OK

  3. In Android Studio, check "Tools | Android | Enable ADB intergration", if already checked, uncheck it, and then check it again.

  4. Plug your samsung s5, and follow the dialogues instructions to allow this computer ...

  5. Run your app

These steps should fix the problem.

Community
  • 1
  • 1
suchasplus
  • 50
  • 7
0

My S5 active showed 'offline' to ADB despite enabling/disabling debugging, updating the driver, and restarting the phone and computer. Finally - I move the USB plug from a HUB, and plugged it in directly from the phone to the PC - and it finally worked.

Jeff
  • 1
  • 1