Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does Android Account Manager store account specific preferences?

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?

like image 429
C Gar Avatar asked Sep 03 '10 00:09

C Gar


People also ask

Where are user accounts stored in Android?

The authentication token for Google accounts and of other accounts which uses AccountManager class are stored inside: /data/system/users/0/accounts. db # for Android Marshmallow and earlier /data/system_ce/0/accounts_ce. db # for Android Nougat and above.

Is Android account manager secure?

Overview. Using an AccountManager to store credentials is a much secure way than storing in a file or a SQL DB. A file can be retrieved by any other app unlike via AccountManager Android will enforce that only your app will be able to access to the key.

What is Android account manager?

With the user's permission, you can use Account Manager to fetch the account names that the user has stored on their device. Integration with the user's accounts lets you do a variety of things, such as: Autofill forms with the user's email address. Retrieve an ID that is tied to a user, not a device.

Where is the account manager on my phone?

Under the Personal tab in Settings, you'll find an option for Accounts. This is separate from the tab, where you'll find a lot of preferences related to how your account operates on your device.


2 Answers

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
like image 189
Nathan Perrier Avatar answered Dec 08 '22 13:12

Nathan Perrier


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

like image 27
Sec Avatar answered Dec 08 '22 13:12

Sec