Auto wireless connect Android device and IntelliJ via adb

2.5k Views Asked by At

I am using IntelliJ to develop Android application. On my device I've installed adbWireless which allow me to debug application via WiFi.

To connect my PC with device I have to call in terminal

adb connect 192.168.1.105:5555

and since now I can run debug in IntelliJ.

Is it possible to configure IntelliJ to do it automatically if device is disconnected ?

3

There are 3 best solutions below

2
On BEST ANSWER

I'm afraid it's not possible, however you can configure an External Tool and bind it to hotkey, you can probably also create a macro which will first run your external tool and then start debugging.

0
On

--for WINDOWS users--

basically you create a file called: adb_connect.bat

in the file add this content:

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

pause

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

leave the "pause" if you want to see the results

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

it works for me :-)

BTW, if you give your device a static ip you wont have to re edit the file each time you connect

enjoy

1
On

You can edit your run configuration to automatically connect to your device before uploading and launching the APK.

Expand the Before launch section at the bottom of a specific run config, and add a new External Tool which calls ADB and passes the connect and IP parameters.