0

I am trying to copy the file from /storage/emulated/0/test.txt to /cache/SH_DIR/ via android user application ,

getting error like below

java.io.FileNotFoundException: /cache/test/test.txt: open failed: EACCES (Permission denied)

When I have created as system application like , Included Application code as past of AOSP then able to copy the file to /cache/SH_DIR/ location.

May I need to add anything in the SEpolicy to copy file to /cacahe/SH_DIR/ from user application.

Can you please help me , Thanks in advance

GNK
  • 1,036
  • 2
  • 10
  • 29
  • On an Android device there is no /cache directory. Please use File.exists() and File.canWrite() before you use a directory. – blackapps Jun 16 '21 at 09:05
  • I am doing same .Able to copy the file from storage to cache as a system application.But as user application not able to copy the file. – GNK Jun 16 '21 at 09:11
  • `am doing same` I dont see you doing that. – blackapps Jun 16 '21 at 09:12

0 Answers0