How to debug your Android device via wi-fi
This is a really useful trick if you don't want (or don't fell comfortable) to connect your device via USB everytime you are developing. By doing this you can run, install and debug applications via wi-fi.
Get the ip address of your device
Connect your device via USB and make sure the developer mode and debugging feature are enabled. From your Android platform tools in the command prompt type "adb shell" and then "netcfg". You'll get the ip address of your computer and your phone there.
Connect via adb
Run "adb connect <ip-address>" in your prompt and you'll be connected!
Reseting the connection
Sometimes, for some reason that I still couldn't identify, you'll not be able to connect, geting this error message:
What you have to do is to connect your device via USB and run "adb tcpip 5555" in your prompt like this:
Now, simply disconnect the USB and your wi-fi connection should work again.
Tip for easily accessing the adb
One easy way to access your Android platform tools in the command prompt without the need of typing the address everytime you open it, is to create a custom shortcut.
First create a shortcut of the command prompt in any folder of your choice. Then right-click on the shortcut and edit the field "Start in" with your platform tools path:
I use this feature a lot and hope you also find it useful!





Nenhum comentário:
Postar um comentário