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
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
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);
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
精彩评论