Advertisement
metalx1000

Android Frame Buffer and Screen Shot Notes

Jun 30th, 2014
942
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.80 KB | None | 0 0
  1. Get Screenshot
  2. (HTC AMAZE is 544x960)
  3. adb pull /dev/graphics/fb0
  4. ffmpeg -vframes 1 -f rawvideo -pix_fmt rgb32 -s 544x960 -i fb0 screenshot.png
  5.  
  6. ----------------------------
  7. It’s important to have the correct resolution
  8. #get screen size
  9. dumpsys window | grep mUnrestrictedScreen
  10.  
  11. #and link fb0
  12. ln -s /dev/graphics/fb0 /dev/fb0
  13.  
  14. This is my PengPod
  15. ----------------------------
  16. sudo adb pull /dev/graphics/fb0
  17. ffmpeg -vframes 1 -f rawvideo -pix_fmt rgb32 -s 800x480 -i fb0 screenshot.png
  18. avconv -f rawvideo -pix_fmt rgb32 -s 800x480 -i screen screenshot.png
  19.  
  20. display screenshot.png
  21.  
  22. Display Random Static to Screen
  23. cat /dev/urandom > /dev/graphics/fb0
  24.  
  25. Save Screenshot while on Device
  26. cat /dev/graphics/fb0 > screenshot
  27.  
  28. Save Screenshot while on Device
  29. cat screenshot  > /dev/graphics/fb0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement