For example content provider has signature permission for main build
<provider
android:name=".com.test.ContentProvider"
android:authorities="com.test.provider"
android:enabled="true"
android:exported="true"
android:permission="com.test.permission" />
and signature permission
<permission
android:name="com.test.permission"
android:protectionLevel="signature" />
How to disable this permission for debug build?
Tried to add content provider with the same name but without android:permission="com.test.permission" line to AndroidManifest.xml (debug) without luck
Upd1: tried to add tools:node="remove" to permission itself, but this doesn't work:
<permission
tools:node="remove"
android:name="com.test.permission"
android:protectionLevel="signature" />
At the same time tools:node="remove" inside content provider removes content provider completely from debug build.
I don't know much about
ContentProviderpermissions, but you may try these options:1/ In your debug
AndroidManifest.xml, use this declaration:This will remove the permission in the merge manifest for the debug build
2/ Define the permission in a strings resources. Define the permission value in the main
strings.xml, in the debugstrings.xmlleave it blank.Your
providertag simply references the string based on build:Don't know if permission is required or not, these are just some ways to customize your configuration by different builds