title: How to find source of a permission in Unity Android
body: <p>Note: This question is specific to Unity3D</p>
  
  <p>I have a very clean android manifest file in Unity project under <code>Plugins/Android/</code> folder with no <code>&lt;uses-permissions/&gt;</code> tag at all. I believe that some permissions in final APK comes from Android Player Settings for-example <code>READ_EXTERNAL_STORAGE</code>. In my Gear VR project I see following lines added in final manifest which can be accessed in <code>Temp/StagingArea/</code>:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
  &lt;uses-feature android:name="android.hardware.microphone" android:required="false" /&gt;
  </code></pre>
  
  <p>Now this is definitely coming from one of the plugins that I have in my project (I have many plugins). </p>
  
  <p>My app is getting rejected from Oculus saying </p>
  
  <blockquote>
    <p>Your app is asking for excessive user permissions for using user
    permissions inappropriately.</p>
  </blockquote>
  
  <p>I found a workaround <a href="http://answers.unity3d.com/questions/663197/how-to-prevent-unity-from-adding-permissions-to-an.html" rel="noreferrer">here</a>, but I dont want to do such a thing as this may result in app rejection once again.</p>
  
  <p>So</p>
  
  <p>Is there a way I can find out that where this permission is coming from?</p>
  
  <p>How to find out if there is some code in my scripts which causes unity to include this permission?</p>
  
  <p>Thanks </p>