简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM