2

I'm working on an app that should be able to broadcast protected intents like android.intent.action.DEVICE_STORAGE_LOWso that I can see if the necessary system receivers work properly. Currently the app stops and I get a security exception.

Is there anyway to give the app permissions to send these protected broadcasts?

AADProgramming
  • 6,077
  • 11
  • 38
  • 58
Jayaram
  • 21
  • 1
  • 2

1 Answers1

3

Only system-level processes can broadcast protected intents. An app can't get the persmission to send them in any way, except maybe on a rooted device if you can find a way to start your app as a system process.

Dalmas
  • 26,409
  • 9
  • 67
  • 80
  • I put my apk in /System/app, and did a reboot. App got installed as System app. But, I am still receiving error when sending broadcast: java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.TIME_SET from pid=10176, uid=10118 – Rohit Mar 04 '20 at 08:39