Connect Android Studio to device via LAN

时间:2015-06-26 10:12:46

标签: android android-studio debian adb

I am using Debian 8.1, Android Studio 1.2.2 and a rooted Android TV Box with Android 4.2.2

Now I am trying to connect the TV Box to Android Studio via LAN, to directly test the app that I am developing.

My PC and the Android Box are in the same network. Also I can connect to the box in the Linux-console via:

adb connect 192.168.50.104

It says:

connected to 192.168.50.104:5555

I can fully access the Android TV Box via adb commands in the console.

But unfortunately Android Studio does not find the device... When I try to compile the app, Android Studio gives me the "Chooser Dialog", where I can Launch the Emulator, or choose a running device. But "running devices" says "nothing to show"

What is the problem?

UPDATE 1: This is the device btw: http://www.geniatech.com/pa/atv1200.asp

UPDATE 2: in Windows it works perfectly! Adb connect 192.168.50.104 and voila! The device is shown in the list in Android Studio...

1 个答案:

答案 0 :(得分:0)

我终于找到了问题的解决方案。

在linux系统上,我重命名了包管理器附带的adb

cd /usr/bin/
sudo mv adb backup_adb

然后我为adb创建了一个符号链接,它随Android Studio SDK一起提供:

sudo ln -s ~/Android/Sdk/platform-tools/adb /usr/bin/adb

重新启动adb并重新连接到设备,它最终显示在Android Studio中。

使用您的包管理器,而不是重命名adb文件,您可以将其删除。