0

I am doing this through an app I am coding.

I copy a file from /persist/ to the internal storage of my app using SU "cpy" and then I "chmod" it to 600 or even 777. I get "Access denied" exception whenever I read that file. I can read any other file I create. I also changed the owner and group from "root" to my app, but I can still not touch that file - delete, read, write all fail.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Riuo
  • 413
  • 1
  • 3
  • 15
  • read this question...........http://stackoverflow.com/questions/14376807/how-to-read-write-string-from-a-file-in-android – Muhammad Waleed May 07 '16 at 06:41
  • @ExceptionLover I can read any other file that I have created in the same directory from the app, but not this one. – Riuo May 07 '16 at 06:48

1 Answers1

0

The solution was to chcon the file as well. Thanks to ChainFire!

Riuo
  • 413
  • 1
  • 3
  • 15