Created
February 28, 2020 07:14
-
-
Save derailius/6c1fbaab821f5945003e4dd98f978512 to your computer and use it in GitHub Desktop.
hdrswitch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#there are a couple of extra KEYCODE presses in a couple of spots so that the script doesn't go too fast | |
firestickip="192.168.0.193" | |
adb kill-server | |
adb connect $firestickip | |
adb wait-for-device | |
adb shell am force-stop com.plexapp.android #kills plex | |
adb shell am force-stop org.xbmc.kodi #kills kodi | |
adb shell input keyevent KEYCODE_HOME | |
adb shell am start -a android.settings.SETTINGS | |
adb shell input keyevent KEYCODE_DPAD_DOWN KEYCODE_DPAD_RIGHT KEYCODE_DPAD_RIGHT KEYCODE_DPAD_CENTER KEYCODE_DPAD_DOWN KEYCODE_DPAD_UP KEYCODE_DPAD_DOWN KEYCODE_DPAD_CENTER | |
adb shell input keyevent KEYCODE_DPAD_UP KEYCODE_DPAD_UP KEYCODE_DPAD_DOWN KEYCODE_DPAD_DOWN KEYCODE_DPAD_DOWN KEYCODE_DPAD_DOWN KEYCODE_DPAD_DOWN KEYCODE_DPAD_CENTER | |
adb shell input keyevent KEYCODE_DPAD_UP KEYCODE_DPAD_CENTER #HDR SWITCH HERE | |
adb shell input keyevent KEYCODE_DPAD_LEFT KEYCODE_DPAD_CENTER KEYCODE_HOME | |
#launches plex | |
adb shell monkey --pct-syskeys 0 -p com.plexapp.android -c android.intent.category.LAUNCHER 1; | |
sleep 1; | |
adb kill-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment