Rooted android device but getting "Security exception: Permission Denial: not allowed to send broadcast android"
0
votes
0
answers
4466
views
I've got a nexus 6P running stock Android 8.1 which is rooted using Magisk (verified by runnign
adb shell su
).
When turning airplane mode on/off using adb (as per these instructions: https://stackoverflow.com/a/40271379) the following exception is returned:
$ adb shell settings put global airplane_mode_on 1
$ adb shell am broadcast -a android.intent.action.AIRPLANE_MODE
Broadcasting: Intent { act=android.intent.action.AIRPLANE_MODE flg=0x400000 }
Security exception: Permission Denial: not allowed to send broadcast android.intent.action.AIRPLANE_MODE from pid=6484, uid=2000
java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.AIRPLANE_MODE from pid=6484, uid=2000
at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:19204)
at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:19842)
at com.android.server.am.ActivityManagerShellCommand.runSendBroadcast(ActivityManagerShellCommand.java:621)
at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:154)
at android.os.ShellCommand.exec(ShellCommand.java:96)
at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:15021)
at android.os.Binder.shellCommand(Binder.java:594)
at android.os.Binder.onTransact(Binder.java:492)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:4243)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2919)
at android.os.Binder.execTransact(Binder.java:697)
What needs to happen for adb to be able to turn airplane mode on and off?
Asked by Greg
(101 rep)
Jul 2, 2021, 04:18 AM