Is there a method to read th开发者_C百科e frame buffer of the current screen? I searched some data about the frame buffer. Some one used the glReadPixels method, but the information was not enough. Does anyone know how to read the current frame buffer in detail?
Thanks for helping.
Do you actually want the screen framebuffer? Or some OpenGL surface that your app has created?
If the former, see How to capture the android device screen content?
If the latter, you are on the right track with glReadPixels
.
in cmd line
adb shell screencap -p /sdcard/abc.png
adb pull /sdcard/abc.png
- find your screen capture png file in your adb directory.
Edit according to Chris Stratton :
If you gonna implement this cmd in Java code, root permission is needed
thanks for pointing out my mistake!
精彩评论