Skip to main content

PhoneGap/Cordova excessive permissions

A standard PhoneGap/Cordova Android app, usually requires all possible permissions when it is build.

This is directly related to the PhoneGap/Cordova plugins that are required and included by default, even though the app may not require them.

The documentation writes that we have to add the following line to our "config.xml":

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

This, though, does not work for version 6.2.6 that I currently use.

The solution for the excessive permissions, is to uninstall the unused plugins.

According to the documentation, you have to run the following command:

phonegap plugin remove pluginName

This, though, does not do the trick, because it does not remove the plugin declaration in the "config.xml" file.

The key word that we have to use to make this work, is "--save". So, the command becomes:

phonegap plugin remove pluginName --save

This uninstals the plugin and removes all the build declarations for the specific plugin. The final result is that the permissions demanded by the uinstalled plugin, are no longer needed.