Permission denied when working with/without "su -c" in /cache
For me, this worked:

adb shell "su -c 'boot-recovery &gt; /cache/recovery/command'"


You start with a double quote before su -c. Then single quote for the command, a single quote after the command and close with a double quote.