签名级别保护不起作用
我使用证书 C1 签署我的 service.apk,使用证书 C2 签署我的 Activity.apk,并且我已放入服务的清单文件中
e<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="yo.myservice"
android:versionCode="1"
android:protectionLevel="signature"
android:versionName="1.0">
<application android:icon="@drawable/icon"
android:protectionLevel="signature"
android:label="@string/app_name">
<service android:name=".yoService">
<intent-filter>
<action android:name="yo.myservice.yoService" />
</intent-filter>
</service>
</application>
但我仍然看到该活动能够绑定到服务并调用其功能。
根据我所提到的Android安全,我的理解是除非由同一证书签名,否则活动将无法访问服务。我使用的是Android 2.2平台。
有人可以让我知道我做错了什么吗?
I am signing my service.apk with a certificate C1 and my activity.apk with certificate C2 and I have put in the manifest file of the service
e<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="yo.myservice"
android:versionCode="1"
android:protectionLevel="signature"
android:versionName="1.0">
<application android:icon="@drawable/icon"
android:protectionLevel="signature"
android:label="@string/app_name">
<service android:name=".yoService">
<intent-filter>
<action android:name="yo.myservice.yoService" />
</intent-filter>
</service>
</application>
But i still see that the activity is able to bind to the service and call its functions.
My understanding acc to what is mentioned Android Security was that activity wont be able to access service unless its signed by the same certificate. I am on Android platform 2.2.
Could some one let me know where I am doing wrong ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
android:protectionLevel
是<权限>
。您可以在
和
,并且它对于其中任何一个都无效。android:protectionLevel
is a valid attribute for<permission>
. You have it on<manifest>
and on<application>
, and it is not valid for either of those.