Android: Adb rejected connection to client

adb, android, debugging, intellij-idea, shell

Solution

I just had this issue, and Googling didn't yield a ton of results when I looked it up. Alchete's answer was what solved this issue for me, but being new to the Windows command line, I didn't know how to execute it. So I just want to elaborate in case anyone is in the same boat as I was.

Open the Start Menu and type cmd to get to the command line.

Change directories to get to the sdk folder that contains the adb.exe file.

For me the command looked like this:

cd Documents\Programming\android-studio\sdk\platform-tools

Adjust based on the path to your sdk folder.

Then, you can enter:

adb kill-server

Followed by:

adb start-server 

Problem

I was trying to install an app on my nexus 5 from intellij and for the first time i get an error saying ``` "DeviceMonitor: Adb rejected connection to client '5081': closed" ``` I tried restart my adb restart computer, disable, enable android debugging sync gradle. The weird thing is that when i try running it on a virtual device it works. Anyone has an idea? Here is the full error code : DeviceMonitor: Adb rejected connection to client '5081': closed DeviceMonitor: Adb rejected connection to client '5064': closed DeviceMonitor: Adb rejected connection to client '4962': closed DeviceMonitor: Adb rejected connection to client '5081': closed DeviceMonitor: Adb rejected connection to client '5064': closed DeviceMonitor: Adb rejected connection to client '5064': closed DeviceMonitor: Adb rejected connection to client '3483': closed DeviceMonitor: Adb rejected connection to client '3483': closed logcat shows nothing, i tried running it in terminal "adb logcat" and it showed normal either.

Original source

Related problems