如何使隐藏在android的SD卡上的文件? [英] How to make a file hidden in android sd card?

查看:409
本文介绍了如何使隐藏在android的SD卡上的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建Android应用程序,其中包含DB需要被隐藏(不能被用户访问)SD卡。谁能告诉我如何做到这一点?

I am creating android application which contains DB that needs to be hidden(not able to access by the user)in the sd card. Can anyone tell me how to do this?

推荐答案

存储在SD卡上的任何文件都是由在手机上运行的应用程序和谁已经安装在SD卡上的用户(访问这两个,而它在手机和其他)。

Any file stored on the SD card is accessible both by applications running on the phone, and by users who have mounted the SD card (both while it's in the phone and otherwise).

您可以更改文件属性,使其'隐藏',但它仍然很容易被发现。有没有办法让对像你描述的方式SD卡安全的公共分区的文件 - 用户永远是能够复制,删除,并有可能修改文件

You can change the file properties to make it 'hidden', but it will still be easily found. There is no way to make a file on a public partition like an SD Card 'secure' in the manner you describe - users will always be able to copy, delete, and potentially change the file.

你的问题的最佳解决方案是研究如何加密您的数据库安全地记录下来。您将无法prevent用户删除或复制文件,但你应该能够让他们难以从中读取数据或修改其内容。

The best solution to your problem is to look into ways to encrypt your database to record it securely. You won't be able to prevent users from deleting or copying the file, but you should be able to make it difficult for them to read data from it or modify its contents.

这篇关于如何使隐藏在android的SD卡上的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆