有没有办法在Android上运行React Native应用程序,同时在AndroidManifest.xml文件中将android:exportd为“false”而不会出错?

Is there any way to run the React Native app on Android while making android:exported as "false" in AndroidManifest.xml file without an error?

提问人:Soham Jani 提问时间:10/12/2023 更新时间:10/12/2023 访问量:26

问:

这是一个测试项目 AndroidManifest.xml 文件。由于一些安全合规性,我需要使属性android:exported=“true”或MainActivity。但是,如果我尝试做同样的事情,它不允许我在 android 上运行 react native 应用程序。有没有办法使项目运行,同时使导出的值为假?

<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
        android:launchMode="singleTask"
        android:windowSoftInputMode="adjustResize"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
    </application>
</manifest>

我尝试直接在AndroidManifest.xml文件中使导出的false,但它似乎不起作用。

android react-native security android-manifest 渗透测试

评论


答: 暂无答案