Get rid of cables and Remote Debug your Android device!
Cables are a companion of our everyday life but a necessary evil. I personally avoid using them wherever it is possible and even charge my phone wireless. As a mobile developer you always have a bunch of cables in you bag but the time may come where we do not need them anymore. Remote Debugging could be one step into this direction.
Since Android Lollypop it is possible to deploy your apps via Wifi to your device and debug them there. It can look like magic, when your phone gets remote controlled and states app by his own but is is definately not.
Important: To archive this, your development machine and Android device need to be in the same local network, of course!
Prepare your phon0.png)](GHOST_URL/content/images/2015/08/set_remote_debugging.0.png)](GHOST_URL/content/images/2015/08/developer_settings.png)To enable Remote Debugging on your phone, you need at least Android 5.0. Go to Settings, select Developer Options and enable the Android Debugging and ADB over network options. That’s it! All you need to do is remember the displayed IP Address, we will need it later.
Setup your PC
Using a Windows Machine you first have to add the location of your Android Platform Tools to the PATH
environment variable. These platform tools come with the Android SDK so the path to add ususally looks like this C:\Program Files (x86)\Android\android-sdk\platform-tools
.
Afterwards you should be able to access the ADB via command line. To test this, you can simply type adb version
. If this worksyou can connect your device by hitting adb connect
followed by the IP Address that your device displayes inside the debug options](http://pumpingco.de/content/images/2015/08/adb_connect.gif)