Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use adb over tcpip in Android Studio?

Is it possible to show the adb logcat for a tcpip device in Android Studio? I am writing a application that utilizes the USB port and I cannot use it for adb usb.

Currently, I am using the following instruction to view the logcat in Command Prompt, but it would be nice if this was integrated into AS: http://developer.android.com/tools/help/adb.html#wireless

like image 673
Ryan R Avatar asked Jul 09 '14 20:07

Ryan R


People also ask

What is adb over network?

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.

How do I use adb on Android?

To use ADB with your Android device, you must enable a feature called “USB Debugging.” Open your phone's app drawer, tap the Settings icon, and select “About Phone”. Scroll all the way down and tap the “Build Number” item seven times. You should get a message saying you are now a developer.


Video Answer


1 Answers

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 
like image 97
Ryan R Avatar answered Sep 21 '22 06:09

Ryan R