Android - Workaround the ACCESS_CONTENT_PROVIDERS_

2020-06-13 11:38发布

问题:

I'm building an application which gives this exception because i call some internal methods

Permission Denial: Do not have permission in call getContentProviderExternal() from pid=2520, uid=10047 requires android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY

java.lang.SecurityException: Permission Denial: Do not have permission in call getContentProviderExternal() from pid=2520, uid=10047 requires android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY

I did some search and i knew that android OS gives this permission only for the shell users, I wonder if there exists any workaround this ..

Is there anything that would allow me to trick android and makes my application looks like a shell user?

Note: I tried to add the permission in the manifest file but obviously it didn't work.