Where does Android Account Manager store account specific preferences?
Asked Answered
M

4

7

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?

Mien answered 3/9, 2010 at 0:23 Comment(0)
B
9

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):

/data/system/users/0/accounts.db

You'll need to find your account for your app:

sqlite> select * from accounts;
24|john.doe|com.evernote|

Then use the id to find the extras:

sqlite> select * from extras where accounts_id = 24;
70|24|userId|8305749
Brazell answered 16/7, 2013 at 2:35 Comment(0)
A
3

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

Alitta answered 12/11, 2019 at 20:13 Comment(0)
S
0

Most likely not, because normally you don't have to care about where android stores the shared preferences.

Steno answered 27/1, 2011 at 16:22 Comment(0)
R
0

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 have

    <manifest package="com.my.app.account" ... >

The settings are stored in

    /data/data/com.my.app.account/shared_prefs/com.my.package.account_preferences.xml

These results are from the Android 2.3 emulator.

Ramage answered 12/6, 2012 at 18:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.