Unreliable debugging with Android Studio and Samsung S5

I have problems with unreliable debugging with my S5 device on the same USB port. I had no such problem with my Nexus. I can get around the problem by switching the USB port, but I really want to know what is going on. One fine day, both USB ports begin to behave this way; and then I won’t know if I don’t fix it now.

Here is what I am doing to create a problem.

  • I connect the phone to USB

This is what the ADB magazine says at that moment

PropertyFetcher: AdbCommandRejectedException gets properties for device c9c2d39f: device is disabled PropertyFetcher: AdbCommandRejectedException Retrieving properties for device c9c2d39f: device is unauthorized. Please check the confirmation dialog box on your site device. DeviceMonitor: ExecutionException gets information for the device
c9c2d39f

Please do not say that the phone is really connecting - and I can see logcat, etc. on my device after connecting. I tried to revoke debugging rights in the developer menu and restart the computer.

  1. Run my application that I want to debug
  2. Click the Attach Debugger to Process icon (to the right of the regular debug icon)

At this point, the "Process Selection" dialog box appears without the processes running. The phone also disconnects the debugging session and is not displayed at startup

Adb devices

Restarting adb is not affected at this point. The only way to get debugging is to connect the phone to a USB port.

As I said, this only happens on one of my USB ports, it works on the other. Does anyone have an idea of ​​what's going on here?

+5
source share
3 answers

I had a similar problem on an older computer when the computer motherboard was output. As a precaution, you need to back up all of your work and try to determine if it is related to hardware or software. In my experience, when USB ports start acting weird, it's usually hardware related.

When my user started to act, he connected and confirmed the connected device, but the computer would throw all kinds of errors related to reading device files and even if the connection remains. I tried reinstalling the software, resetting, reinstalling the firmware, etc. I could not understand what was happening, so I had a friend of mine (he has more than 30 years of experience in computer engineering), and he determined it was my computer motherboard, which was on the threshold. He said that the only thing that fixes is to replace the motherboard or get a new computer.

0
source

I also had a similar problem.

Try the following:

  • Disconnect the USB cable. Restart your computer and samsung s5

  • In the S5 'developer settings, click "Cancel USB debugging authorization" and click OK

  • In Android Studio, select the "Tools | Android | Enable ADB Interconnect" check box, if it is already installed, clear the check box, and then check it again.

  • Connect your samsung s5 and follow the instructions in the dialogs to enable this computer ...

  • Run the application

These steps should fix the problem.

0
source

My S5 active showed "offline" for ADB, despite turning on / off debugging, updating the driver and rebooting the phone and computer. Finally, I move the USB plug from the hub and connect it directly from the phone to the PC - and it finally worked.

0
source

Source: https://habr.com/ru/post/1212871/


All Articles