问题描述
[GTS7.0r2]GtsPermissionTestCases
com.google.android.permission.gts.RequiredPregrantPermissionsTest#checkRequiredPregrantPermission
com.google.android.permission.gts.RequiredPregrantPermissionsTest#checkRequiredPregrantPermission
Fail:
java.lang.AssertionError: com.google.android.apps.assistant does not have android.permission.RECORD_AUDIO granted.
com.google.android.apps.assistant does not have android.permission.READ_SMS granted.
com.google.android.apps.assistant does not have android.permission.SEND_SMS granted.
解决方案
在vendor/partner_gms/etc下创建如下文件夹和文件
/default-permissions/default-permissions-google.xml
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<exceptions>
<exception
package="com.google.android.apps.assistant"
sha256-cert-digest="43:0B:20:EB:61:96:7E:9C:5B:BE:02:59:9B:07:35:16:80:7D:AE:72:D7:86:FE:92:7F:48:96:B7:C7:F2:96:1F">
<!-- Record audio -->
<permission name="android.permission.RECORD_AUDIO" fixed="false"/>
<!-- SMS -->
<permission name="android.permission.READ_SMS" fixed="false"/>
<permission name="android.permission.SEND_SMS" fixed="false"/>
</exception>
</exceptions>
楼主,sha256-cert-digest这个值如何获取?假如其它APK也出现这个问题!