Ok, I got no programming skills at all but I found the location of the brightness settings:
iPad:
/var/mobile/Library/Preferences/com.apple.springboard.plist
key = SBBacklightLevel2 with a correct value between 0 and 1
Trying to do -0.1 doesn't work.
iBook:
/var/mobile/Applications/9AFB5CC7-F3BD-4BF1-ADDC-DA73230EA957/Library/Preferences/com.apple.iBooks.plist
key = BKScreenBrightnessLevel value between -0.25 and 1
Copying the 2 lines of code in to another application doesn't work.
The kindle uses another key.
So I wanted to post this info since I had to search quite a long time to find these locations.
My uneducated guess would be that there is an api for brightness which the program writers give a name like bkscreenbrightnesslevel, now we have to find a way to make a program which uses this api and applies this to all programs or something.