Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADB Connection refused from Mac to Android

I am trying to sideload a build to my phone, Alcatel Android 7. I have been able to sideload to it before but it's stopped working when I switched to a new network. I am running it from MacOS terminal.

Courtneys-MacBook-Pro-3:~ courtneytaniguchi$ adb connect 10.0.0.216
failed to connect to '10.0.0.216:5555': Connection refused
Courtneys-MacBook-Pro-3:~ courtneytaniguchi$ 

This phone is developer enabled, I have allowed installation of apps from unknown sources turned on in security, and USB debugging is on too. Yes, I am on the same network.

like image 703
Courtney Taniguchi Avatar asked Dec 13 '22 10:12

Courtney Taniguchi


2 Answers

I had a similar problem failed to connect to '192.168.31.84:5555': Connection refused, final worked by:

  • kill and restart adb
    • adb kill-server
    • adb start-server
  • makesure USB wired connected
    • adb devices can see your device id
  • re-config to tcpip mode: adb tcpip 5555
    • Note: for multiple USB connected devices, should specify device serial id:
      • adb -s device_serial_id tcpip 5555
  • connect to you device via WiFi: adb connect your_android_phone_ip:5555

Full log for your refer:

 adb kill-server
 adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully

 adb devices
List of devices attached
2e2a0cb1    device
orga4pmzee4ts47t    device

 adb tcpip 5555
error: more than one device/emulator

 adb -s 2e2a0cb1 tcpip 5555
restarting in TCP mode port: 5555

 adb connect 192.168.31.84:5555
connected to 192.168.31.84:5555
like image 147
crifan Avatar answered Dec 28 '22 02:12

crifan


Based on the commands you are entering it seems you are trying to do adb over wifi.

The following may help:

  1. Rebooting the phone
  2. Ensuring the phone is listening over TCP/IP by connecting to it via the USB and entering adb tcpip 5555
  3. Turning USB debugging off and on again
like image 25
JacquesBauer Avatar answered Dec 28 '22 02:12

JacquesBauer