2

I can't connect to Macbook real android devices through ADB. On the android device, the Allow USB debugging? When I click on OK I see the device in the list with the authorizing status. and the same dialog window appears again. But when clicking allow always from this computer. the result is:

  • daemon not running; starting now at tcp:5037 ADB server didn't ACK
benjamimgomes@MacBook-Pro-de-Benjamim ~ % adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
5200b246c6046669    authorizing

benjamimgomes@MacBook-Pro-de-Benjamim ~ % adb devices
* daemon not running; starting now at tcp:5037
ADB server didn't ACK
Full server startup log: /var/folders/n7/q2g3v5912636l7nlk5wjxw_h0000gn/T//adb.501.log
Server had pid: 9772
--- adb starting (pid 9772) ---
adb I 06-10 12:59:45  9772 218596 main.cpp:63] Android Debug Bridge version 1.0.41
adb I 06-10 12:59:45  9772 218596 main.cpp:63] Version 34.0.3-10161052
adb I 06-10 12:59:45  9772 218596 main.cpp:63] Installed as /usr/local/bin/adb
adb I 06-10 12:59:45  9772 218596 main.cpp:63] Running on Darwin 22.3.0 (x86_64)
adb I 06-10 12:59:45  9772 218596 main.cpp:63] 
adb I 06-10 12:59:45  9772 218599 usb_osx.cpp:325] reported max packet size for 5200b246c6046669 is 512
adb I 06-10 12:59:45  9772 218596 auth.cpp:416] adb_auth_init...
adb I 06-10 12:59:45  9772 218596 auth.cpp:152] loaded new key from '/Users/benjamimgomes/.android/adbkey' with fingerprint 67D7CE45828313B5C603522A897DA24AF86145E4763AFC80530E4297EA554E57
adb I 06-10 12:59:45  9772 218603 transport.cpp:335] 5200b246c6046669: read thread spawning
adb I 06-10 12:59:45  9772 218604 transport.cpp:307] 5200b246c6046669: write thread spawning
adb I 06-10 12:59:45  9772 218596 transport.cpp:1727] fetching keys for transport 5200b246c6046669
adb I 06-10 12:59:45  9772 218596 auth.cpp:468] Calling send_auth_response
adb I 06-10 12:59:45  9772 218596 auth.cpp:435] Calling send_auth_publickey

* failed to start daemon
adb: failed to check server version: cannot connect to daemon

Specifications: MacBook Pro retina; MacOs: Ventura 13.2 (22D49).

I tried everything on the net.

adb kill-server adb start-server adb kill-task

I have already revoked the USB debugging permissions. I have already restarted the device.

I already enabled full device access for adb. I already disabled the firewall.

But the result is always the same.

cannot connect to daemon at tcp:5037: Connection refused

In my activity monitor I don't find any with the name adb or even daemon.

I already tried reinstalling Android platform-tools; I already tried to install it through homebrew. I already reinstall through Android Studio. I've already tried deleting from Path and executing directly. But nothing and nothing really worked.

Please. Someone help me with this problem. I'm about to lose my mind.

Gomes Ben
  • 43
  • 7

2 Answers2

2

Set the environment variable LIBUSB=1 in your shell and it should work. It forces ADB to use another code path for USB communication, apparently.

% export LIBUSB=1

For more details: https://issuetracker.google.com/issues/270205252#comment65

Codemaker2015
  • 12,190
  • 6
  • 97
  • 81
BATMAN
  • 21
  • 1
0

If, by any chance, you're using OpenCore Legacy Patcher on an old Mac it's probably an AMFI issue. Here's what worked for me:

  • Download and install OpenCore Legacy Patcher v0.6.8
  • Launch OpenCore Legacy Patcher
  • Go to Settings at the bottom of the launch screen
  • Select the Security tab
  • Select “Disable AMFI”
  • Press the Return button at the foot of this screen
  • Select “Build and Install OpenCore”

After a reboot adb should be working.

zaphod
  • 1
  • 1