Search code examples
javaandroidrootsu

Cannot read/write/delete file through Android app


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.


Solution

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