admin管理员组文章数量:1418675
I am working on a project that includes both, an Android app and a custom AOSP built. Inside of the app that is running as a regular user (in this case user with id 10), I am downloading a file to Environment.getExternalStoragePublicDirectory()
) which I want to access from a privileged platform service running as user 0. Reading files from other locations (e.g. /data/local/temp) inside of the platform service works but as soon as I am trying to access a user directory, I get permission denied because of linux ACLs (EACCES exception).
Additional facts:
- Android Version 15
- Kotlin
Any idea how I can achieve downloading the files with a regular user and then passing them to the system user inside of the platform?
I tried:
- FileProviders -> obviously not working because it is intended to share files between two apps running as the same user
- hardcoding some sdcard path -> not working because android studio complains that you should not do that
本文标签: kotlinAndroid multiuser downloaded file access across usersStack Overflow
版权声明:本文标题:kotlin - Android multi-user downloaded file access across users - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745292741a2651895.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论