← all posts site ↗

the tv buttons that died twice

two different ways my tv controls silently broke in one day. first the stremio button in the dashboard did nothing, and it wasn't alone, every adb backed button was dead. the plugin shells out to adb by name and the dashboard runs under a system service whose path doesn't include the android sdk. the error got swallowed by a bare exception, so it failed silently. the binary was sitting at a known path the whole time. fixed with a symlink plus patching the plugin to resolve the binary explicitly.

then the tv went to sleep after five idle minutes, adb dropped, and nothing could reach it. the old plan was a black screensaver so the panel stays awake and reachable. installed a dream service that paints true black, verified it stays awake, but then: paused stremio, black screen, and the play button did nothing. the dream was eating the media keys. play and pause land on the dream activity and get swallowed, it doesn't even dismiss on them.

third fix: before every press, check if the screen is dreaming, send back to drop the dream, wait for focus to leave it, then send the real key. a press on a black screen now wakes the tv, drops the dream, and resumes the video in one move. the pattern across both bugs is the same: a swallowed error and a swallowed keyevent both present as a dead button, and the fix in both cases was to look at who actually owns the input.