# Android Permissions Problems

**URL:** <https://forums.unrealengine.com/t/android-permissions-problems/86380>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [February 28, 2017, 3:12am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380 "2017-02-28T03:12:45Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1786a85d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1786a85d](https://forums.unrealengine.com/u/anonymous_user_1786a85d)\
**Post date:** [February 28, 2017, 3:12am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/1 "2017-02-28T03:12:45Z")

</div>

Hello!  
For a while now I’ve been struggling with the permissions for Android Development. I want to get rid of the permissions GET\_ACCOUNTS and READ\_PHONE\_STATE, since they are the only ones that force me to make a privacy policy for the Google Play Store. I do not do anything with the information given, and are default under the Engine. But I have found no way to change the permissions.

The first method that I came across was adding _ManifestRequirementsOverride.txt_ to the “[Project Name]\Intermediate\Android\APK” file in your project file. However, the text document would not get rid of GET\_ACCOUNTS and READ\_PHONE\_STATE, nor anything else that I wanted it to. In short, it wouldn’t override anything. I have tried it on multiple projects, each with the same output: no change to the _AndroidManifest.xml_ file.  
This is the answerhub post that I found it in: [Removing Android app permissions - Programming & Scripting - Epic Developer Community Forums](https://answers.unrealengine.com/questions/318771/removing-android-app-permissions.html)  
Here’s a screenshot of my file setup before packaging my project, you can see the requirements for both _AndroidManifest.xml_ and _ManifestRequirementsOverride.txt_. Packaging reverts AndroidManifest.xml to its original state.

 ![Problem1.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/c/ec4d698d88a6ef31e5f7bc8e7b6fb8a9a1517bcf.png)

The second method that I found was editing UE4’s source code. Supposedly, going to “Epic\_Games\UE\_4.15\Engine\Source\Programs\UnrealBuildTool\Android\UEDeployAndroid.cs” and changing the section that generated the manifest file will change the way that the manifest file generates. This doesn’t work, for me at least. I deleted the two Text.AppendLine that added in GET\_ACCOUNTS and READ\_PHONE\_STATE, to no avail. I edited them in Microsoft Visual Studio. The edits remain even after packaging the game.  
I found this method at the forum post: [Any way to edit the AndroidManifest.xml Manually? - Mobile - Epic Developer Community Forums](https://forums.unrealengine.com/showthread.php?76986-Any-way-to-edit-the-AndroidManifest-xml-Manually)  
Here’s a screenshot of the section of code that I modified:

 ![Problem1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/6/c/96c460d5e033c6544e21231e2a5fcd3d823dd8c7.png)

I really have no idea what to do.

Any suggestions are appreciated.  
Thanks.

---

<div class="post-metadata">

**Author:** ![gameDNA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gamedna/32/1209504_2.png) [@gameDNA](https://forums.unrealengine.com/u/gameDNA)\
**Post date:** [February 28, 2017, 9:11am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/2 "2017-02-28T09:11:05Z")

</div>

Editing UEDeployAndroid.cs should definitely work. Delete [PROJECT\_FOLDER]/Intermediate/Build/Android and try again.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1786a85d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1786a85d](https://forums.unrealengine.com/u/anonymous_user_1786a85d)\
**Post date:** [March 1, 2017, 1:05am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/3 "2017-03-01T01:05:08Z")

</div>

Hello ,  
Thanks for replying! Unfortunately, deleting the Android file has no effect. It is the same as before. The UEDeployAndroid.cs file still shows the edits.

---

<div class="post-metadata">

**Author:** ![endragorr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@endragorr](https://forums.unrealengine.com/u/endragorr)\
**Post date:** [March 8, 2017, 2:47am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/4 "2017-03-08T02:47:20Z")

</div>

The easiest way to achieve this is to use UPL (“Unreal Plugin Language”) file to remove permissions. As I know, it’s not publicly documented, so you have to dig through UE4 source code to understand what it is capable of. Basically, UPL is an XML that allows to modify contents of Android- and iOS- specific files, such as AndroidManifest.xml or GameActivity.java.

1. Create `RemoveAndroidPermissions_UPL.xml` file near the .Build.cs file of your project. It should contain this:

```auto

<?xml version="1.0" encoding="utf-8"?>
<root xmlns:android="http://schemas.android.com/apk/res/android">
    <androidManifestUpdates>
        <removePermission android:name="android.permission.READ_PHONE_STATE" />
        <removePermission android:name="android.permission.GET_ACCOUNTS" />
    </androidManifestUpdates>
</root>

```

1. Add

```auto

using System.IO;

```

to the import section of the .Build.cs file. Then add this code to the constructor:

```auto

if (Target.Platform == UnrealTargetPlatform.Android) {
  var manifestFile = Path.Combine(this.ModuleDirectory, "RemoveAndroidPermissions_UPL.xml");
  AdditionalPropertiesForReceipt.Add(
    new ReceiptProperty("AndroidPlugin", manifestFile)
  );
}

```

---

<div class="post-metadata">

**Author:** ![gameDNA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gamedna/32/1209504_2.png) [@gameDNA](https://forums.unrealengine.com/u/gameDNA)\
**Post date:** [March 8, 2017, 11:42am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/5 "2017-03-08T11:42:37Z")

</div>

You can see how UPL is used in my plugins: [gameDNAstudio (gameDNA) · GitHub](https://github.com/gameDNAstudio) but I think modifying UEDeployAndroid.cs also should help…

---

<div class="post-metadata">

**Author:** ![Chris\_Babcock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chris\_Babcock](https://forums.unrealengine.com/u/Chris_Babcock)\
**Post date:** [March 9, 2017, 2:13am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/6 "2017-03-09T02:13:51Z")

</div>

UPL as above works, but the reason you had trouble with ManifestRequirementsOverride.txt is it should be in your project’s Build/Android folder. It will get copied to Intermediate/Android/APK but it doesn’t look for it there.

BTW, this won’t be necessary for these two permission in 4.16; we removed them as the old reason for needing them is not longer valid.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1786a85d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1786a85d](https://forums.unrealengine.com/u/anonymous_user_1786a85d)\
**Post date:** [March 9, 2017, 6:55am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/7 "2017-03-09T06:55:42Z")

</div>

Hello Chris Babcock,  
Thanks for replying to my forum post, I’m glad that Staff spend time on the forums/answerhub to help idiots like me. I’m also pleased that the two permissions will be removed in 4.16. I placed ManifestRequirementsOverride.txt in my project’s Build/Android folder, but unfortunately all that it did was cause the building to end in an “Exit Code = 5”. I’ll attach the output log for it if you’d like to look at it.

endragorr & : I have not tried the UPL method yet. I’ve tried a variation of it before, but after messing up the source code I CTRL+Z’d for ages out of a panic. I shall update soon to tell whether or not it works.

Thank you for all of your replies!

---

<div class="post-metadata">

**Author:** ![Chris\_Babcock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chris\_Babcock](https://forums.unrealengine.com/u/Chris_Babcock)\
**Post date:** [March 10, 2017, 1:06am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/8 "2017-03-10T01:06:26Z")

</div>

Take out everything before the \<uses-sdk\> and after last \<uses-permission\>… you are closing off the tags. Try just this:

```auto

     <uses-sdk android:targetSdkVersion="22" android:minSdkVersion="15"/>
     
     <uses-feature android:required="true" android:glEsVersion="0x00020000"/>
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
     <uses-permission android:name="android.permission.WAKE_LOCK"/>
     <uses-permission android:name="com.android.vending.CHECK_LICENSE"/>
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
     <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
     <uses-permission android:name="android.permission.VIBRATE"/>
     <uses-permission android:name="com.android.vending.BILLING"/>

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1786a85d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1786a85d](https://forums.unrealengine.com/u/anonymous_user_1786a85d)\
**Post date:** [March 10, 2017, 1:59am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/9 "2017-03-10T01:59:49Z")

</div>

This worked. Thanks for helping me through it. =)

---

<div class="post-metadata">

**Author:** ![FollowMyStaR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FollowMyStaR](https://forums.unrealengine.com/u/FollowMyStaR)\
**Post date:** [March 6, 2019, 12:19am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/10 "2019-03-06T00:19:50Z")

</div>

> [@anonymous\_user\_1786a85d](#):
>
> This worked. Thanks for helping me through it. =)

**I have the same problem. Can you please share with me if you could solve the problem?**

---

<div class="post-metadata">

**Author:** ![BigBankHankster](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bigbankhankster/32/1021263_2.png) [@BigBankHankster](https://forums.unrealengine.com/u/BigBankHankster)\
**Post date:** [March 16, 2022, 9:44pm UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/11 "2022-03-16T21:44:12Z")

</div>

Will this work with Blueprints? I’ve been struggling with this for almost a week now to get my game into AppLab

---

<div class="post-metadata">

**Author:** ![machinecommune](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@machinecommune](https://forums.unrealengine.com/u/machinecommune)\
**Post date:** [September 19, 2023, 6:38pm UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/12 "2023-09-19T18:38:55Z")

</div>

FYI - you have to have a space after the permission name or it won’t work.

android:name=“xxx” /\> works  
android:name=“xxx”/\> doesn’t work

```
<androidManifestUpdates>
    <removePermission android:name="android.permission.WAKE_LOCK" />
    <removePermission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</androidManifestUpdates>

```

---

<div class="post-metadata">

**Author:** ![chuklov](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chuklov](https://forums.unrealengine.com/u/chuklov)\
**Post date:** [November 26, 2023, 5:03pm UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/13 "2023-11-26T17:03:40Z")

</div>

None of that worked for me.  
I had to change AndroidManifest manually and use Gradle build bat to compile a new APK with changes. Only this way it works with Unreal Engine 5.3

---

<div class="post-metadata">

**Author:** ![Angstjaeger](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Angstjaeger](https://forums.unrealengine.com/u/Angstjaeger)\
**Post date:** [May 3, 2024, 2:19am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/14 "2024-05-03T02:19:37Z")

</div>

Can you explain this process a little bit more please. I having issue building the apk.

---

<div class="post-metadata">

**Author:** ![chuklov](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chuklov](https://forums.unrealengine.com/u/chuklov)\
**Post date:** [May 3, 2024, 2:34am UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/15 "2024-05-03T02:34:29Z")

</div>

In short, this is the process I used, but I think we need to find a working solution for UE5.

Change android manifest as you need  
{Project dir}\Intermediate\Android\arm64\gradle\app\src\main

Use Gradle to build the app  
{Project dir}\Intermediate\Android\arm64\gradle  
gradlew.bat

Path to the compiled apk  
{Project dir}\Intermediate\Android\arm64\gradle\app\build\outputs\apk\debug

This is not for publishing and more for development and testing.

---

<div class="post-metadata">

**Author:** ![vimesito](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vimesito](https://forums.unrealengine.com/u/vimesito)\
**Post date:** [February 23, 2025, 6:06pm UTC](https://forums.unrealengine.com/t/android-permissions-problems/86380/16 "2025-02-23T18:06:30Z")

</div>

late but think this could be useful [https://youtu.be/p29E0vmlzjE](https://youtu.be/p29E0vmlzjE)
