1

I am getting:

java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.TIME_SET from pid=xxxxx, uid=xxxxx

for:

Intent timeChanged = new Intent(Intent.ACTION_TIME_CHANGED);
sendBroadcast(timeChanged);

even when I have put my app in /system/app folder. Please help me out to know why this is happening?

Rohit
  • 395
  • 3
  • 14
  • You need to be signed with a system cert don't you? rather than just be in the folder – Blundell Mar 04 '20 at 09:22
  • @Blundell Is there any way to obtain system certi file? Or, if you know of any way around? – Rohit Mar 04 '20 at 13:24
  • 1
    If you are included in the /system/app folder, then you must be building the rom? or know the team builing the rom? They have the certs – Blundell Mar 04 '20 at 16:08
  • I included the certi. Still facing exact same problem both on debug and release. – Rohit Mar 04 '20 at 22:55

1 Answers1

0

Try putting the app in the priv-app folder in the system partition, and adding the app to the privapp-permissions.xml file on the same partition, with the TIME_SET permission.

Vitaliy
  • 185
  • 10