ADB : unable to connect to 192.168.1.10:5555
AndroidAdbAndroid Problem Overview
I cannot use adb connect
to connect via WiFi to my device (Nexus 5, Android 6), but since I'm developing a cordova plugin using USB OTG, I really need to connect via WiFi.
I tried to adb kill-server
, and all solutions provided on SO, and none is working for me...
Before it was working ok (i.e android 5).
Any idea?
Android Solutions
Solution 1 - Android
I had the same issue since the android 6 upgrading. I noticed that for some reason the device is playing "hard to get" when you try to contact it over WIFI.
Try these following steps:
-
Make sure that
Aggressive Wi-Fi to Cellular handover
under Networking section in the device's developer options is turned off. -
ping continuously from your pc to the device to make sure it's not in network idle mode
ping -t 192.168.1.10
(windows cmd), unlock the device and even try to surf to some website just to make it get out of the network idle. -
If ping doesn't work, turn off / on Android Wifi and go back to step 2.
-
When it replies to the ping, connect it via usb, and:
adb usb
adb tcpip 5555
adb connect 192.168.10.1:5555
-
In case it's still not connected, try to switch the USB connection mode as MTP / PTP / Camera while the device is connected through USB and repeat these steps over again...
If the above points are not working please try running ADB as admin. For Ubuntu -
`sudo adb start-server`
Solution 2 - Android
I had the same issue. i tried all commands like adb kill-server
then
adb tcpip 5555
then
adb connect <IPAddress>:5555
but the issue remain same
the IP address which i used to connect ... showing me message unable to connect .....
what i did is go to phone's settings
then About phone
then Status`
then check IP address
Now try to connect phone with that IP address
Note : - The problem is the IP address changed which i used to connect
Solution 3 - Android
I had the same problem. The solution was as follows.
In Developer Options.
- Activate "Allow ADB debugging in load only mode."
- In Spanish, "Permitir depuración ADB en modo solo carga."
Explanation My problem was as follows: I was doing all the steps:
- adb kill-server
- adb start-server
- adb tcpip 5555
- adb connect (your ip).
After completing these steps, I disconnected the phone from the USB cable, and the connection was lost, I could not make the wireless connection.
However, this worked for me on a Huawei ALE-23 cell phone, but it did not work for me on the Huawei Y9S cell phone (Android 10), it failed.
I solved it only by activating the option "Allow ADB debugging in load only mode" in the cell Huawei Y9S.
Cheers!!!.
Solution 4 - Android
Make sure you are not connected to a VPN. I was able to connect to adb as soon as I disconnected from the VPN. For a sure way to connect do this:
- Unplug USB
- Restart Android device
- Shutdown Android Studio or any other IDE using ADB
adb kill-server
- Plug back in USB after restart
adb devices
This automatically starts the server. You sould see the device plugged in via USBadb shell ip addr show wlan0
to get your devices IP addressadb tcpip 5555
Set the port to 5555 that you want to connect throughadb connect 192.168.0.6:5555
Replace IP address with one from step 6.- Disconnect the USB
Solution 5 - Android
First, you need to pair your computer :
- Go to
Wireless debugging > Pair device with pairing code
. - Go to
console
of your pc and runadb pair ip:port pairing_code
- Now , run
adb connect ip:port
on your pc and enjoy. - Go to
Android Studio
and you can the see new device.
Solution 6 - Android
I used the same approach as @IVAN MANJARREZ https://stackoverflow.com/questions/33462720/adb-unable-to-connect-to-192-168-1-105555/61493361#61493361
The only difference was I used Huawei - p20 pro. Where for p20 - pro, you have to search for and activate "Allow ADB debugging in charge only mode"
Solution 7 - Android
To connect your phone to adb you can use the given steps... To download ADB manually go to given link... https://developer.android.com/studio/releases/platform-tools.html
- Unplug USB
- Restart Android device
- Shutdown Android Studio or any other IDE using ADB
- adb kill-server
- Plug back in USB after the restart
- adb devices This automatically starts the server. You sould see the device plugged in via USB
- adb shell ip addr show wlan0 to get your devices IP address
- adb tcpip 5555 Set the port to 5555 that you want to connect through
- adb connect 192.168.0.6:5555 Replace IP address with one from step 6.
- Disconnect the USB
Solution 8 - Android
I have tried everything but still, nothing worked for me. Then randomly, I used the following command:
> $ adb tcpip 5555 > > error: no devices/emulators found > > $ adb connect 192.168.0.104:5555 > > failed to connect to 192.168.0.104:5555 > > $ adb connect 192.168.0.104:5555 > > already connected to 192.168.0.104:5555
It was connected at this point but my device was offline. I was always able to connect at the second attempt but my device was always offline. At this point, I connected my device to my PC with USB.
> $ adb tcpip 5555 > > error: more than one device/emulator > > $ adb disconnect > > disconnected everything > > $ adb tcpip 5555 > > restarting in TCP mode port: 5555 > > $ adb connect 192.168.0.104:5555 > > connected to 192.168.0.104:5555
I disconnected my USB and voila! my device was still connected. I am sorry but I can't explain why it worked. I was randomly trying different things on internet. I had used the same commands several times but in different orders but they didn't work. I hope it will help someone.
Solution 9 - Android
I solved this problem by disabling USB debugging and enabling it again
Solution 10 - Android
The critical step in getting this to work is disconnecting the usb cable after issuing the adb connect xx.x.x.xx:5555 command. At this point you are connected but unauthorized. Execute adb kill-server and re-issue the connect command. Verify with execution of adb shell date.
Solution 11 - Android
In my case I had to shut of and on the wifi adb debugger app, on the device. On another USB device I had to shitch off and on developer mode, then re-set the development options. Also reset my pc.
Seem that adb in some way made a mess with global communication and all the debug communication have to be reset on both sides.
After this the devices start to comunicate again
Solution 12 - Android
sudo adb start-server
Just worked for me. after A day of looking for a solution.
Solution 13 - Android
connect using USB and Just use this command
adb tcpip 5555
It will restart services
and then adb connect <device-ip>:5555
Note: to find device IP, you can navigate to wifi -> YOUR_NETWORK -> IP address
Solution 14 - Android
So my situation was that i restarted it in tcp mode but still couldn't connect, i had an No route to host
error ,so i tried pinging it but i couldn't find it either even though it was on the arp table. so what i noticed was that when i connect it by usb, it pings successfully. so i had to do the adb connect ip
before i could unplug the usb.
Solution 15 - Android
I ran into this same issue on not being able to connect via Wi-Fi but was using the snap version of scrcpy
. I kept seeing messages like adb server version (40) doesn't match this client (39); killing...
when I would run adb
or scrcpy
commands but it still worked, until I tried to connect over Wi-Fi.
$ scrcpy
INFO: scrcpy 1.16 <https://github.com/Genymobile/scrcpy>
adb server version (40) doesn't match this client (39); killing...
* daemon started successfully
adb: error: failed to get feature set: no devices/emulators found
ERROR: "adb push" returned with value 1
I believe this means it was unable to push the server app to the device.
Running the commands to setup Wi-Fi using the adb built into the snap, scrpy.adb solved this for me.
$ scrcpy.adb tcpip 5555
$ scrcpy.adb connect 192.168.1.25:5555
connected to 192.168.1.25:5555
$ scrcpy
INFO: scrcpy 1.16 <https://github.com/Genymobile/scrcpy>
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed. 0.6 MB/s (33622 bytes in 0.051s)
[server] INFO: Device: XXXXX XXXXXXX (Android 9)
INFO: Renderer: opengl
INFO: OpenGL version: 4.6.0 NVIDIA 390.25
INFO: Trilinear filtering enabled
INFO: Initial texture: 1440x2560
Solution 16 - Android
I faced the same issue with the ADB over WiFi connection between my Android 10 phone and Windows 10 PC, which was OK before and suddenly this happened. After reading this question and answers above, I first turned off WiFi on my router and turned it back on.(I repeat not the router, just WiFi) It worked.
Solution 17 - Android
I created this powershell script that automates the connection to the phone, to make it work follow the steps and reassign the variables to make it work on your device
#Important!!!
# Enable developer options on your phone and follow the steps below:
# Step 0: Developer options > (USB debugging = true) and (Permanently accept the digital signature of the computer)
# Step 1: Developer Options > Active Screen = true
# Step 2: Developer options > Allow ADB debugging in load-only mode = true
$customPort = '5555'
$ipPhone = '192.168.1.53'
$fullIpPhone = $ipPhone + ':' + $customPort
Write-Host
Write-Host '=============Start script============='
adb usb
Write-Host
Write-Host '=============Start clean network============='
adb devices
adb disconnect
adb kill-server
adb devices
Write-Host
Write-Host '=============Start connection============='
adb tcpip $customPort
# adb tcpip 5555 # $customPort
adb connect $fullIpPhone
# adb connect 192.168.1.53:5555 # $fullIpPhone
adb devices
Write-Host
Write-Host '=============End script============='