adb start-server failed because avahi mdns listening on udp port 5353
I have also set:
export ANDROID_ADB_SERVER_PORT=5037
Errors:
* daemon not running; starting now at tcp:5037
ADB server didn't ACK
Full server startup log: /tmp/adb.1000.log
Server had pid: 15083
--- adb starting (pid 15083) ---
01-22 07:51:48.706 15083 15083 I adb : main.cpp:63 Android Debug Bridge version 1.0.41
01-22 07:51:48.706 15083 15083 I adb : main.cpp:63 Version 35.0.2-12147458
01-22 07:51:48.706 15083 15083 I adb : main.cpp:63 Installed as /home/xxx/Apps/androidSDK/platform-tools/adb
01-22 07:51:48.706 15083 15083 I adb : main.cpp:63 Running on Linux 6.4.0-150600.23.33-default (x86_64)
01-22 07:51:48.706 15083 15083 I adb : main.cpp:63
01-22 07:51:48.706 15083 15083 I adb : auth.cpp:416 adb_auth_init...
01-22 07:51:48.707 15083 15083 I adb : auth.cpp:152 loaded new key from '/home/xxx/.android/adbkey' with fingerprint F6D5DF2B64E25FF6D871E6706509564A432872434A5FE3786B53DB7F6701A53D
01-22 07:51:48.707 15083 15083 I adb : auth.cpp:391 adb_auth_inotify_init...
01-22 07:51:48.707 15083 15083 I adb : udp_socket.cpp:170 AdbUdpSocket fd=16
01-22 07:51:48.707 15083 15083 I adb : udp_socket.cpp:170 AdbUdpSocket fd=12
01-22 07:51:48.707 15083 15083 I adb : udp_socket.cpp:274 SetMulticastOutboundInterface for index=2
01-22 07:51:48.707 15083 15083 I adb : udp_socket.cpp:533 bind endpoint=0.0.0.0:5353
01-22 07:51:48.707 15083 15083 I adb : udp_socket.cpp:274 SetMulticastOutboundInterface for index=2
01-22 07:51:48.707 15083 15083 I adb : udp_socket.cpp:558 bind endpoint=[0000:0000:0000:0000:0000:0000:0000:0000]:5353 scope_id=0
01-22 07:51:49.707 15083 15083 E adb : usb_libusb.cpp:598 failed to open device: Access denied (insufficient permissions)
01-22 07:51:49.707 15083 15083 I adb : transport.cpp:1153 ZE222WXJCQ: connection terminated: failed to open device: Access denied (insufficient permissions)
* failed to start daemon
error: cannot connect to daemon
lsof :
sudo lsof -i :5353
[sudo] password for root:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
avahi-dae 918 avahi 11u IPv4 26065 0t0 UDP *:mdns
avahi-dae 918 avahi 12u IPv6 26066 0t0 UDP *:mdns
How do I set UDP port ? What is the environment variable name for setting UDP port ?
Source: View source