Skip to main content
Participant
January 29, 2025
Solved

Unwanted AndroidManifest Permissions Programmatically Added By Unity During APK Build Process

Any updated methods to remove the permissions automatically added by Unity (which are unneeded by my app)?

Talking about this issue in particular: https://communityforums.atmeta.com/t5/Unity-Development/Your-manifest-includes-the-following-permissions-restricted-by/m-p/960334#M20612

Here's another "magical" way to fix it: https://skarredghost.com/2021/03/24/unity-unwanted-audio-permissions-app-lab/

RuHoweAnswer
New Participant
January 29, 2025

I also wrote up how I got around the AndroidManifest Unity bug by editing the manifest file if it helps anyone:
https://www.stornaway.io/tech-tip-when-meta-quest-developer-hub-objects-to-android-permission-read_phone_state/

It is crazy that this is still a thing.

For search: The error reported by Meta Quest Developer Hub says:
ERROR:
• The upload could not be completed because your application contains the following Android permissions that are not supported:
– android.permission.READ_PHONE_STATE
Please remove the following permissions and upload your application binary again.

It also contains the following complaint for permissions currently added by Unity despite using a custom manifest:
Your manifest includes the following permissions restricted by Oculus:
– android.permission.WRITE_EXTERNAL_STORAGE
– android.permission.READ_EXTERNAL_STORAGE
– android.permission.READ_MEDIA_AUDIO
– android.permission.READ_MEDIA_VIDEO
– android.permission.READ_MEDIA_IMAGES
– android.permission.ACCESS_MEDIA_LOCATION
– android.permission.READ_MEDIA_IMAGE
These are not blocked up front in the same way as READ_PHONE_STATE above, but with a standard app you will need to remove these before submitting to the store in order for your app to be accepted.



3 replies

RuHoweAnswer
New Participant
January 29, 2025

I also wrote up how I got around the AndroidManifest Unity bug by editing the manifest file if it helps anyone:
https://www.stornaway.io/tech-tip-when-meta-quest-developer-hub-objects-to-android-permission-read_phone_state/

It is crazy that this is still a thing.

For search: The error reported by Meta Quest Developer Hub says:
ERROR:
• The upload could not be completed because your application contains the following Android permissions that are not supported:
– android.permission.READ_PHONE_STATE
Please remove the following permissions and upload your application binary again.

It also contains the following complaint for permissions currently added by Unity despite using a custom manifest:
Your manifest includes the following permissions restricted by Oculus:
– android.permission.WRITE_EXTERNAL_STORAGE
– android.permission.READ_EXTERNAL_STORAGE
– android.permission.READ_MEDIA_AUDIO
– android.permission.READ_MEDIA_VIDEO
– android.permission.READ_MEDIA_IMAGES
– android.permission.ACCESS_MEDIA_LOCATION
– android.permission.READ_MEDIA_IMAGE
These are not blocked up front in the same way as READ_PHONE_STATE above, but with a standard app you will need to remove these before submitting to the store in order for your app to be accepted.



devadamAuthor
Participant
January 30, 2025

It is odd that this is still an issue. Your solution is super simple so thank you for that. I went down a rabbit hole of unpacking the APK and then resigning it which was a huge waste of time.

New Participant
August 14, 2025

Also make sure the Android API is  34 or higher, that was the issue for me, that I had to fix after implementing the solution listed here