-
-
Notifications
You must be signed in to change notification settings - Fork 185
Problems with adb connection: what to do
Sometimes you may experience problems with adb connection. They usually look like this: the script gets stuck on some moment for 1-2 minutes and then prints a stacktrace.
Look at the last line of the stacktrace. Usually adb connection error can be identified by one of OSError: RPC server not started! or ReadTimeoutError. This means that your computer cannot send commands to your device or didn't receive a response from the device.
Try these steps one by one until one of them helps. If no one helps, please describe your case here in comments: I'll try to help you myself and improve this post.
- Disconnect your device(s) ->
adb kill-server
-> connect a device -> confirm connection on the device -> check that it's successfully connected via adb devices - Disconnect your device(s) -> kill adb process in Activity Monitor (or Task Manager in Windows) -> connect a device -> confirm connection on the device -> check that it's successfully connected via
adb devices
- Disconnect your device(s) -> reboot both computer and the device -> connect the device -> confirm connection on the device -> check that it's successfully connected via
adb devices
- Run
adb --version
. My version is 1.0.41 and it works fine. If you have older version, upgrade (the way depends on how you installed adb) - Maybe something's wrong with a USB port or a cable? Try another port, another cable. Sometimes using USB2.0 instead of USB3.0 helps.
If problem was fixed once, but occurs again and again, consider using connection via WiFi. Probably your cable is damaged inside and disconnects sometimes.