开发者

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.CalendarAlar开发者_StackOverflowmHelperFree/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.


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.


see Source code Line 10494,if method "bringUpServiceLocked" return false, it would throw "Service process is bad" Exception

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/com/android/server/am/ActivityManagerService.java#ActivityManagerService.startProcessLocked%28com.android.server.am.ProcessRecord%2Cjava.lang.String%2Cjava.lang.String%29

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜