1

I have built my own AOSP Marshmallow on my Nexus 5 device and got trouble with the permissions. If I add a new permission into the AndroidManifest.xml of an existing application, this permission will be by default turned off. I have to manually set it. The other permission for example Contacts is being active (the once I did not modify and seems to be standard even after factory reset). So there has to be a file which gives conclusion about the standard permission of the applications. I just could find some files within /system/etc/default-permissions, but this makes no sense to me and it seems to be ignored.

When I add my custom application all permissions are by default turned off. How can I enable those permissions by default when I flash my custom os in Marshmallow for nexus 5 devices? Where can I set this information within my AOSP project? I could set it via pm grant <app> android.permission... but this is not my use case!

Floern
  • 33,559
  • 24
  • 104
  • 119
user3325230
  • 507
  • 1
  • 6
  • 19

1 Answers1

1

Default permissions in AOSP are set in this java class: frameworks/base/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java

ysh1685
  • 55
  • 2
  • 10