【Function request】 multiple screenshots
Opened this issue · 6 comments
NakanoSanku commented
rayworks commented
@NakanoSanku
After investigation, I found that it's feasible to do it and filter by the displayId. However if the display is a monitor connected with a phone, the screenshot under portrait mode will be distorted. 'Cause the dimension info of display is changed.
What's your use case ? Will adding an extra parameter (e.g. display_id
) in the script solve your problem ?
NakanoSanku commented
i think so.
rayworks commented
You can try and play with this branch.
Currently only the Python script (automation3.py
) is available for testing.
NakanoSanku commented
cool ! it is can work!but may occur can't get display_id condition
like
❯ adb shell
Welcome! If you need help getting started, check out our developer FAQ page at:
https://g.126.fm/04jewvw
We're committed to making our emulator as useful as possible for developers,
so if you have any specific requirements or features that you'd like to see
in the emulator, please let us know. We're always open to new ideas and suggestions.
You can find our contact information on the FAQ page as well.
Thanks for using our emulator, happy coding!
se.apk exec app_process / com.rayworks.droidcast.Main --port=2000 --display_id=2 <
com.rayworks.droidcast.Main | Port set to 2000
>>> DroidCast main entry
>>> Dimension: Point(720, 1280)
>>> Screen rotation: 1
>>><<< displayIds [4619827820427265280, 4619827144452474627, 4619826888814064386]
>>> bmp generated.
Bitmap generated with resolution 1280:720, process id 5611 | thread id 5626
Bitmap final dimens : 1280|720
^C
[16:57] Shell xSIGINT 1m 44s 493ms
~
❯ adb shell
Welcome! If you need help getting started, check out our developer FAQ page at:
https://g.126.fm/04jewvw
We're committed to making our emulator as useful as possible for developers,
so if you have any specific requirements or features that you'd like to see
in the emulator, please let us know. We're always open to new ideas and suggestions.
You can find our contact information on the FAQ page as well.
Thanks for using our emulator, happy coding!
se.apk exec app_process / com.rayworks.droidcast.Main --port=2000 --display_id=1 <
com.rayworks.droidcast.Main | Port set to 2000
>>> DroidCast main entry
>>> Dimension: Point(720, 1280)
>>> Screen rotation: 1
>>><<< displayIds [4619827820427265280, 4619827144452474627, 4619826888814064386]
>>> bmp generated.
Bitmap generated with resolution 1280:720, process id 5648 | thread id 5663
Bitmap final dimens : 1280|720
NakanoSanku commented
ok,this is my problem ,must use adb shell dumpsys SurfaceFlinger --display-id
get Display id
❯ adb shell dumpsys SurfaceFlinger --display-id
Display 4619827144452474627 (HWC display 3): port=3 pnpId=GGL displayName="mumuscreen003"
Display 4619827820427265280 (HWC display 0): port=0 pnpId=GGL displayName="mumuscreen000"
Display 4619826948029188612 (HWC display 4): port=4 pnpId=GGL displayName="mumuscreen004"
NakanoSanku commented
screenshot size always use id=0’s size