简体   繁体   中英

file security android: how can I make a file to be read by my android application only

I have a set of encrypted files on my android device's sd card. My application reads the encrypted file using bufferedInputstream and generates the decrypted file in the application's internal storage. The application then reads the decrypted file(.pdf, .swf, .flv) to view it. How can I make sure that a user (including root user on rooted devices) can not access the decrypted files?

  1. can I remove the read/write rights of the decrypted file, as soon as my application opens it to read? if yes please guide me how?
  2. can I delete the file from the internal storage as soon as my application opens it to read. If yes please guide me How?
  3. I stumbled upon https://github.com/seth-hg/fuse-android . If nothing else works, is it a good idea to build a file system in user space to handle such cases? If you have tried it, please point me to right direction or a tutorial.

Once the user gains root, you are not able to prevent access to any file. As the security of android is based (mainly) on permissions in file system.

What you can do is store the decrypted content in the memory and delete the file (or avoid creating it in first place)

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