Matrix_TV_The_Construct

couch-tv on a Fire TV Stick

Written by killy10o10, who runs couch-tv’s on-TV app (dev.couchtv.ontv, option C) as the home screen of a Fire TV Stick 4K (2nd gen, model AFTKM) on Fire OS 8.1.8.5 (Android 11). Everything below was done on that stick. Other Fire OS 7 and 8 sticks should behave the same; sticks on Vega OS cannot sideload apps at all.

couch-tv on the Fire TV Stick

The Fire TV extras

What works, and what does not

   
Home screen, clock, scenes, weather, dock Yes
Home button brings couch-tv back Yes. Amazon’s home flashes up for a moment first: Fire OS allows nothing better without root
Survives a restart Yes (the accessibility watcher stays on)
Bluetooth button Yes. If parental controls are on, Fire OS asks for the Prime Video PIN first
Network button Yes
Phone remote Opening apps works without ADB. Keys, typing and “what’s playing” need the TV’s own ADB (Connect ADB in the app)
Keep watching Only fills from shows started from the phone remote
Amazon’s YouTube app Yes, shown and sorted as YouTube

Install

You need a computer with adb (macOS: brew install --cask android-platform-tools) on the same network as the stick.

  1. Developer options. Settings, My Fire TV, About: press the device name seven times. Then Settings, My Fire TV, Developer options: ADB debugging on.
  2. Find the stick’s address. Settings, My Fire TV, About, Network. It changes when the stick joins another network (a phone hotspot, say), so look again after a move. A DHCP reservation in the router keeps it fixed.
  3. Connect, then press Allow on the TV (tick “Always allow from this computer”):
    adb connect <stick-ip>:5555
    
  4. Install couch-tv-ontv.apk from the Releases page:
    adb -s <stick-ip>:5555 install couch-tv-ontv.apk
    
  5. Open Couch TV on the stick and press Use as home screen. Skip Connect ADB unless you want the phone remote’s keys.
  6. Two grants so it can take the Home key back (they survive restarts):
    adb -s <stick-ip>:5555 shell pm grant dev.couchtv.ontv android.permission.WRITE_SECURE_SETTINGS
    adb -s <stick-ip>:5555 shell appops set dev.couchtv.ontv SYSTEM_ALERT_WINDOW allow
    

    (On Fire OS 8.1.8.5 the second was already allow after install; running it does no harm.)

  7. Press “Use as home screen” after the grants (if it was already on, press it off and on again). The app switches its accessibility watcher on when that switch is pressed and at every boot, and it needs the grant to be there first. Check it took:
    adb -s <stick-ip>:5555 shell settings get secure enabled_accessibility_services
    

    The answer should include dev.couchtv.ontv/dev.couchtv.ontv.WatchService. If it does not, add it yourself (keep anything already in the list, joined with :):

    adb -s <stick-ip>:5555 shell settings put secure enabled_accessibility_services dev.couchtv.ontv/dev.couchtv.ontv.WatchService
    
  8. Press Home from any app: couch-tv comes back.

Settings

The gear tile in the dock opens Home settings (weather place, apps, quick buttons, look). They can also be set from a computer through the app’s API, after pairing like a phone (the code shows on the TV):

curl -X POST http://<stick-ip>:5400/api/pair/start
curl -X POST http://<stick-ip>:5400/api/pair -H 'Content-Type: application/json' -d '{"pin":"<code>","name":"My computer"}'
# returns {"token": ...}; send it as  Authorization: Bearer <token>

Forget phones on the Couch TV screen signs every phone and computer out again.

Things that will save you time

Undo

Open Couch TV and press Stop being the home screen, or remove it:

adb -s <stick-ip>:5555 uninstall dev.couchtv.ontv

Amazon’s home is back on the Home key straight away.