0% found this document useful (0 votes)
33 views3 pages

How To Debug Step Tracker Xamarin App

To debug a demo project on Xamarin.Android via WiFi: 1. Connect the Android device via USB and enable debugging. 2. Use ADB commands to enable TCP/IP debugging and get the device's IP address. 3. Disconnect USB and use ADB to connect to the device via its IP address for wireless debugging.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views3 pages

How To Debug Step Tracker Xamarin App

To debug a demo project on Xamarin.Android via WiFi: 1. Connect the Android device via USB and enable debugging. 2. Use ADB commands to enable TCP/IP debugging and get the device's IP address. 3. Disconnect USB and use ADB to connect to the device via its IP address for wireless debugging.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

How to Debug your Demo Project

1. Follow the “Debugging Xamarin.Android via WiFi” section below.


2. If there’s a build fail:
- Clean solution
- Build every single project, based on dependency. Don’t build/rebuild solution
- Debug as in step #1

Debugging Xamarin.Android via WiFi


See forum post Any way to view Android screen remotely without root? - Post #9.

1. Connect the device via USB and make sure debugging is working.
2. adb tcpip 5555
3. find the IP address with adb shell netcfg or adb shell ifconfig with 6.0 and
higher
4. adb connect <DEVICE_IP_ADDRESS>:5555
5. Disconnect USB and proceed with wireless debugging.
6. adb -s <DEVICE_IP_ADDRESS>:5555 usb to switch back when done.

No root required!

To find the IP address of the device: run adb shell and then netcfg. You'll see it there. To find
the IP address while using OSX run the command adb shell ip route.

WARNING: leaving the option enabled is dangerous, anyone in your network can connect to
your device in debug, even if you are in data network. Do it only when connected to a trusted
Wi-Fi and remember to disconnect it when done!

@Sergei suggested that line 2 should be modified, commenting: "-d option needed to connect to
the USB device when the other connection persists (for example, emulator connected or other
Wi-Fi device)".

This information may prove valuable to future readers, but I rolled-back to the original version
that had received 178 upvotes.

On some device you can do the same thing even if you do not have an USB cable:
1. Enable ADB over network in developer setting

It should show the


IP address
2. adb connect <DEVICE_IP_ADDRESS>:5555
3. Disable the setting when done

Using Android Studio there is a plugin allowing you to connect USB Debugging without the
need of using any ADB command from a terminal.

You might also like