Why is Content Provider without permissions and with exported=true accessible to any app?

元气小坏坏 提交于 2019-11-30 21:45:10

The documentation has a bug. This:

If a provider's application doesn't specify any permissions, then other applications have no access to the provider's data.

should read as:

If a provider's application doesn't specify any permissions, then other applications' access to the provider's data is determined solely by the android:exported value (true grants unlimited access to all applications; false blocks access by other applications) and android:grantUriPermissions value (which gets complicated).

IMHO, that whole section needs to be rewritten. But, with respect to your test, an exported permission-less provider is wide open, with any app being able to read and write with impunity.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!