Search Unity

Unity android build using permissions not mentioned in manifest

Discussion in 'Android' started by ArcaneLight, Nov 17, 2018.

  1. ArcaneLight

    ArcaneLight

    Joined:
    Dec 27, 2012
    Posts:
    12
    Hey all, currently running Unity 2014.7.1f1, building an android game that I am trying to publish in the Google Play Store. Earlier builds uploaded to the Play Store without issue, but lately I'm starting to see the following error when I try to add any current ones:

    Upload failed

    Your APK or Android App Bundle is using permissions that require a privacy policy: (android.permission.READ_PHONE_STATE, android.permission.GET_ACCOUNTS).

    I do not have any code or libraries that ought to be triggering these permissions being required. In order to better understand what is going on, I went to see the android manifest file that unity is creating and nowhere in there do I see any reference to these permissions:


    <?xml version="1.0" encoding="UTF-8"?>

    <manifest android:installLocation="auto" android:versionCode="1" android:versionName="0.1" xmlns:tools="http://schemas.android.com/tools" package="com.meatandgrain.PunchABunch" xmlns:android="http://schemas.android.com/apk/res/android">

    <supports-screens android:anyDensity="true" android:xlargeScreens="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true"/>


    <application android:banner="@drawable/app_banner" android:isGame="true" android:label="@String/app_name" android:icon="@drawable/app_icon" android:theme="@StyLe/UnityThemeSelector">


    <activity android:label="@String/app_name" android:hardwareAccelerated="false" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:launchMode="singleTask" android:screenOrientation="portrait" android:name="com.unity3d.player.UnityPlayerActivity">


    <intent-filter>

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

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

    </intent-filter>

    <meta-data android:name="unityplayer.UnityActivity" android:value="true"/>

    </activity>

    <meta-data android:name="unity.build-id" android:value="f0ee4493-fed8-4689-9f4e-e081bb066bfb"/>

    <meta-data android:name="unity.splash-mode" android:value="0"/>

    <meta-data android:name="unity.splash-enable" android:value="True"/>

    <meta-data android:name="android.max_aspect" android:value="2.1"/>

    </application>

    <uses-sdk android:targetSdkVersion="28" android:minSdkVersion="16"/>

    <uses-feature android:glEsVersion="0x00020000"/>

    <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>


    I have seen this prior thread (https://forum.unity.com/threads/uni..._state-automatically-how-to-remove-it.333431/) but that seemed to be where the manifest was actually mentioning the permissions, in my case I do not believe that to be the case.
    Any help I could get on this?
    Thanks!
     
  2. ArcaneLight

    ArcaneLight

    Joined:
    Dec 27, 2012
    Posts:
    12
    Well, the issue is no longer occurring for me. I went through a whole series of changes to try and figure this out (upgrade unity version, downgrade unity version, copy project to a different computer, etc) at first to no avail. The step that I think made a difference was when I removed the ProjectSettings and UnityPackageManager directories from the main project folder and then reloaded the project and those directories were rebuilt.

    I then got a new error on the Google Play Store about the signing no longer matching, so I removed the project, added a new one, and uploading the apk now works without any errors whatsoever. Don't know if this issue will be helpful to anyone, but I'll leave it up just in case.

    Cheers!
     
    mfyasar111 likes this.
  3. GainfulSage

    GainfulSage

    Joined:
    Apr 30, 2015
    Posts:
    106
  4. ArcaneLight

    ArcaneLight

    Joined:
    Dec 27, 2012
    Posts:
    12
    That's very interesting. I'll have to see if this issue ever crops back up and then give that a try. Thank you!