开发者

Auto wireless connect Android device and IntelliJ via adb

I am using IntelliJ to develop Android application. On my de开发者_运维知识库vice 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 ?


--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


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.


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜