Reputation: 853
Problem: adb start-server fails.
--- adb starting (pid 1414) ---
adb I 12-05 17:28:30 1414 48453 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 12-05 17:28:30 1414 48453 main.cpp:57] Version 27.0.0-4455170
adb I 12-05 17:28:30 1414 48453 main.cpp:57] Installed as /Users/[username]/Library/Android/sdk/platform-tools/adb
adb I 12-05 17:28:30 1414 48453 main.cpp:57]
adb I 12-05 17:28:30 1414 48453 adb_auth_host.cpp:416]
adb_auth_init...
adb I 12-05 17:28:30 1414 48453 adb_auth_host.cpp:174] read_key_file '/Users/[username]/.android/adbkey'...
adb F 12-05 17:28:30 1414 48466 transport_usb.cpp:37] Check failed: usb_packet_size < 4096ULL (usb_packet_size=5120, 4096ULL=4096)
Catalyst: Installing platform tools v27.0.0
Solutions Tried: Restarting Android Studio, Restarting computer, Manually starting ADB via terminal, deleting /Users/[username]/.android/adbkey and adbkey.pub, and reinstalling platform tools
Also I am not using genymotion, just the stock emulator.
Upvotes: 69
Views: 12312
Reputation: 1
I had the same issue. I was brainstorming it for more than 2 weeks without any possible solution. Browsed through all the resources that were available on the internet to solve the issue but could not.
After all the hassle I came to this answer. It worked for me though in not the exact way but the older SDK Platform-tools helped. I am using a 2014 Mac Mini which is not officially OSX Ventura ready from Apple. But for my work, I had to install OSX Ventura through legacy core patcher and after that Android Studio started behaving in a weird way. Always showing could not connect daemon, failed to establish connection, trying to connect at TCP 5037
. ADB Server could not establish connection.
I replaced all the files in the SDK platform-tools directory with the older SDK platform-tools files and then it started working. Previously I had 34.0.1 platform-tools darwin.
Thanks again for such a solution @Mokkun
Upvotes: 0
Reputation: 35
I got this issue when i got a new usb-c usb 3.0 cable. However when i use my other cable (which came with the phone - usb-c to usb 2.0) i did not get the issue. I hope this helps when you don't want to rollback your platform tools, and have a couple of spare cables lying around ;)
Upvotes: 0
Reputation: 1823
It is a bug with the latest version of the platform tools (27.0.0), the solution I found was to downgrade to the previous version.
Remove the current platform-tools
directory located in the android-sdk
directory, then download the older version from here:
[Update]: Some users (myself included) have noticed that the issue only happens when your phone is plugged in, so if you don't need to test on it, try to unplug it and use an emulator. Also worths noticing that all reported devices were from the Google Pixel line, so other devices might not cause the issue.
[Update 2]: This seems to be solved in the latest update of the platform-tools (27.0.1).
Upvotes: 90
Reputation: 19848
I had the same issue after updating to API 27. I also have a Pixel, which was plugged in at the time. Unplugging the device and starting the adb server manually with adb start-server
worked for me.
Upvotes: 0
Reputation: 149
I ran into the same issue.
I got 27.0.0 to work by "Revoke USB debugging authorizations" under Debug Settings on the phone and rebooting phone and rebooting Mac. And it worked.
However, I had switched to not using my dock and plugging a Pixel straight into the MacBook (USB-C) since I had earlier suspected that. But that is not my normal hook up.
When I switched back to the dock the whole problem started again.
So I guess I'll roll back to 26.0.2
Upvotes: 1
Reputation: 329
To add to the answer, here are some commands to quickly rollback on Macs. This was borrowed and tweaked from a helpful post in the bug tracker
cd $ANDROID_HOME && rm -rf platform-tools/ && curl https://dl.google.com/android/repository/platform-tools_r26.0.2-darwin.zip -o platform-tools_r26.0.2-darwin.zip && unzip platform-tools_r26.0.2-darwin.zip
Upvotes: 22