This app uses androidtvremote2 and a custom Python script to create a remote control menu bar widget for Android TVs. This has only been tested on a TCL Percee TV running Android 8. If you have a different model of Android television, you may need to modify tvremote.py.
Download the installer from the releases page. Run the installer.
- Open AndroidTVRemote from /Applications.
- When the new TV icon appears in your menu bar, right click and choose Settings.
- Click on "Re-pair...".
- Enter your TV's IP address and then enter the pairing code shown on your TV.
- Enter your TV's IP address to connect and enable the remote control.
The only part that contains a pre-compiled binary is the Automator app at payload/AndroidTVRemote.app. If you prefer not to trust it, the you can make this part yourself using Automator on macOS.
- Create new Application in Automator.
- Add "Run Shell Script".
- Set Pass input to "as arguments" and Shell to "/bin/bash".
- Paste the following script:
APP_PATH="$HOME/Library/Application Support/AndroidTVRemote"
PYTHON_EXECUTABLE="$APP_PATH/.venv/bin/python3"
PYTHON_SCRIPT="$APP_PATH/tvremote.py"
cd "$APP_PATH"
"$PYTHON_EXECUTABLE" "tvremote.py" > /dev/null 2>&1 &- Save the app as "AndroidTVRemote".
- Place "AndroidTVRemote.app" into the
payloadfolder.
- You may need to install
portaudiousing homebrew. - Run
./createinstaller.sh. - Run the installer from
built/AndroidTVRemote_Installer.pkg.
If you want to build the whole thing yourself from scratch, then follow the instructions below.
- Install dependencies – adapted from: installation instructions.
brew install portaudio python3 mkdir "~/Library/Application Support/AndroidTVRemote" cd "~/Library/Application Support/AndroidTVRemote" git clone https://github.com/tronikos/androidtvremote2.git python3 -m venv .venv source .venv/bin/activate python -m pip install --upgrade pip python -m pip install -e ./androidtvremote2 python -m pip install grpcio-tools mypy-protobuf python -m grpc_tools.protoc androidtvremote2/src/androidtvremote2/*.proto --python_out=androidtvremote2/src/androidtvremote2 --mypy_out=androidtvremote2/src/androidtvremote2 -Iandroidtvremote2/src/androidtvremote2 python -m pip install pre-commit pre-commit install --git-dir="$WORKINGDIR/.git" --config="androidtvremote2/.pre-commit-config.yaml" pre-commit run --all-files --config="androidtvremote2/.pre-commit-config.yaml" python -m pip install -e "./androidtvremote2[test]" pytest python -m pip install build python -m build ./androidtvremote2 curl -LJO https://raw.githubusercontent.com/jvarn/macos-android-tv-remote-menubar-widget/refs/heads/main/scripts/payload_appsupport/tvremote.py curl -LJO https://raw.githubusercontent.com/jvarn/macos-android-tv-remote-menubar-widget/refs/heads/main/scripts/payload_appsupport/tvremotecli.py curl -LJO https://raw.githubusercontent.com/jvarn/macos-android-tv-remote-menubar-widget/refs/heads/main/scripts/payload_appsupport/tvremotecli.sh chmod +x tvremote* # test and pair ./tvremotecli.sh --volume up
- Create a new Application in Automator.
- Add "Run Shell Script".
- Set Pass input to "as arguments" and Shell to "/bin/bash".
- Paste the following script:
APP_PATH="$HOME/Library/Application Support/AndroidTVRemote"
PYTHON_EXECUTABLE="$APP_PATH/.venv/bin/python3"
PYTHON_SCRIPT="$APP_PATH/tvremote.py"
cd "$APP_PATH"
"$PYTHON_EXECUTABLE" "tvremote.py" > /dev/null 2>&1 &- Save the app as "AndroidTVRemote" and close Automator.
- Create your own app icon or use the one provided; name it
AppIcon.icnsand place it inAndroidTVRemote.app/Contents/Resources/. - Modify the strings in your "AndroidTVRemote" app bundle:
plutil -replace CFBundleIdentifier -string "com.jvarn.AndroidTVRemote" payload/AndroidTVRemote.app/Contents/Info.plist plutil -replace CFBundleIconFile -string "AppIcon" payload/AndroidTVRemote.app/Contents/Info.plist plutil -replace CFBundleIconName -string "AppIcon" payload/AndroidTVRemote.app/Contents/Info.plist
- Move or copy the app into your Applications folder.