【Appium踩坑】小米手机,启动报错:exited with code 255 writing to settings requires:android.permission.WRITE_SECUR
程序员文章站
2022-07-03 21:30:56
1、解决->开启 USB调试(安全设置)(1) 手机-插入 sim卡(2) 设置 - 更多设置 - 开发者选项 - USB调试(安全设置)- 开启2、详细报错信息An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/xx/Library/Android/sdk/pla...
设备:小米9 + Android 9.0
工具: Appium desktop 1.15.1
相关解答:github issue
1、解决->开启 USB调试(安全设置)
(1) 手机-插入 sim卡
(2) 设置 - 更多设置 - 开发者选项 - USB调试(安全设置)- 开启
2、详细报错信息
An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/xx/Library/Android/sdk/platform-tools/adb -P 5037 -s 77c9ea2f shell settings delete global hidden_api_policy_pre_p_apps' exited with code 255';
Stderr: 'Security exception: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS java.lang.SecurityException:
Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:1815)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1023)
at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1006)
at com.android.providers.settings.SettingsProvider.delete(SettingsProvider.java:592)
at android.content.ContentProvider$Transport.delete(ContentProvider.java:343)
at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:406)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:289)
at android.os.ShellCommand.exec(ShellCommand.java:103)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:51) at android.os.Binder.shellCommand(Binder.java:634)
at android.os.Binder.onTransact(Binder.java:532)
at android.os.Binder.execTransact(Binder.java:733)'; Code: '255'
本文地址:https://blog.csdn.net/YUICUI/article/details/107546281
上一篇: 总会有一个人在未来等着我呢