I tried :
process = Runtime.getRuntime().exec(\"su -c cat /dev/graphics/fb0 > /sdcard/frame.raw\");
process.waitFor();
but it doesn\'t w
The answer lies in replicating the way the device itself handles it:
fb = open("/dev/graphics/fb0", O_RDONLY);
check this
Seems to me like your problem is this sign: >. You cannot redirect output using exec. What you need to do is grab the output stream of the process (which is the input stream for you) and store it to file;
process = Runtime.getRuntime().exec("su -c cat /dev/graphics/fb0");
InputStream is = process.getInputStream();
...