Recently i got a way to display data onto the frame buffer via the adb shell command line. To fetch data from the frame buffer i used the command : 

**cat /dev/graphics/fb0 > /sdcard/screenshot**

Now in my /sdcard i got a raw image screenshot. Inorder to display this on the frame buffer that is the device screen, i used the command :

**cat /sdcard/screenshot > /dev/graphics/fb0**

As an output i could see the screen shot on my device screen( Note: My device is rooted so i can access /dev/graphics/fb0).

Now my problem is: I have to display an image which is RGB888 format on the screen from the command line. So i tried :

**cat /sdcard/rgbimg > /dev/graphics/fb0**

But as an output on the screen i can see a white and black dots instead of the image. 

So inorder to display my RGB888 on the frame buffer i need to convert it to the format in which the file screen shot is. Hence if anyone has tried than can you tell me the format of the image screenshot in my above example.

Any suggestions regarding how to get the format of this will also be appreciated. Thanks in advance.