You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I've been trying to get some of the already made workloads to work and trying to add some of my own, but with little success.
The target device that I am using is Pixel 6 with Android 13. I have two questions/issues that I would like to have figured out.
Some workloads have an error because the android.permission.WRITE_SETTINGS returns a non-zero exit status 255. I've attempted two workloads that return this error.
GFXBench. The error comes up like below when I try to run wa run -f gfxbench.yaml.
ERROR Command 'export PATH=/data/local/tmp/bin:$PATH && export LC_ALL=C && pm grant com.glbenchmark.glbenchmark27 android.permission.WRITE_SETTINGS' returned non-zero exit status 255.
ERROR STDOUT:
ERROR STDERR: Exception occurred while executing 'grant':
ERROR java.lang.SecurityException: Permission android.permission.WRITE_SETTINGS is managed by role
ERROR at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1388)
ERROR at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermission(PermissionManagerServiceImpl.java:1319)
ERROR at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:547)
ERROR at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:597)
ERROR at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2546)
ERROR at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:292)
ERROR at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
ERROR at android.os.ShellCommand.exec(ShellCommand.java:38)
ERROR at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:5964)
ERROR at android.os.Binder.shellCommand(Binder.java:1049)
ERROR at android.os.Binder.onTransact(Binder.java:877)
ERROR at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4313)
ERROR at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:5948)
ERROR at android.os.Binder.execTransactInternal(Binder.java:1285)
ERROR at android.os.Binder.execTransact(Binder.java:1244)
VLC that I added personally. I created a workload and in .workload_automation/plugins/vlc/__init__.py, I have the following code:
class Vlc(ApkReventWorkload):
name = 'vlc'
description = "VLC"
# Replace with a list of supported package names in the APK file(s).
package_names = ['org.videolan.vlc']
But when I try to record a revent so I can play my video (wa record -r -w vlc), I get the following error:
ERROR Command 'export PATH=/data/local/tmp/bin:$PATH && export LC_ALL=C && pm grant org.videolan.vlc android.permission.WRITE_SETTINGS' returned non-zero exit status 255.
ERROR STDOUT:
ERROR STDERR: Exception occurred while executing 'grant':
ERROR java.lang.SecurityException: Permission android.permission.WRITE_SETTINGS is managed by role
ERROR at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1388)
ERROR at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermission(PermissionManagerServiceImpl.java:1319)
ERROR at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:547)
ERROR at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:597)
ERROR at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2546)
ERROR at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:292)
ERROR at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
ERROR at android.os.ShellCommand.exec(ShellCommand.java:38)
ERROR at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:5964)
ERROR at android.os.Binder.shellCommand(Binder.java:1049)
ERROR at android.os.Binder.onTransact(Binder.java:877)
ERROR at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4313)
ERROR at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:5948)
ERROR at android.os.Binder.execTransactInternal(Binder.java:1285)
ERROR at android.os.Binder.execTransact(Binder.java:1244)
My second question is regard UiAutomation. I've been trying to run Geekbench 6 through the given code, but it always fails at the point right after Run CPU Benchmark button is clicked. Once terminal shows that job wk1 is running, the button for Run CPU Benchmark is clicked and then WA pauses when workload pop up opens and is about to begin. I attached the run.log.
But as someone who is using Android UiAutomation for the first time, is there a good documentation for finding the button IDs, etc so that I can fix the automation for my application version and build my own workloads? I've checked the Android Developer Website, but was hoping for a more direct example. Or maybe a suggestion on where I can start when I try adding my own workload applications to find the UI object IDs and commands.
Thanks!
Also the version of WA I'm using is wa 3.4.0.dev1.
The text was updated successfully, but these errors were encountered:
This looks like this was introduced in the later versions of Android. I have opened a PR for devlib [1] to not throw an error if attempting to configure such a permission. Please let me know if this allows you to make progress.
The easiest way is to use the UiAutomatorViewer tool [2]. This allows you to take a snapshot/ui dump of the device. (FYI as part of WA's error handling code it should automatically try and capture the state of the device at point of failure and these files can also be opened by UiAutomatorViewer directly.) This tool allows you to select GUI elements and see the details of each element that can by used by the UiAutomator code.
So I've been trying to get some of the already made workloads to work and trying to add some of my own, but with little success.
The target device that I am using is Pixel 6 with Android 13. I have two questions/issues that I would like to have figured out.
android.permission.WRITE_SETTINGS
returns a non-zero exit status 255. I've attempted two workloads that return this error.wa run -f gfxbench.yaml
..workload_automation/plugins/vlc/__init__.py
, I have the following code:But when I try to record a revent so I can play my video (
wa record -r -w vlc
), I get the following error:Run CPU Benchmark
button is clicked. Once terminal shows that job wk1 is running, the button forRun CPU Benchmark
is clicked and then WA pauses when workload pop up opens and is about to begin. I attached therun.log.
But as someone who is using Android UiAutomation for the first time, is there a good documentation for finding the button IDs, etc so that I can fix the automation for my application version and build my own workloads? I've checked the Android Developer Website, but was hoping for a more direct example. Or maybe a suggestion on where I can start when I try adding my own workload applications to find the UI object IDs and commands.
Thanks!
Also the version of WA I'm using is wa 3.4.0.dev1.
The text was updated successfully, but these errors were encountered: