I used to use Android Studio with the various emulators to test my Android apps, however for Android TV 9 it doesn’t work properly because it doesn’t have Google Play Store on it.
To have a good version of Android TV 9:
- Downlad a VirtualBox image of it – I used the one shared in this video
- Install VirtualBox if you don’t have it yet
- Load the downloaded image with VirtualBox
- Configure it by going to the network section and select « Bridged Adapter » instead of « NAT »
- Once Android TV is started, you’ll have to connect to your Google account, but using the keyboard might be challenging – you can right click on the USB cable icon that appears at the bottom right of the VirtualBox window, and select your keyboard (be aware it’s a QWERTY map that is used)
After that, go to the Android TV settings, in the « About » section, and click several times on the Build Version to enable the Developer Mode. From the developer menu, you can enable the « Debug USB ».
Once everything is correctly configured, the Android TV should be visible on your local network, meaning you can use the ADB command to test your app.