permission denied error trying to run custom script, but works in SSHDroid
The issue is with SELinux, and upon further digging, it seems I had to adjust the permissions of these files to make this work. I don't really understand it, but it seems to work.

chmod 644 /sys/bus/usb/drivers/usb/unbind
chmod 644 /sys/bus/usb/drivers/usb/bind

echo -n '1-2' | tee /sys/bus/usb/drivers/usb/unbind
sleep 0.5
echo -n '1-2' | tee /sys/bus/usb/drivers/usb/bind

chmod 200 /sys/bus/usb/drivers/usb/unbind
chmod 200 /sys/bus/usb/drivers/usb/bind