Maybe this will help someone. I couldn't find anything about it so I had to dig through the source code of the homescreen.

To adjust the brightness from the command line you have to write a number from 0 to 10 to /sys/class/backlight/backlight/brightness. Echoing 0 turns it off so make sure you can revert it before you do that. Like this:
echo 5 > /sys/class/backlight/backlight/brightness

Their homescreen does that in C++ by concatenating strings and spawning a shell that echoess it instead of just writing it directly for some ungodly reason.