Android 帐户管理器在哪里存储帐户特定首选项?
我已经成功创建了各种帐户验证器/服务,每个帐户都有自己的preference.xml。这些偏好设置是持久的,但我不知道它们存储在手机上的哪个位置。我已经使用 adb 搜索了手机,但似乎找不到与我的特定帐户的首选项相对应的 *.db 或“shared_prefs”文件。
有人有这方面的经验吗?
I've been successful in creating various account authenticators / services each with their own preference.xml. These preferences are persistent but I do not know where on the phone they are stored. I've scoured the phone using adb but I can't seem to find a *.db or "shared_prefs" files that corresponds to the preferences for my particular accounts.
Anyone have experience with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您使用自定义帐户首选项活动,
PreferenceManager.getDefaultSharedPreferences()
会显示默认首选项存储在应用程序包的首选项文件夹中。例如,如果您的设置存储在
这些结果来自 Android 2.3 模拟器。
If you use a custom account preference activity,
PreferenceManager.getDefaultSharedPreferences()
shows that the default preferences are stored in the preference folder for the application package. For example, if you haveThe settings are stored in
These results are from the Android 2.3 emulator.
很可能不会,因为通常您不必关心 Android 将共享首选项存储在哪里。
Most likely not, because normally you don't have to care about where android stores the shared preferences.
据我所知,
/data/system/users/0/accounts.db
在当前的 Android 版本上已经不再使用。我在
/data/system_de/0/accounts_de.db
中找到了我的所有帐户数据。此外,相当多的谷歌身份验证信息似乎缓存在
/data/system_ce/0/accounts_ce.db
中As far as I can tell,
/data/system/users/0/accounts.db
is not really used anymore on current android versions.I found all my account data in
/data/system_de/0/accounts_de.db
.Additionally quite a bit of google authentication info seems to be cached in
/data/system_ce/0/accounts_ce.db
我也想知道同样的事情,因为我正在寻找 android 将捆绑包“额外”与帐户存储在哪里。
它位于 SQLite 数据库中(您需要 root 手机才能提取并浏览它):
您需要找到您的应用程序的帐户:
然后使用 id 查找额外内容:
I wondered the same thing, as I was searching for where android stored the Bundle "extras" with the account.
It's in a SQLite database (you'll need to root your phone to extract and browse it):
You'll need to find your account for your app:
Then use the id to find the extras: