Skip to content

libs/utils/android/screen: Add screenrecord utility

Darryl Green requested to merge github/fork/valschneider/screenrecord into master

Created by: valschneider

Implementation isn't the prettiest thing ever. I hit the same problem as @qperret in that I have to send signals to the process that is spawned on the device, and not the ADB command that resides on the host.

I put the code in the Screen class, but with how that class is used we don't have any context, only static classes, so the way to use screenrecord is:

data = record_start(target, ...)
<dostuff>
record_stop(target, data)

I find that absolutely barbaric, but I also didn't want to put it in the Workload class as it wouldn't be available outside of android workloads. If you guys think it is fine to move it in the Workload class, that'll get us rid of that ugly data passing.

Merge request reports