I have the similar issue mentioned here I am getting following error while executing appium java script, the difference is my device is Xiaomi Redmi Note 7, and I am unable to find the setting that is the solution for that problem
I’m trying to connect Appium Inspector to my device, with capabilities below:
{
“deviceName”: “Mimi”,
“udid”: “d01916e”,
“platformName”: “Android”,
“platformVersion”: “9 PKQ1.180904.001”,
“appPackage”: “com.miui.calculator”,
“appActivity”: “com.miui.calculator.cal.CalculatorActivity”
}
but i got an error
[MJSONWP] Encountered internal error running command: Error executing adbExec. Original error: ‘Command ‘C:\Users\faria\Documents\Kaddra\Automation\Android\platform-tools\adb.exe -P 5037 -s d01916e 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’; Stderr: 'Security exception: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
Does anyone know how to disable of fix this permission issue?
Any help is greatly appreciated, thank you