# 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:** 1\
**Showing post:** 4

<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)
  );
}

```

---

_[View the full topic](https://forums.unrealengine.com/t/android-permissions-problems/86380)._
