android - 如何更改 AppMeasurementInstallReferrerReceiver 权限
问题描述
目前我在 ionic 中的应用程序在执行安全扫描时检测到此问题广播接收器(com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver)受权限保护,但应检查权限的保护级别。权限:android.permission.INSTALL_PACKAGES [android:exported = true]
我目前正在编辑我的应用程序 config.xml 文件,但我不断收到消息:
我的 config.xml 是:
<platform name="android">
<hook src="hooks/add_tools_namespace.js" type="after_prepare" />
<allow-intent href="market:*" />
<allow-navigation href="*" />
<allow-intent href="*" />
<access origin="*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:usesCleartextTraffic="false" />
<application android:requestLegacyExternalStorage="true" />
<application android:allowBackup="false" tools:replace="android:allowBackup" />
</edit-config>
<config-file file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</config-file>
<config-file file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<activity android:exported="false" android:name="com.google.android.gms.tagmanager.TagManagerPreviewActivity" android:noHistory="true" />
</config-file>
<config-file file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<receiver android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver" android:permission="android.permission.INSTALL_PACKAGES" />
</config-file>
<config-file file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<receiver android:enabled="true" android:exported="false" android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:permission="com.google.android.c2dm.permission.SEND" />
</config-file>
<config-file file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<activity android:name="com.google.firebase.auth.internal.FederatedSignInActivity" tools:replace="android:standard" />
</config-file>
<config-file file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<activity android:exported="false" android:name=".com.google.firebase.auth.internal.FederatedSignInActivity" android:permission="com.google.firebase.auth.api.gms.permission.LAUNCH_FEDERATED_SIGN_IN" />
</config-file>
<config-file file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<service android:enabled="true" android:exported="false" android:name="com.google.android.gms.auth.api.signin.RevocationBoundService" android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
</config-file>
</platform>
添加权限,但我不断收到错误
<config-file file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<receiver android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver" android:permission="android.permission.INSTALL_PACKAGES" />
</config-file>
解决方案
推荐阅读
- knitr - NCOL(X) 中的错误:找不到对象“工资”调用:
- mysql - NetBeans 到 MySQL 的连接
- angular - Anulgar - 在启动应用程序或刷新时查看 HTML 内容之前需要请求的结果
- amazon-web-services - AWS s3 CLI“cp”和“sync”触发什么事件?
- html - HTML 中使用的某些字体看起来与谷歌字体不同
- python - Python Django 使用 Ajax 将文件下载到客户端机器
- c++ - wchar.h 没有这样的文件或目录
- json - jq中根据相似ID对象合并文件并改造数据
- flutter - 无效的插件规范 moor_ffi 在 `pubspec.yaml` 中找不到 `flutter.plugin.platforms` 键
- javascript - 当我在 apt.get() 中添加 console.print() 语句来调试我的 javascript 代码时,Nodejs 服务器吓坏了