Open
Description
Improve Device scenario runner.py code by moving shared calls into separate helpers/functions. Currently, the device testing code, especially android, has multiple chunks that are prime for breaking out to make the python more straightforward. This should be done to make the code more readable and more maintainable.
Specifically requested here: #4776 (comment).
May also instead make sense to port the code over to C# and make the device testing use the tools properly: #2877 (comment).