Operation not allowed: java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
Device: Xiaomi Redmi 4 Prime
ROM: Stock 6.0.1 with MIUI
Edit: This is what solved it:
Turn on the following option:
USB debugging -Debug mode when USB is connected
Install via USB -Allow installing apps via USB
USB debugging (Security Settings)- Allow granting permissions and simulating input via USB debugging