Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Unity Oculus Platform SDK Permission Issues

TrentLVRTrentLVR Posts: 7
When I include the Oculus Platform SDK for unity it has code that forces unity to add the 2 permissions below
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>

I can remove the audio permission by modifying some of the code from the Oculus Platform SDK but this is a pain and I would prefer a solution where i do not have to modify the oculus platform sdk.

I am unsure if  <uses-permission android:name="android.permission.INTERNET"/> is either coming from my code or the Oculus Platformsdk or both.

I exported my project to an android studio project so i can manually modify the permissions that unity generates(not an ideal solution)

The android studio project gives me a gradle error 
Caused by: java.lang.RuntimeException: Cannot read packageName from C:\trent\olympia_oculus_go\build\Olympia\src\main\AndroidManifest.xml

Googling this issue does not have great results.

Is there any documentation  that shows how to build an oculus unity project in andoird studio that was generated from unity.
Is there a simple solution to remove permissions that i do not require in unity without modifying any of the code.(I use many plugins, i don't want to modify each for an Oculus build if possible)
the second solution is preferable.

Thanks for reading.


  • TrentLVRTrentLVR Posts: 7
    I have found a solution, technically the permission is still included in the android AndroidManifest.xml

    Add the permissions you want to remove the generated AndroidManifest.xml file that the unity ocululs tools generates

    then add the following to text to the permission

    <uses-permission android:name="android.permission.INTERNET"/>
    would be:
    <uses-permission android:name="android.permission.INTERNET" android:maxSdkVersion="1"/>

    my complete android manifest ends up being

    <?xml version="1.0" encoding="utf-8" standalone="no"?>
                    <action android:name="android.intent.action.MAIN"/>
                    <category android:name="android.intent.category.INFO"/>
            <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" />
        <uses-permission android:name="android.permission.INTERNET" android:maxSdkVersion="1"/>
        <uses-permission android:name="android.permission.RECORD_AUDIO" android:maxSdkVersion="1"/>
  • PaulAtWarpPaulAtWarp Posts: 25
    Brain Burst
    I'm facing the same issue. Is this still the only way to solve it?
  • PaulAtWarpPaulAtWarp Posts: 25
    Brain Burst
    Also, this doesn't solve the issue. It stops the app requesting the microphone but on the store details it still says that the app requires the microphone to record audio. Even though it doesn't. And there's no apparent option to turn it off.
  • PaulAtWarpPaulAtWarp Posts: 25
    Brain Burst
    It seems the way to fix it is to hack out all of the code referring to microphone from the SDK.
Sign In or Register to comment.