Search code examples
androidaccountmanageraccounts

Android AccountManager accounts storage


Where are the AccountManager Accounts stored? Is it on the device? If yes in which folder is it stored?


Solution

  • It is stored here:

    Environment.getSystemSecureDirectory().getPath() + File.separator + DATABASE_NAME;
    

    Where getSystemSecureDirectory:

    Gets the system directory available for secure storage. If Encrypted File system is enabled, it returns an encrypted directory (/data/secure/system). Otherwise, it returns the unencrypted /data/system directory.

    and DATABASE_NAME = "accounts.db";