我有一个使用App2(AIDL)服务的App1。现在,我希望App2中的服务具有签名级别保护。这是我的清单。
App2:Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.vinitanilgaikwad.android_additionservice">
<permission
android:name="com.example.vinitanilgaikwad.android_additionservice.SIGNATURE"
android:description="@string/permissionDesc"
android:icon="@mipmap/ic_launcher"
android:label="@string/permissionLabel"
android:permissionGroup="com.example.vinitanilgaikwad.android_additionservice.SIGNATURE"
android:protectionLevel="signature" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name=".AdditionService2"
android:permission="com.example.vinitanilgaikwad.android_additionservice.SIGNATURE"
android:enabled="true"
android:exported="true"
>
<intent-filter>
<action android:name="service.Calculator"
/>
</intent-filter>
</service>
</application>
</manifest>
但是,这不起作用,因为即使App1未由同一个密钥库签名,我的服务也可以访问。你能帮忙吗?