Skip to content

iOS Fire TV remote app (SwiftUI + native ADB client)#5

Draft
lanethefox wants to merge 1 commit into
mainfrom
claude/ios-firetv-control-lrpyjy
Draft

iOS Fire TV remote app (SwiftUI + native ADB client)#5
lanethefox wants to merge 1 commit into
mainfrom
claude/ios-firetv-control-lrpyjy

Conversation

@lanethefox

Copy link
Copy Markdown
Owner

What this adds

A self-contained SwiftUI iPhone app (ios/FireTVRemote/) that controls an Amazon Fire TV over your home Wi-Fi — no Amazon account, no cloud, nothing leaves the LAN.

It works by implementing the ADB (Android Debug Bridge) protocol directly in pure Swift, the same mechanism adb connect 192.168.x.x:5555 uses. The first button press triggers the standard "Allow USB debugging?" prompt on the TV; after you accept it once, the phone stays trusted (the RSA key lives in the Keychain).

Features

  • D-pad with center OK
  • Back / Home / Menu
  • Play-Pause, Rewind, Fast-Forward
  • Volume ±, Mute, Power (sleep/wake)
  • One-tap launch: Netflix, YouTube, Prime Video, Disney+, Hulu, Spotify
  • "Type on TV" text entry for search boxes
  • Save multiple Fire TVs by IP and switch between them
  • Built-in setup/help screen

How it's built

Area Files
ADB wire protocol ADB/ADBProtocol.swift
TCP transport + handshake (Network framework) ADB/ADBConnection.swift
RSA key in Keychain, token signing ADB/ADBKey.swift
Android adb public-key encoding ADB/AndroidPubkey.swift, ADB/BigUInt.swift
Button → input keyevent mapping Controllers/FireTVController.swift
Persistence Controllers/DeviceStore.swift
SwiftUI screens Views/*, ContentView.swift

To use it

  1. Open ios/FireTVRemote/FireTVRemote.xcodeproj in Xcode 16+, set your signing Team, and run it onto your iPhone (iOS 17+).
  2. On the Fire TV, enable Developer Options → ADB debugging and note its IP.
  3. Add the IP in the app; accept the on-screen prompt on first connect.

Full instructions are in ios/FireTVRemote/README.md and the in-app Help screen.

Notes / limitations

  • Targets classic ADB over TCP port 5555. Fire OS "Wireless debugging" (ADB-over-TLS pairing) is not implemented.
  • Unrelated to the existing Rust rf-log crates; lives entirely under ios/.
  • Requires a Mac + Xcode to build onto an iPhone (unavoidable for sideloading).

🤖 Generated with Claude Code


Generated by Claude Code

Adds a self-contained SwiftUI iPhone app under ios/FireTVRemote that
controls a Fire TV over the local network. It implements the ADB wire
protocol and RSA auth handshake in pure Swift (no dependencies), so the
TV trusts the phone after a one-time on-screen prompt.

- ADB transport over Network framework with CNXN/AUTH/OPEN/WRTE/OKAY/CLSE
- RSA key persisted in Keychain; Android adb public-key encoding
- Remote UI: D-pad, navigation, transport, volume/power, app launchers,
  on-TV text entry
- Manage multiple Fire TVs by IP; setup/help screen included

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_019gGkDiRA1DmjCAVmTTUVs8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants