I was debugging my xamarin android app on Phone1 over wifi by connecting to xxx:xxx:x:xxx:5556.
I tried to debug the app over wifi on Phone2 where only usb debugging was the straight forward option.
The commands I had used to connect to Phone2 are adb tcpip 5555, adb connect xxx:xxx:x:xxx:5555.
Now I am trying to connect back to Phone1:
adb connect xxx:xxx:x:xxx:5556 and it is giving me the error:
"unable to connect xxx:xxx:x:xxx:5556:5555: cannot resolve host 'xxx.xxx.x.xxx:5556' and port 5555: No such host is known"
How can i resolve this?
Try this sequence of actions/commands in order to debug a USB host device over WiFi:
stop USB host
connect the USB debug cable
adb kill-server
adb tcpip 5555
adb devices
should show something like
List of devices attached
99679a67 device
find your device IP address and:
adb connect 192.168.14.94:5555
adb devices
should show something like
List of devices attached
99679a67 device
192.168.14.94:5555 device
disconnect the USB debug cable
adb connect 192.168.14.94:5555
should show
connected to 192.168.14.94:5555
adb devices
should show
List of devices attached
192.168.14.94:5555 device
Start USB host on the device, if needed. ignore if you just need WiFi debug
debug freely over WiFi
You have to run adb tcpip 5556 before running adb connect xxx:xxx:x:xxx:5556
Google just updated the feature and officially support wifi debugging from Android 11 onwards. Follow these steps to setup your device to build and debug wirelessly using your wifi connection:
On your Android 11 device, go to your Settings -> Tap on Advanced and go to the Developer options.
Then tap on Wireless Debugging switch, and always allow wireless debugging for your personal wireless network in the popup dialog
Then tap on the Wireless Debugging option and select “Pair device with pairing code” and it will give you a 6 digit code and IP address as you can see in the image
There are many ways of doing pairing the phone to your computer. For the simplest one, inside Visual Studio, go to Tools -> SDK Command Prompt and type the IP address and port from your phone above into the terminaladb pair {ipaddress}:{port}.
Then take the IP Address and port from the last screen and enter the following command adb connect {ipaddress}:{port}.
There’s a lot more details in this article Including limitations and a comparison with the iphone wireless debug feature
Related
We have to attach mobile with the laptop through USB cable during development. Because, often usb cable got disconnect and mobile connection got lost and again need to install whole App.
Is there any option do it wireless ?
through wifi or hotspot something ?
Yes, It is possible to wirelessly debug your application through adb over wifi.
Make sure your development machine and your device is on the same wifi network
Connect your device via USB
On console type : adb tcpip 5555
Disconnect USB and find the IP of your testing device (Settings -> About Phone -> IP Address)
On console type : adb connect YOUR_IP_ADDRESS
For future convenience you may assign a static IP address to your testing device on the router.
Pure WiFi Solution (No USB Cable Required)
In Android version 11 and later, you can connect ADB and test Flutter apps on your phone without a USB cable, using WiFi pairing.
Enable developer options on your device if necessary and go to "Settings -> System -> Developer Options -> Wireless debugging".
Enable wireless debugging and click on "Pair device with pairing code", which shows an IP address, port, and pairing code.
Run adb pair <ip>:<port> <pairing code> to pair with your device.
Go back to the main "Wireless debugging" settings, which shows your same device IP but a different port, and then run adb connect <ip>:<different port> to connect ADB to your device.
You should now see your device listed in the output of adb devices and flutter devices.
Deploy your app to your device by running flutter run -d <ip> in your app folder, where <ip> is your device IP from the previous steps.
(I have a phone that won't connect over USB for some reason, so I needed this. The official Google docs I linked to above don't mention the adb connect step, which caused me much confusion.)
First, connect your phone to the laptop with a USB cable and ensure that you are able to debug. Then type this in your terminal or powershell window-
adb tcpip 5555
Unplug the USB cable and ensure that you are on the same wifi network (hotspots will work as well). Go to Settings > About Phone > Status Information and find your phone's IP address in the IP address section. Assuming your IP is 192.168.1.3, type the following in your terminal-
adb connect 192.168.1.3:5555
Remember that you have to repeat these steps everytime you restart your phone
first you must download the SDK Plateform tools https://developer.android.com/studio/releases/platform-tools
and extract the file.
after extracting the file, open this file in cmd and run :
adb tcpip 5555,
adb connect your_ip_adress:5555 make sur you device is connected to the same wireless and the last command is
flutter run to run the app
How to connect mobile device wireless android studio for flutter. I try every method but am failed. When i create emulator thy run very slow beacause I think Ram issue if any other solution please guide me thank u
You can connect mobile device and debug wirelessly but you need both your laptop and mobile on the same network(WiFi).
follow these steps:
Connect your mobile through a usb cable to the device and in the terminal run the command :
adb devices
Now you will see your attached device id, like this :
list of devices attached
RZ8N904WT6Y device
Copy the device id (RZ8N904WT6Y-in my case)
Now start the device in tcpip port, like this :
adb -s <device-id> tcpip 5555
Find out the local IP address of the Android device. You can find this information by pressing/long-pressing the WiFi icon in the quick settings drop-down and then clicking the WiFi network you are connected to
Type below command to connect to the device over WiFi:
adb connect <IP address>:5555
If the command ran successfully, you can now disconnect the USB cable and enjoy debugging over WiFi
I want to see the messages of Logcat without being connected. Is it possible?
You can attach your device with Wifi ADB once you connected with ADB remove the cable and you can run the app, debug code for this you need Wifi ADB plugin.
Go to File>>Setting>>plugin>>>Browse Repositories. after installing you can see you Wifi ADB at right side Bar.
Remember...Your system and your device should be on the same internet connection.
By without being connected, if you mean without being connected via cable, there is option to connect to adb via wifi.
1.connect your device via USB
2.Then connect your device to WIFI and get the IP address(say 192.168.0.101). While still connect via usb type this in command line or via Android Studio Terminal
adb tcpip 5555
adb connect 192.168.0.101:5555
check here for details
I see lots of posts everywhere showing how to connect to Android device using adb connect <ip> but in my case it's not working...
unable to connect to <ip addr>:5555: cannot connect to <ip addr>:5555: No connection could be made because the target machine actively refused it. (10061)
Developer mode is OK;
USB debugging is OK;
Both computer and device are connected to same network;
There is no USB port to plug (Android TV)
Before I was using another brand and it worked fine, I could connect it over wifi no problem, but after I switched to this brand called MXQ I can't manage to work it anymore.
Any ideas?
Thanks.
After long try I could finally find the solution. If anyone needs it, here is what I did.
On this brand (MXQ) there is two ways to access settings. The traditional Android way and:
Open Apps on the device and locate the App called settings
Enable USB debugging
After that you will be able to connect via USB (type A) available on the device
Connect to Android Studio just like usual.
*You will need a USB type A to A to do that..
** Make sure your USB cable has data wires (check usb)
You have to do following steps (In most cases this happen in Huawei devices)
Revoke USB debugging authorizations Allow ADB debugging in charge
only mode (I think this fixed the issue) Turn off Always prompt when
connecting to USB
Main steps:
open Cmd,
adb kill-server
Connect your phone with usb cable and enable debugging and select file transfer (MTP)
adb tcpip 5555 (Port Number)
Disconnect device unplug usb cable
adb connect YourDeviceIpAddress:5555
Is there a way where i can see my logcat result if i connect my android device using Wifi (not a Usb data cable) basically to Debug my application.If yes how do i go about it.
no app required!
(1)
connect phone with usb, then type in command line:
adb tcpip 5555
you can disconnect your phone from usb now
(if the reason for using wifi is that usb does not work on your machine, just do the above on another computer
(2) find out the IP address of your mobile device (somewhere under settings .... phone status)
(3)
in command line type:
adb connect [IP of your mobile]
NOTE: all devices need to be connected to same wifi; avoid using public wifis
yes, you can use a program called "wifi ADB" from the playstore. and run adb connect ipaddress from the server.. your logcat traffic will then appear in eclipse logcat