raise exception_class(message, screen, stacktrace, alert_text)
>       raise exception_class(message, screen, stacktrace)
E       selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/yangzhaoguang/software/androidSDK/android-sdk-macosx/platform-tools/adb -P 5037 -s a21d5b8d shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy'' exited with code 255'; Command output: 
E       Exception occurred while executing 'delete':

E       java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
E               at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2562)
E               at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1562)
E               at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1554)
E               at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1525)
E               at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:568)
E               at android.content.ContentProvider.call(ContentProvider.java:2511)
E               at android.content.ContentProvider$Transport.call(ContentProvider.java:525)
E               at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:410)
E               at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:284)
E               at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
E               at android.os.ShellCommand.exec(ShellCommand.java:38)
E               at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:51)
E               at android.os.Binder.shellCommand(Binder.java:1073)
E               at android.os.Binder.onTransact(Binder.java:901)
E               at android.os.Binder.execTransactInternal(Binder.java:1331)
E               at android.os.Binder.execTransact(Binder.java:1268)
E       
E       Exception occurred while executing 'delete':
E       java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
 

执行时遇到报错,发现是Android手机系统权限导致:

按如下方式设置: 原本这里是未开启,打开后,重新运行即可

手机是一加 

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐