Use adb over tcpip in Android Studio?
After some testing Android Studio already supports this. You just need perform the following ADB commands, and now you can see the logcat and even wirelessly load your application. No USB cable needed!
From: http://developer.android.com/tools/help/adb.html#wireless
$ adb tcpip 5555
restarting in TCP mode port: 5555
Finding out IP address of Android device prior to running Android Oreo:
Settings -> About tablet -> Status -> IP address. Remember the IP address, of the form #.#.#.#.
Finding out IP address of Android device running Android Oreo
Settings -> Wi-Fi -> -> IP address
Connect adb host to device:
$ adb connect #.#.#.#
connected to #.#.#.#:5555
In android studio, you can create a one click solution.
- Go to File > Settings > Tools > External Tools
- Create a tool with the following settings, making sure to replace the path to adb with your path
- Press Ok and save the tool
In Android studio, click Tools > External Tools > Android Over Wifi
A prompt similar to this should pop up and you can type your phone's IP address here. (You can get this address from your phone when you enable
ADB over network
)
- After you enter the information required, you should now be connected. Congratz and enjoy wireless debugging :).
EDIT 2019!!
Another great answer was posted on this thread but was deleted, which mentioned the existence of an IntelliJ/AndStud plugin that automates the above process. I have not tested the plugin but here is the github page for it. Gl