可以从另一个应用程序访问共享PREFERESCES/加密的共享Preference吗?
我正在使用一个应用程序,该应用程序存储具有加密共享首选项的敏感数据。如果可以从另一个应用程序访问,我遇到了一些问题。一些答案指出,为了防止从另一个应用程序访问共享preferences,它需要使用mode_private
(这是默认的一个),并且该应用程序总体上不包含来自另一个应用程序的相同签名凭据。不幸的是,我在有关这些案件的正式文档官方声明中找不到。
因此,我想问,是否有足够的安全性加密共享的偏好,以防止通过扎根设备从另一个应用程序访问? 如果不是,有什么可能的解决方案?
I'm working on an app which stores sensitive data with encrypted shared preferences. I came across some questions regarding that if it is possible to be accessed from another app. Some of the answers stated that to prevent SharedPreferences from being accessed from another app it needs to be in MODE_PRIVATE
(which is the default one) and the app overall to not contain the same signing credentials from another app. Unfortunately I couldn't find in the official documentation official statement regarding these cases.
So I wanna ask, is encrypted shared preferences enough secure in order to prevent from being accessed from another app moreover via rooted device?
If not what are the possible solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
几年前,我遇到了同样的问题,所以我尝试了它,并将共享的偏好保存在一个应用程序中,并试图在另一个应用程序中打开它们,但是即使经过许多不同的尝试,我也无法打开它们。因此,是的,加密的共享偏好是足够安全的,以免任何其他应用程序打开。直到和除非我使用
mode_world_readable
或mode_world_writable
edit> edit
My device is rooted as well for some reasons.
I had the same question few years back, so, I tried it and saved the shared preferences in one app and tried to open them in another app, but even after a lots of different tries I was not able to open them. So yes Encrypted Shared Preferences are secure enough not to be opened by any other app. Until and unless I used the
MODE_WORLD_READABLE
orMODE_WORLD_WRITEABLE
EDIT
My device is rooted as well for some reasons.