Question: I am working on a Phonegap app for Android which I am building with PhoneGap build. I noticed as I installed it that it requires a lot of permissions that I don't need, such as access to the camera.

In a normal android app I would change the manifest XML, but I can't find any documentation on how to do this while using phonegap build.

I am worried that this will put users off when installing it. How can I remove the unnecessary permissions?

Answer: 
For info, it could be that having a line such as

```
<gap:plugin name="org.apache.cordova.media" />    

```

in the config.xml file is the problem. Even with the

```
<preference name="permissions" value="none" />    

```

line, the media plugin creates new permissions which appear when an app is installed.
android.json
------------

`plugins/android.json`

See section

```
"AndroidManifest.xml": {
        "parents": {
            "/*": [
                {
                    "xml": "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
                    "count": 2
                },
                {
                    "xml": "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\" />",
                    "count": 1
                },
                {
                    "xml": "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />",
                    "count": 1
                }
            ]
        }

```

Remove anything you don't need from there

AndroidManifest.xml
-------------------

Then - edit the file `AndroidManifest.xml` - and remove the matching permissions you previously removed

Rebuild
-------

cordova build android

Notes
-----

* Make sure the JSON is still valid after your changes
* Also note, remove the last comma "," or you'll receive an error SyntaxError: Unexpected token ] ( even tough the last comma in JSON validator is considered valid )