I recently installed button mapper and was able to remap the four colored buttons to individual hdmi inputs. However, to do so you have to run a shell script via adb each time the tv reboots. I didn't know if android had a Linux rc equivalent to place the shell script without requiring root so it starts with each boot automatically. Thanks!
Yup, this should do the trick: https://play.google.com/store/apps/details?id=com.ADBPlugin
Pair it with tasker.