赞
踩
使用appium客户端连接小米手机失败,完整报错信息如下:
An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘{已隐藏}/Library/Android/sdk/platform-tools/adb -P 5037 -s fca2117a shell settings delete global hidden_api_policy_pre_p_apps’ exited with code 255’; Stderr: ‘Exception occurred while executing ‘delete’: java.lang.SecurityException: Permission denial, must have one of: [android.permission. WRITE_SECURE_SETTINGS] at com.android.providers.settings.SettingsProvider.enforceHasAtLeastOnePermission(SettingsProvider.java:2394) at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1494) at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1486) at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1457) at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:544) at android.content.ContentProvider.call(ContentProvider.java:2700) at android.content.ContentProviderTransport.call(ContentProvider.java:634) at com.android.providers.settings.SettingsServiceMyShellCommand.deleteForUser(SettingsService.java:408) at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:282) at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97) at android.os.ShellCommand.exec(ShellCommand.java:38) at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:50) at android.os.Binder.shellCommand(Binder.java:1075) at android.os.Binder.onTransact(Binder.java:895) at android.os.Binder.execTransactInternal(Binder.java:1351) at android.os.Binder.execTransact(Binder.java:1282)’; Code: ‘255’
Permission denial,应该是adb连接时没有权限的问题,最近更新了手机系统,不知道问题是不是出在这里,于是尝试从USB调试里面寻找某个开启开关。
小米手机:打开USB调试后- 搜索栏搜索:USB调试(安全设置)
开启它。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。