kotlin - Android multi-user downloaded file access across users - Stack Overflow

I am working on a project that includes both, an Android app and a custom AOSP built. Inside of the app

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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745292741a4620959.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信