I Connected my moto g2(Lollipop) to adb over WIFI using the commands
adb tcpip 5555
adb connect 192.168.2.6:5555
It was successfully connected
when i checked how many devices are connected.
It was showing 2 devices.
1.Device over USB
Device over WIFI with the IP address
So i need to use the device with WIFI So i unplugged the usb
To my Shock both devices are disconnected. I dont why? Please Help me
Restart the adb connection with an adb kill-server then you should be able to reconnect and see your device with adb devices again.
Sidenote: I like this app to use adb over wifi.
Related
I can connect to my smartphone with ADB using a usb cable,
I'm also able to connect over tcp/ip to the same smartphone with
adb connect 192.168.1.110 while the usb cable is still connected.
But, as soon as I disconnect the cable, I loose the tcp/ip connection, the device appears to be "offline" (as result to "adb devices" command) and I cannot reconnect over network until I re-connect the cable.
My steps are (this way it works) :
connect the usb cable
adb kill-server
adb tcpip 5555
adb connect 192.168.1.110 (here it connects succesfully!)
disconnect usb cable => I loose network connection to the smartphone
If after step 3 I disconnect the cable, the step 4 doesn't work (port 5555 closed)
It seems like adbd daemon is running ONLY when the cable is connected.
AS my device is not rooted I don't find any way to force adbd daemon to start without connecting the usb cable.
Any idea?
[UPDATE]
I just tried to scan the smartphone for tcp port opened and I found that as soon as I run the command:
adb tcpip 5555
the scanning found the port 5555 opened
but as soon as I disconnect the usb cable, I run again the scan and the port 5555 is found to be closed
This confirm that as soon as I disconnect the usb cable don't know why but adb stop responding on port 5555 or the daemon itself get killed or similar
[UPDATE]
I just did the same steps on another Android device (an asus tablet) and it works perfectly, when I disconnect the cable, the tcp port remain opened, so the issue is not with the steps I'm following but with something else
[UPDATE]
I found other posts with similar issue, this is one of them:
adb connection by wifi getting killed when a new USB attached/detached
, unfortunately I cannot do what he says as my smartphone is not rooted and I'm am in the same situation of comment by Osama in that post
I'm also testing on a Honor phone. I found a solution to solve this problem. You can try to turn on Allow ADB debugging in charge only mode and turn off Always prompt when connecting to USB. It should fix the problem.
Here is the reference for the solution.
Bellow commands allows you always get 5555 as default port number, try this out
Make sure you have wifi configured as "auto connect", also set always allow the adb from net work under developers manul
adb root
adb remount
adb shell setprop persist.service.adb.enable 1
adb shell setprop persist.adb.tcp.port 5555
adb reboot
Hello I can solve problem
First of all connect your device with cable (usb debbuging) click on allow on phone if it asks about debugging
Now open cmd
type cd 'Location of scrcpy'
than type the following
adb tcpip 5555
If it asks you again to do adb tcpip 5555 do it again
adb connect <'device-ip-adress'>
Disconnect the device by removing the cable
scrcpy -s <'device-ip-adress'>
Done! Problem Solved
Firstly connect your device and check if it's connected or not
RUN
adb devices
then
RUN
adb tcpip 5555
now disconnect your device usb cable and go to the settings and find out the IP Address of your phone and RUNn
adb connect your_phone_ip_address
eg. adb connect 192.168.1.102
replace with your own ip and check it with adb devices if it's connected or not
if it's not working then the problem must be something else
You probably don't have The ADB Server running.
With the USB cable connected,
do:
adb kill-server && adb start-server && adb tcpip 5555 && adb connect 192.168.1.110
Once Successfully Connected, You can then Disconnect the Cable.
NOTE: on running adb devices, the device name is now of the format IP:PORT as opposed to the initial Alphanumeric string.
I wanted to connect to my device wirelessly so I can install apps via ADB without cables. The problem is that I can't connect to my device.
My device is connected to my home's WiFi and PC via Ethernet cable but in the local network. Why I can't connect?
I'm doing this:
adb tcpip 5556
adb connect myipaddress:5556
but It's not working...
You have to connect your phone directly to your PC with USB cable for command
adb tcpip 5556. Otherwise your device will not set the tcpip port.
connect phone on PC with USB, then enter adb tcpip 5556 and then you can disconnect it. after that second command adb connect myipaddress:5556 will connect your device wirelessly.
And myipaddress must be IP of your phone device.
I had the same problem.
While the phone is wired, ADB over WiFi fails. Once you unplug you should be able to use ADB over WiFi.
I am in need to have the phone wired for one network while using ADB over the WiFi but not a successful scenario.
I follow following steps for the connecting my device and already go-through this link Adb over wireless without usb cable at all and Connecting two android devices using wifi still not connected and this onle also adb error: more than one device - android
I connect my device to my computer via USB cable.
Go to platform tool path.
Run adb tcpip 5555.
Disconnect my device (remove the USB cable).
I Go to the Settings -> About phone -> Status to view the IP address of my phone.
Run adb connect :5555.
I get this error on terminal:
EDIT:
You have to provide the device id as well to open adb over wifi when more than 1 device is connected.
adb -s <device ID> tcpip 5555
I got the asnwer from here:
https://stackoverflow.com/a/38348791/4428159
provide your phone ip as well:
adb: usage: adb connect <host>[:<port>]
host is the ip address of the mobile you want to connect.
You have to do this for all the devices you want to connect to.
I have installed adb Wi-Fi plugin in my android studio which works fine when device is connected over same wi-fi connection. But, if when I try to run on another device from usb connected with other wi-fi it shows my device Offline.
I found that adb has switched from usb to wi-fi.
I have tried to restart studio but problem remains same.
I have also tried adb kill-server and adb start-server but nothing changed.
How can I switch back from wi-fi to usb?
adb devices
List of devices attached
DE6DIFK7R8S475H6 offline
Connect your phone through usb
At terminal:
adb kill-server
adb usb
When connecting a device with ADB Wireless,
got failed to authenticate to <ip>
adb devices gives the device shows up as unauthorized.
From Android 4.2, every ADB device needs to be authorized for a computer to connect. This is done for security. So when a USB is connected a prompt comes asking to authorize the device when USB debugging is set. But does not happen for WIFI ADB.
So the workaround is to connect the device by USB, accepting the machine always. Then when the Wireless ADB is tried, it should work.
Solution
1 Connect device(over USB) to computer (WINDOWS).
2 Authorize adb device, so it can communicate(handshake over USB) with computer
3 Check that the device is connected
$adb devices
List of devices attached
SC8SDQWGKBT4JVS4 device
4 Change to tcpip mode
$adb tcpip 5555
restarting in TCP mode port: 5555
5 Connect device(over WIFI) to computer, make sure both are on the same network
$adb connect 192.168.1.100
connected to 192.168.1.100:5555
6 Authorize adb device, so it can communicate(handshake over WIFI) with computer
7 Check that the device is connected
$adb devices
List of devices attached
SC8SDQWGKBT4JVS4 device
192.168.1.100:5555 unauthorized
Although I authorized the device, adb is seeing things differently.
To get things working correctly, unplug device from USB because there
is a connection over WIFI.
8 Kill the adb server
$adb kill-server
9 Connect again over WIFI
$adb connect 192.168.1.100
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
connected to 192.168.1.100:5555
10 Finally, Check that the device is connect
$adb devices
List of devices attached
192.168.1.100:5555 device
Device is now authorized, you can start debugging over WIFI.
Maybe you could use the ADB WiFi(an Android App).I use it and the device showed in the Android studio is authorized(Forget to tell,I use USB connect to the Mac ,then the phone will promote a dialog to authorize the mac to debug the phone).
In the {} Developer options menu item, Revoke USB debugging authorizations, and then disable and enable the USB debugging option to get dialog.