ADB Connection refused from Mac to Android

13.3k views Asked by At

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.

5

There are 5 answers

0
crifan On

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
0
Michael Dougan On

If you are stuck in the sideloading process, you can always e-mail the .apk file to yourself at an e-mail address which is configured on the phone, download the attachment, then go to 'downloads' app, and click on the .apk file, it should ask if you are sure you want to install the app, just say yes. You have to make sure that you have already selected 'Allow' in the Unknown Sources section in Settings/Development.

1
AudioBubble On

I had the same error. Solved by following extra steps mentioned here which is connecting the device via USB and then executing the following command after finding device id :

./adb -s <device id> tcpip 5555
0
proverbian On

Same happened with me. Always rejected, I have two devices used to connect over wifi for some Android Project, im always rejected to 5555 on my Huawei Device. But there is one workaround i know that works.

➜  ~ adb connect 192.168.8.108:5555
failed to connect to '192.168.8.108:5555': Connection refused
➜  ~ adb connect 192.168.8.108:7612
connected to 192.168.8.108:7612

Try port 7612

Thanks!

2
JacquesBauer On

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