Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting: Not allowed to start service Intent ... without permission Service process is bad

ACRA's crush report sends me this error.

java.lang.SecurityException: Not allowed to start service Intent { act=auto_update cmp=net.DailyTimer.CalendarAlarmHelperFree/net.DailyTimer.CalendarAlarmHelper.CalendarAlarmService } without permission Service process is bad

I see this error on limited devices and I can't reproduce. I guess this error depends on running environment.
My question is:

  • What permission is wrong? I could not find out what "Service process is bad" mean.

EDIT:
I'm getting this error when calling startService(intent) to start remote service. And on many devices it works fine.

like image 786
Tomcat Avatar asked Aug 21 '11 05:08

Tomcat


1 Answers

Although I have not experienced this myself, I did some looking around and I think these might be useful to you. Here, user Jomia says:

The java.lang.SecurityException you are seeing is because you may enter two entries pointing to same activity. Remove the second one and you should be good to go.

Also, consider taking a look at this page, specifically under public static final int CONTEXT_INCLUDE_CODE. Here is the relevant part:

Setting this flags imposes security restrictions on what application context you can access; if the requested application can not be safely loaded into your process, java.lang.SecurityException will be thrown. If this flag is not set, there will be no restrictions on the packages that can be loaded, but getClassLoader() will always return the default system class loader.

I hope I could be of some help. If these responses are unrelated to your issue, you might want to try posting relevant code, etc. Cheers.

like image 178
Kgrover Avatar answered Oct 21 '22 05:10

Kgrover