Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 284 Vote(s) - 3.42 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uploaded an APK which has an activity, activity alias, service or broadcast receiver with intentfilter, but without 'android : exported' property set

#1
I'm having an issue when I'm uploading an app bundle to the play console that:

> You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher.

But my manifest file includes the property.

### Manifest file

```lang-xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="**********">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />

<application
android:name="io.flutter.app.FlutterApplication"
android:label="*****"
android:requestLegacyExternalStorage="true"
android:usesCleartextTraffic="true"
android:icon="@mipmap/ic_launcher">

<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_stat_artboard_1" />

<meta-data android:name="com.google.android.geo.API_KEY"
android:value="Z*********"/>

<provider
android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
android:authorities="im.mingguang.mingguang_app.flutter_downloader.provider"
android:grantUriPermissions="true"
android:requestLegacyExternalStorage="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>

<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:grantUriPermissions="true">

<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>

<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
```

Play Console Error

![Enter image description here][1]

[1]:




Reply

#2
For me, adding `android:exported="true"` to `MainActivity` was not enough.

But I also had to remove the [Huawei][1] agcp and hms for push notification to let it work.

It seems that it uses an activity, activity alias, service or broadcast without `android:exported`.

[1]:

[To see links please register here]




Reply

#3
On about the 11th of January 2022, the Play Store introduced a lint check when uploading APKs to verify `exported` attributes are set correctly in the manifest.

Tools like [DexGuard][1] that obfuscate attribute names will cause the Play Store linter to fail, since it will be unable to check for `exported` attributes.

To fix this, configure obfuscation tools to keep attribute names in the manifest.

Here is the rule we used for DexGuard:

```
-keepresourcexmlattributenames manifest/**
```


[1]:

[To see links please register here]

Reply

#4
I added *android:exported="true"* to my main activity, but that didn't fix the issue for me.

However, I suspected this is a change that some packages have only recently implemented. I checked my pub outdated, and had a few older versions of key packages (in my case I was a major version behind on Firebase storage). Once I had updated to the latest possible versions in file *pubspec.yaml* the compiled file was accepted on upload to the Google Play.





Reply

#5
I solved it by writing

```lang-none
android:exported="true"
```

in `activity` below the `android:name=".MainActivity"`.

![Image shown][1]

[1]:

Reply

#6
If your app targets Android 12 or higher and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components.

If the app component includes the LAUNCHER category, set android:exported to true. In most other cases, set android:exported to false.

The following code snippet shows an example of a service that contains an intent filter whose android:exported attribute is set to false:

```lang-xml
<service android:name="com.example.app.backgroundService"
android:exported="false">

<intent-filter>
<action android:name="com.example.app.START_BACKGROUND" />
</intent-filter>
</service>

<receiver android:name="com.example.app.serives.SilentPushReceiver"
android:exported="false">

<intent-filter>
<!-- Receive silent push notifications. -->
<action
android:name="uz.usoft.kidya.action.ymp.SILENT_PUSH_RECEIVE"/>
</intent-filter>
</receiver>

<activity android:name="com.example.app.SplashScreenActivity"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name="com.example.app.MainActivity"
android:exported="false"/>
```

About information: *[Safer component exporting][1]*

[1]:

[To see links please register here]





Reply

#7
If your app targets [Android 12][1] or higher and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components.

Warning: If an activity, service, or broadcast receiver uses intent filters and doesn't have an explicitly-declared value for *android:exported*, your app can't be installed on a device that runs Android 12 or higher.

If the app component includes the LAUNCHER category, set *android:exported* to true. In most other cases, set android:exported to false.

The following code snippet shows an example of a service that contains an intent filter whose *android:exported* attribute is set to false:

```lang-xml
<service android:name="com.example.app.backgroundService"
android:exported="false">
<intent-filter>
<action android:name="com.example.app.START_BACKGROUND" />
</intent-filter>
</service>
```

[1]:

[To see links please register here]


Reply

#8
I downgraded to **targetSdkVersion 30** and **compileSdkVersion 30** in file *build.gradle*.

It should work fine.

In my case **geocoding** was the package which caused the problem
So it wouldn't build with the 30 SdkVersion, so I had to deleted the exception which refers to [Android S][1] "API 31".

[1]:

[To see links please register here]

Reply

#9
You need to change all the used libraries in file *pubspec.yaml* to an updated version whether they are using the 'exported' thingy in the manifest file.





Reply

#10
I had the same error and for two days I was trying to fix it.
Firstly, `android:exported="true"` did not work for me, because I added to only one activity.

1. I updated the [Unity][1] version (it did not work at that time, and maybe had an effect)
2. I added `android:exported="true"` in every activity field, and then voilà, it worked.

My Unity game now looks like:

```lang-xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.unity3d.player" android:installLocation="preferExternal" tools:ignore="MissingLeanbackSupport">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />
<uses-feature android:glEsVersion="0x00020000" />
<application android:name="androidx.multidex.MultiDexApplication" android:fullBackupContent="false" android:allowBackup="false" android:theme="@android:style/Theme.NoTitleBar" tools:ignore="GoogleAppIndexingWarning,MissingTvBanner" tools:replace="fullBackupContent,allowBackup">
<!-- UNITY -->
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name" android:screenOrientation="fullSensor" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:resizeableActivity="false" android:hardwareAccelerated="false" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<meta-data android:name="android.notch_support" android:value="true" />
</activity>
<!-- FULLSCREEN FIX -->
<meta-data android:name="android.max_aspect" android:value="2.16" />
<!-- 3rdParty MANIFEST -->
<activity android:name="com.facebook.unity.FBUnityLoginActivity" android:exported="true" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.facebook.unity.FBUnityDialogsActivity" android:exported="true" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.facebook.unity.FBUnityGamingServicesFriendFinderActivity" android:exported="true" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.facebook.unity.FBUnityAppLinkActivity" android:exported="true" />
<activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true" />
<activity android:name="com.facebook.unity.FBUnityGameRequestActivity" android:exported="true"/>
<activity android:name="com.facebook.unity.FBUnityCreateGameGroupActivity" android:exported="true"/>
<activity android:name="com.facebook.unity.FBUnityJoinGameGroupActivity" android:exported="true"/>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="fb901505887229125" />
<meta-data android:name="com.facebook.sdk.AutoLogAppEventsEnabled" android:value="true" />
<meta-data android:name="com.facebook.sdk.AdvertiserIDCollectionEnabled" android:value="true" />
<provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.app.FacebookContentProvider901505887229125" android:exported="true" />
<meta-data android:name="unity.splash-mode" android:value="0" />
<meta-data android:name="unity.splash-enable" android:value="True" />
<meta-data android:name="unity.allow-resizable-window" android:value="False" />
<meta-data android:name="notch.config" android:value="portrait|landscape" />
<meta-data android:name="unity.build-id" android:value="31d4e179-c52c-49d7-a4f5-da548e453521" />
<receiver android:name="com.unity.androidnotifications.UnityNotificationManager" android:exported="true" />
<receiver android:name="com.unity.androidnotifications.UnityNotificationRestartOnBootReceiver" android:exported="true" android:enabled="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
<uses-feature android:name="android.hardware.vulkan.version" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
</manifest>
```

You can see `android:exported="true"` added in every activity and receiver.

[1]:

[To see links please register here]


Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through