adb shell pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS
the permission is refused with the following message: "Security exception: grantRuntimepermission: neither user 2000 not current process has android.permission.Grant_Runtime_Permissions"
The device is a non-rooted Realme X2, running ColorOS 6.1, based on Android 9.
Anyone who could help me to resolve this problem? Your help would be much appreciated.
Finally figured it out, in the Developers options of the Realme ColorOS there is an option (the very last one) dealing with Permission monitoring. When disabled the ADB command "write_secure_settings" works just fine.
However, this Permission monitoring option remains a problem when running my Wifi profile (Wifi on/off depending on when I’m home or not). With Permission monitoring enabled, when Tasker tries to switch the WIfi on a window pops op stating Tasker wants to switch on Wifi - Allow or Prohibit – However, if Tasker is in the background, this window can't appear and nothing happens. With Permission monitoring disabled everything works just fine.
Is there any way or command to overcome this problem and allow Tasker to run the profile successfully with Permission monitoring enabled as it should?