How to restart ADB manually from Android Studio
open cmd and type the following command
netstat -aon|findstr 5037
and press enter.
you will get a reply like this :
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 3372
TCP 127.0.0.1:5037 127.0.0.1:50126 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:50127 TIME_WAIT 0
TCP 127.0.0.1:50127 127.0.0.1:5037 TIME_WAIT 0
this shows the pid which is occupying the adb. in this 3372 is the value. it will not be same for anyone. so you need to do this every time you face this problem.
now type this :
taskkill /pid 3372(the pid you get in the previous step) /f
Voila! now adb runs perfectly.
open command prompt -> cd
to your sdk\platform-tools
type below command:
adb kill-server && adb start-server
Open Command prompt and go to
android sdk>platform-tools>
adb kill-server
press enter
and again
adb start-server
press enter