From 0a7fe5d8ef2e80edd31ed81a5be3a9bc8ce5d819 Mon Sep 17 00:00:00 2001 From: Khaled Mohammed Date: Tue, 12 Nov 2024 12:15:26 +0200 Subject: [PATCH] Update AndroidManifest.xml Update AndroidManifest for compatibility with Android 11-14 - Updated targetSdkVersion to 33 for modern Android support. - Added android:exported attribute to MainActivity and components with intent filters as required by Android 12+. - Limited certain permissions (e.g., SMS, external storage) with maxSdkVersion for Android 11+. - Added tools:ignore="ProtectedPermissions" for WRITE_SETTINGS permission to suppress Lint warnings. - Declared optional hardware features to improve device compatibility. - Enabled legacy storage with requestLegacyExternalStorage for backward compatibility. --- .../app/src/main/AndroidManifest.xml | 95 ++++++++++--------- 1 file changed, 51 insertions(+), 44 deletions(-) diff --git a/java/androidpayload/app/src/main/AndroidManifest.xml b/java/androidpayload/app/src/main/AndroidManifest.xml index 0ad12f6a9..13af3eb07 100644 --- a/java/androidpayload/app/src/main/AndroidManifest.xml +++ b/java/androidpayload/app/src/main/AndroidManifest.xml @@ -1,65 +1,72 @@ + xmlns:tools="http://schemas.android.com/tools" + package="com.metasploit.stage" + android:versionCode="1" + android:versionName="1.0"> - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + android:requestLegacyExternalStorage="true" + android:preserveLegacyExternalStorage="true" + android:label="@string/app_name"> + android:name=".MainActivity" + android:exported="true" + android:theme="@android:style/Theme.NoDisplay" + android:label="@string/app_name"> - - + + - - - - + + + + + android:name=".MainBroadcastReceiver" + android:exported="false" + android:label="MainBroadcastReceiver"> - + - + +