Search code examples
androidtestingandroid-securityexceptionmonkey

Monkey throwing security exception even though they are disabled


He everyone, I am getting this exception

java.lang.SecurityException: Permission Denial: android.intent.action.CLOSE_SYSTEM_DIALOGS

and Im not sure where its coming from as the app im testing doesnt use android.intent.action.CLOSE_SYSTEM_DIALOGS anywhwere

Maybe it is a 3rd party library somewhere.

I disabled security exceptions with

adb shell monkey -p package.name --ignore-security-exceptions  -v -v 15000

but it still throws the exception.

Any help with this will be appreciated, thank you for your time


Solution

  • There is likely a permission issue within the program "Monkey" itself in which, is conflicting with the Android permission system. It appears to be the same type of error that would occur in Windows if you tried to run a program that required administrative rights.

    If possible, try running as admin.