Sorry to resurrect an old thread, but I have the same question.
How can I capture screenshots when running automated tests on bit bar and have the screenshots saved in my test results ? I use the code below to save screenshots in a folder called screenshots in my java project. This works when I run locally (phone plugged into laptop), but when I run in bit bar there are no screenshots in my test results.
I contacted support and they provided a solution. I am posting it here in case anyone else has the same issue. In the run-tests.sh file I needed to comment out the line below. If this line is not commented out, all images in the project's "screenshots" folder are deleted.