已 root 的设备上的 Android 资产

发布于 2025-01-06 23:56:39 字数 129 浏览 0 评论 0 原文

拥有 root 权限的设备的用户可以查看我的应用程序的资产文件夹中的文件吗?

我问这个问题是因为我打算将可以从应用程序访问的文件放在那里,但是它们不应该以任何其他方式查看。

我正在 Froyo 2.2 上进行开发

Can users with a rooted device view files in the assets folder of my app?

I ask because I intend to place files there that can be accessed from the application, however they should not be viewable in any other way.

I am developing on Froyo 2.2

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

や莫失莫忘 2025-01-13 23:56:39

是的,当然可以。 Assets 只是设备文件系统上的另一个目录。权限是基于底层 Linux 权限模型强制执行的,因此任何有权访问设备上 root 的人都可以访问设备上的任何内容。

Android 平台的应用程序安全(免责声明:我是本书的作者)。基本上,如果您担心 root 有权访问应用程序中的文件,您将需要对它们进行加密,这样即使 root 可以访问它们,它们也将不可读。这种方法有很多自己的实现问题,所有问题都集中在如何管理用于加密/解密文件的密钥上。虽然您可以采取一些措施来使具有 root 权限的人更难获取您的应用程序文件,但您不能使之成为不可能,因为 root 用户可以完全控制设备及其上的所有内容。

Yep, sure can. Assets is just another directory on the filesystem of the device. Permissions are enforced on those based on the underlying Linux permissions model, so anyone with access to root on the device can access anything on it.

There is an in-depth discussion of how the assets of applications are isolated/protected, as well as a discuss about how root can access them and how you can protect against this, in Application Security for the Android Platform (disclaimer: I'm the author of this book). Basically, if you're concerned about root having access to files within your application, you're going to want to encrypt them so even if root can get to them, they will not be readable. This approach has a lot of its own implementation problems, all centered on how you manage the keys used to encrypt/decrypt the files. While there are things you can do to make it much more difficult for someone with root to get as your application's files, you cannot make this impossible as root users have full control over the device and everything on it.

書生途 2025-01-13 23:56:39

不可能阻止任何人获取您的资产。

Its not possible to prevent anyone getting to your assets.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文