[UiAutomator] Permission denied when taking screen shot.
See original GitHub issueHi,
I presume that with UiAutomator 2.0 the only way to invoke UI testing is using gradle ($ ./gradlew connectedCheck
), however it seems like it doesn’t have enough privilege to create new file.
03-25 14:48:37.359: E/UiAutomatorBridge(13955): failed to save screen shot to file
03-25 14:48:37.359: E/UiAutomatorBridge(13955): java.io.FileNotFoundException: /data/local/tmp/uiautomator.png: open failed: EACCES (Permission denied)
But if you create the file via adb shell ($ adb shell touch /data/local/tmp/uiautomator.png
) first then everything will works fine.
Could you please have a look on the gradle permission issue ?
Thanks, Dino
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Getting permission denied error while taking device ...
While i am clicking on device screenshot option in UIAUTOMATOR getting this error Error while obtaining UI hierarchy XML file: com.android.
Read more >Handling Android runtime permissions in UI tests - Medium
Next, we need to either grant or deny this permission by using UiAutomator to interact with the permissions dialog.
Read more >Taking a screenshot using UiAutomator framework is broken ...
Issue: I'm currently unable to capture screenshots when tests fail using the UiAutomator framework's takeScreenshot method: UiDevice.
Read more >Permissions on Android - Android Developers
A pop-up dialog that contains 2 options: allow and deny. Figure 3. The system permission prompt that appears when your app requests a...
Read more >UIAutomatorViewer Tutorial: Inspect Elements On Android
#2) Your device is not in an idle state: For the screen which is not static, like the video is playing or any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
all above i have done .but can’t slove the problem
Hi @otw,
Can you let me know where to track the permission issue ?
Thanks, Dino