Michael B Michael B - 3 months ago 13
Android Question

Connect Android Studio to device via LAN

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

Answer

I finally found the solution to the problem.

On the linux system I renamed the adb that came with the package-manager

cd /usr/bin/
sudo mv adb backup_adb

Then I created a symlink to the adb, that is provided with the Android Studio SDK:

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

Restart adb and reconnect to the device and it finally shows up in Android Studio.

Instead of renaming the adb-file you could probably just remove it, with your package manager.

Comments