How to get a screenshot of an application on an Android Things device in Android Studio or via ADB?

Is there a way to get a screenshot in Android Studio (or via ADB ) for the Raspberry Pi 3 Model B with Android Things Developer Preview on it? (any other way not through Android Studio / ADB also accepted).

+2
source share
3 answers

This is not a “screenshot”, but what about an mp4 movie?

 adb shell screenrecord --verbose /sdcard/screen.mp4 --time-limit 1 

Despite the fact that the recorded movie was not recorded correctly, it still resembles a “screenshot”. (I cannot get a frame from it using QuickTime Player, but any other tool can extract it.)

AndtoidThings seems to support the old limited version of OpenGL, which does not support screenshots.

 01-01 00:00:10.606: I/SurfaceFlinger(148): version : OpenGL ES-CM 1.0 01-22 02:07:02.687: E/libEGL(148): called unimplemented OpenGL ES API 01-22 02:07:02.687: E/SurfaceFlinger(148): glCheckFramebufferStatusOES error 0 01-22 02:07:02.687: E/SurfaceFlinger(148): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot 
+3
source

You can get a screenshot from the Vysor application installed on the Chrome browser. To do this, perform the following procedure.

  • Install Vysor in the Chrome browser.
  • Connect PC with Pi using adb connect.
  • Open Vysor on PC and enjoy.
+1
source

You can also use Android Device Monitor . Open it from the menu Android Studio Tools -> Android -> Android Device Monitor or run it from the sdk sdk/tools/monitor directory.

0
source

Source: https://habr.com/ru/post/1262496/


All Articles