Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between screenshot and screencap in adb shell?

I have a Galaxy S i9000 with CyanogenMod 10 on it which supports both of these commands in adb shell and both take screenshots. They look a little different however.

Using adb shell screenshot: screenshot



And using adb shell screencap: enter image description here



It seems that adb shell screenshot lacks one colour channel, whereas screencap shows all the channels. I tried the same experiment on a Galaxy S4 with 4.4.2 KitKat and only screencap worked, leading me to believe that screencap is a newer version of screenshot.

like image 813
Jin Avatar asked Apr 23 '15 20:04

Jin


1 Answers

screenshot worked directly with the framebuffer which is no longer supported in the recent Android versions

screencap is the new version of the tool which works through the SurfaceComposer instead.

like image 74
Alex P. Avatar answered Sep 30 '22 00:09

Alex P.