Automatically wireless connect Android device and IntelliJ via adb

I am using IntelliJ to develop an Android application. On my device, I installed adbWireless , which allows me to debug the application via WiFi.

To connect my computer to the device, I have to call the terminal

 adb connect 192.168.1.105:5555 

and now I can run debug in IntelliJ.

Can IntelliJ be configured for this automatically if the device is disconnected?

+4
source share
3 answers

I’m afraid that this is not possible, however you can configure the External tool and bind it to a hotkey, perhaps you can also create a macro that will launch the external tool first and then start debugging.

0
source

- for WINDOWS users -

basically you create a file named: adb_connect.bat

in the file add this content:

C: \ Android \ android-sdk \ platform-tools \ adb.exe connect 192.168.11.179ל555

pause

edit the path to your adb.exe and your ip device

leave a pause if you want to see the results

and there you have it. just run the file every time you connect your device.

It works for me :-)

By the way, if you give the device a static ip, you don’t have to re-edit the file every time you connect

to use

+1
source

You can edit the launch configuration to automatically connect to your device before downloading and launching the APK.

Expand the Before Launch section at the bottom of the specific launch configuration and add a new External tool that calls ADB and passes the connection and IP parameters.

+1
source

Source: https://habr.com/ru/post/1344172/


All Articles