8

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.

  • Are you trying to connect through a WiFi connection, or have you tried connecting through a USB cable? – Michael Dougan Nov 26 '19 at 20:48
  • Both. My devices are not reading when connected to my computer, which is odd. – Courtney Taniguchi Dec 03 '19 at 02:23
  • When I connect through wifi, that is when I get the rejection message. – Courtney Taniguchi Dec 03 '19 at 02:23
  • This is what I'm unable to find out - what does "Connection refused" error message mean? – Courtney Taniguchi Dec 03 '19 at 02:23
  • Typically, when you try to connect a phone to a computer for the first time, one or the other computer is prompted that a device wants to connect to you, do you trust that device? You have to accept the connection. It could be that you are not seeing that prompt, and the attempt to connection times out? – Michael Dougan Dec 03 '19 at 16:35
  • I don't get this message. I did on CTV devices but not on the mobile and tablet devices. – Courtney Taniguchi Dec 03 '19 at 18:05
  • On the Android devices, did you go to settings/developer section and select the Enable USB Debugging option and select YES? You also have to enable the Unknown Sources option to allow installs from non-app store sources. – Michael Dougan Dec 03 '19 at 20:59

5 Answers5

11

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
crifan
  • 12,947
  • 1
  • 71
  • 56
3

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
JacquesBauer
  • 226
  • 2
  • 7
3

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

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.

Michael Dougan
  • 1,698
  • 1
  • 9
  • 13
0

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!