3

I'm trying to take a screenshot of Samsung Galaxy Fold's smaller display.

I use

shell screencap -p /sdcard/testss1.png

but it only captures the main display ― which is off ― and gets a black image.

How to change the display used for capturing?

0

1 Answer 1

5

The screencap command can be configured to capture a specific display using the option -d.

-d: specify the physical display ID to capture. See dumpsys SurfaceFlinger --display-id for valid display IDs.

The output of dumpsys SurfaceFlinger --display-id is a bit longer, therefore you can filter out the display ids:

dumpsys SurfaceFlinger --display-id | grep display_id

On my device I only have one display with display_id=0.

Therefore the final command looks like this (just replace display_id):

shell screencap -d <display_id> -p /sdcard/testss1.png
1
  • It worked. If anyone will face same problem - the Fold's smaller display ID is 5
    – Pablo
    Commented Nov 7, 2019 at 10:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .