I managed to build an app that works on TV and displays its icon in the Android TV Launcher. Google Play Store should allow this app to be installed on TVs, although I haven't tried it.
Decided to leave the instructions here in case anyone else needs it. Not sure if my method is 100% correct, but hey, it works!
1.
Export your project for Android, choose "Cordova project" build type.
2.
Add this tag to the config.xml file:
<preference name="AndroidXEnabled" value="true" />
3.
In Cordova CLI execute "cordova prepare" command.
4.
Make the following changes to \platforms\android\app\src\main\AndroidManifest.xml
4.1.
Add android:banner attribute to <application>:
<application android:banner="@drawable/banner" ... >
4.2.
Replace android:theme attribute in <activity> tag:
<activity .... android:theme="@style/Theme.Leanback" ... >
4.3.
Add a new intent-filter to the activity:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
4.4.
Add these two keys to the root <manifest> tag:
<uses-feature android:name="android.software.leanback" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
Here is what the result should look like:
5.
Edit \platforms\android\app\build.gradle file and add this line into the root dependencies section (around line 350)
implementation("androidx.leanback:leanback:1.2.0-alpha01")
'1.2.0-alpha01' is the current version as of August 2021, you can lookup the latest version here.
6.
Create banner.png image (320x180 px) and copy it to this folder:
\platforms\android\app\src\main\res\drawable-xhdpi
and possibly to
\platforms\android\app\src\main\res\drawable-land-xhdpi
7.
Continue building the app with Cordova CLI:
cordova build android ...
Please refer to the official guide for more info, and let me know if you notice any mistake in my post.