Reputation: 1232
When I tried to reset my adb
the following error occurs:
[2011-09-14 09:34:06 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2011-09-14 09:34:07 - DeviceMonitor]Connection attempts: 1
I am just making a simple "hello world" program.
Upvotes: 78
Views: 139571
Reputation: 40878
I faced that after upgrading to Android Studio Bumblebee; and the cause that the adb
server doesn't get started automatically, and required to start it manually.
Even I couldn't start it from Android Studio terminal as it blinks and loses the focus while typing.
So, did that instead from the operating system CLI/terminal by using adb start-server
. Make sure to call that from AndroidSDK\sdk\platform-tools
directory.
If the adb already started, you can try to kill it, then restart it:
adb kill-server
adb start-server
Prepend that with sudo
for Unix based Operating systems.
Upvotes: 5
Reputation: 187
Solution that worked for me on: Ubuntu 20.04, adb 33.0.1, Android Studio Bumblebee 2021.1.1:
Event Log shows that it cannot reach ADB server which is fine. When you run with command in point 3. and 4. adb starts on port 5037. If Studio connected to manually started adb, it'd kill it. That's why 5038 (instead 5037) has to be set in Studio settings.
After next reboot you should just execute 4. and 5.
Upvotes: 0
Reputation: 5672
It seems this issue has no exact solution, because the cause of this issue is not same for everyone. However, if you have faced this issue recently in Android Studio Bumblebee (2021.1.1) and later, then the problem might have happened due to adb mDNS for wireless debugging.
To solve this issue, disable mDNS for wireless debugging from here:
Android Studio > Settings > Build, Execution, Deployment > Debugger > Untick "Enable adb mDNS for wireless debugging"
Update (19th March, 2022):
As mentioned in the issue tracker, this issue has been fixed in adb version 33.0.1
Upvotes: 69
Reputation: 147
Latest version of android studio broke this for me.. adb connected just fine after reinstalling 2020.3.1.26, then I tried to upgrade it again just to see.. and yeah.. busted again. Going to version 2020.3.1.26 works for me now.
Upvotes: 2
Reputation: 779
For me, it wasn't my antivirus or firewall. I had somehow created a bunch of unnecessary virtual network adapters that were interfering with ADB. If this is the case with you, go to Device Manager -> Network Adapter, right-click the virtual network adapters, and uninstall them. You can always easily recreate them.
This answer is what helped me:
How to remove extra host only network interfaces created by vagrant on windows 10?
Upvotes: 3
Reputation: 1078
In my case, which none of the answers above stated. If your device is using the miniUsb connector, make sure you are using a cable that is not charge-only. I became accustom to using developing with a newer Usb-C device and could not fathom a charge-only cable got mixed with my pack especially since there is no visible way to tell the difference.
Before you uninstall and go through a nightmare of driver reinstall and android menu options. Try a different cable first.
Upvotes: 4
Reputation: 150
I know I'm 4 years late but my answer is for anyone who may not have figured it out. I'm using a Samsung Galaxy S6, what worked for me was:
Disable USB debugging
Disable Developer mode
Unplug the device from the USB cable
Re-enable Developer mode
Re-enable USB debugging
Reconnect the USB cable to your device
It is important you do it in this order as it didn't work until it was done in this order.
Upvotes: 8
Reputation: 379
Change to another USB port works for me. I tried reset ADB, but problem still there.
Upvotes: 17
Reputation: 11920
Looks like the installed driver was in bad state. Here is what I did to make it work:
This time the device got installed properly.
Note that I didn't have to modify winusb.inf file or update any other driver.
Hope this helps.
Upvotes: 11
Reputation: 31
Window
->Show View
->device
(if not found ->Other
->Device
) in right most side, there is arrow, click that, you will see reset adb, just click and enjoy!! It worked for me.
Upvotes: 3
Reputation: 4192
In my case, resetting ADB didn't make a difference. I also needed to delete my existing virtual devices, which were pretty old, and create new ones.
Upvotes: 8
Reputation: 67286
Well, its not compulsory to restart the emulator you can also reset adb from eclipse itself.
1.)
Go to DDMS and there is a reset adb option, please see the image below.
2.) You can restart adb manually from command prompt
run->cmd->your_android_sdk_path->platform-tools>
Then write the below commands.
adb kill-server - To kill the server forcefully
adb start-server - To start the server
UPDATED:
F:\android-sdk-windows latest\platform-tools>adb kill-server
F:\android-sdk-windows latest\platform-tools>adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Upvotes: 54