Skip to content

Instantly share code, notes, and snippets.

@cyppst
Created November 13, 2021 05:39
Show Gist options
  • Save cyppst/69c4246846f6f1bb08e1b79066c04f24 to your computer and use it in GitHub Desktop.
Save cyppst/69c4246846f6f1bb08e1b79066c04f24 to your computer and use it in GitHub Desktop.
connect to remote adb (android tv) to switch bluetooth status. If you have any suggestions for improvement , you can post it in this thread :)
#!/bin/bash
if [ "$#" -eq "0" ]
then
echo -e "\nPlease call '$0 <parameter>' to run this command!\n"
else
if adb get-state 1>/dev/null 2>&1; then
echo "Host already connected."
else
echo "Host disconnected."
adb connect 192.168.0.125:5555
adb root
fi
fi
adb shell settings put global bluetooth_disabled_profiles $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment