Removing Android app permissions

There is an elegant solution using the UPL mechanism, which allows you to modify android manifest and Activity class.

(1) Create a file YourProject/Source/YourProject/AndroidSanitizePermissions_UPL.xml with content:

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

(2) In YourProject/Source/YourProject.Build.cs add:

var manifest_file = Path.Combine(ModuleDirectory, "AndroidSanitizePermissions_UPL.xml");
AdditionalPropertiesForReceipt.Add(
	new ReceiptProperty("AndroidPlugin", manifest_file)
);

Now the unnecessary permissions will be removed from manifest.