throws SecurityException when signing with the default debug keystore

扶醉桌前 提交于 2019-12-11 01:52:54

问题


I am receiving a SecurityException since yesterday when I launch the service using signature protection level for permission with the default debug keystore. The strange thing is I wasn't receiving this error before yesterday and I didn't make any security related change.

On the other hand, my own keystore using for releases is still working good. Related AndroidManifest.xml part:

<permission android:name="com.my.app.privateservices"
    android:protectionLevel="signature" />

<service android:name=".MyService"
    android:permission="com.my.app.privateservices" />

回答1:


As I make my service unreachable by setting my signature as a permission requirement, I got this error randomly when using the debug signature. I don't know the reason. But I delete the permission setting of my service while developing when I got this error and insert it again before signing the application. But, as I said, generally I don't get this error.

I know that this is not the actual answer. But, it is a work around. Hope it helps someone else.

Thanks.



来源:https://stackoverflow.com/questions/2420044/throws-securityexception-when-signing-with-the-default-debug-keystore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!