JoeC
JoeC

Reputation: 133

Where are the cookies in the native android browser stored?

Basically, I'd like to know if there's a specific folder I can look in and copy/paste cookie data from. I've tried looking around myself but to no avail. Google didn't help much either.

If they aren't stored to a folder that is directly accessible, is there any other way to get to them?

I'm on the Android 2.2 (Froyo) version if that helps. THANKS. :D

Upvotes: 6

Views: 39782

Answers (3)

FoamyGuy
FoamyGuy

Reputation: 46856

If you are using a WebView within an application to show the page in question you can find the cookies in the db file:

/data/data/your.apps.package.name/databases/webview.db

Once you've got that db you can do the same thing from Mike's answer to inspect the cookies.

select * from cookies

Upvotes: 2

Mike Feinberg
Mike Feinberg

Reputation: 71

We ran into a particular scenario where we wanted to see how our website cookies were re-acting with a device. We were able to view the database the cookies are stored using "adb shell" on an emulated device. After running the shell, we were able to track the cookies to a database using the following command.

sqlite3 /data/data/com.android.browser/databases/webviewCookiesChromium.db

and the select statement here:

select * from cookies;

the column list can be view by using the following command:

pragma table_info(cookies);

Upvotes: 7

the100rabh
the100rabh

Reputation: 4147

For security reasons, each application stores its data in a private sandbox/folder and other applications cannot access it. Refer Cookie Management details in Webview http://developer.android.com/reference/android/webkit/WebView.html

Upvotes: 8

Related Questions