Where are the cookies in the native android browser stored?
Asked Answered
O

3

6

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

Ornithorhynchus answered 5/1, 2011 at 4:28 Comment(0)
A
8

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

Abramabramo answered 5/1, 2011 at 5:46 Comment(0)
G
7

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);
Glorygloryofthesnow answered 30/1, 2013 at 14:35 Comment(0)
A
2

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
Analog answered 14/11, 2013 at 0:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.