Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - ADB start server fails, adbkey check fails

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.

like image 328
RJ Aylward Avatar asked Dec 06 '17 01:12

RJ Aylward


People also ask

How do I reset my adb server?

To stop the adb server, use the adb kill-server command. You can then restart the server by issuing any other adb command.

How do I fix the adb server I didn't ack?

The ADB server binds and listen to port 5037. If that port is taken and/or if the daemon is already running, you'll see that error message. Start task manager and kill adb.exe (all the instances of it). If that don't work, try rebooting your computer and your phone, and trying again.


1 Answers

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:

  • Mac: platform-tools_r26.0.2-darwin.zip

[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).

like image 178
Mokkun Avatar answered Oct 01 '22 00:10

Mokkun