Unnecessary Permissions Declared in AndroidManifest.xml

The AndroidManifest.xml file defines the permissions an app requests from the user during install (for pre-Android 6.0) or at runtime (for Android 6.0+). If your app declares permissions it doesn't actually use, you are:

  • Expanding the attack surface
  • Eroding user trust
  • Exposing the app to security and privacy risks

These are known as unnecessary or overprivileged permissions.

If your app doesn't use SMS or camera functionality, this is an unnecessary risk.


What’s the Impact?

1. Privacy Concerns

Requesting sensitive permissions like READ_CONTACTS, READ_SMS, or ACCESS_FINE_LOCATION without justification can alarm users — and potentially violate privacy regulations.

2. Increased Attack Surface

If an attacker finds a way to exploit unused but declared permissions (via intent hijacking or component exposure), your app becomes a target even for features you don’t use.

3. User Trust & App Store Rejection

  • Users may decline to install or uninstall apps that request suspicious permissions.
  • Google Play Protect and review systems may flag or reject apps with overprivileged declarations.

How to Fix It

1. Audit All Declared Permissions

Check AndroidManifest.xml for all <uses-permission> declarations.

  • Does your app actually use the feature?
  • Is it required for your current version?

Delete anything unnecessary.

2. Refactor & Remove Related Code

Sometimes, permissions were added for legacy or unused libraries. Refactor or remove:

  • Old camera or location libraries
  • Deprecated SDKs
  • Unused third-party integrations

3. Use Runtime Permissions Correctly

For Android 6.0 (API 23) and above, request permissions only when needed, not at install.

Final Thoughts

"Just in case" permissions are a liability. Requesting only what you use is not just good practice — it’s essential for secure, privacy-respecting Android development. Clean up your AndroidManifest.xml today to minimize risk and improve user trust.